Supporting Application Class Method Calls and Global Constants

Two-level section name behavior applies to Jade initialization file sections if the section name does not start with a dot character (.) and if the first argument to the Application class:

For details, see "Two-Level Section Names", earlier in this chapter.

If you write Jade code similar to the following, it expects to access the same Jade initialization file that the Jade node is using.

app.getProfileString(app.getIniFileName, "JadeClient", "ServerName", null);

If you share a Jade initialization file among multiple nodes, to ensure that one node will not change values updated by another node, prefix the section names with a dot character (.) to allow accessing of the same section, if required. Conversely, if a user has his or her own Jade initialization file, you can ensure that behavior is not changed, by prefixing sections names with a unique-identifier value.

Calls to the Application class getProfileString, getProfileStringAppServer, setProfileString, or setProfileStringAppServer method obtain values from or set values on the command line if they are present.

The ProfileRemoveKey and ProfileRemoveSection global constants in the JadeProfileString category remove a parameter (key string) or an entire section from a Jade initialization file, as shown in the following example.

begin
    app.setProfileStringAppServer("\Jade\system\jade.ini", "mySection",
                                  ProfileRemoveSection, "");
    // Jade system adds a value of name= (for example, "InternalAS.")
    app.setProfileStringAppServer(app.getIniFileName, "JadeAppServer",
                                  "PictureCacheFile", ProfileRemoveKey);
    // Initialization file name not IDENTICAL, so we can supply a prefix
    // If the user has moved the window, reset it to the default values
    app.setProfileStringAppServer("\jade\system\Jade.ini",
                                  "Test.JadeAppServer", "WindowPos",
                                  ProfileRemoveKey);
    // Jade uses the single-level (top level) section name
    app.setProfileStringAppServer("\Jade\system\Jade.ini",
                                  ".JadeAppServer", "EnableAppRestrictions",
                                  "true");
end;