GLX Application Framework > GLX Application Framework > Getting, Setting and Saving Preferences

Getting, Setting and Saving Preferences

The API

Media_1204602096959_display

There are four API calls for interfacing with application preferences. Besides the ability to get, set and save you can also check if a preference has been set on the computer your application is running on by calling glxapp_prefIsSet(pKey). When a call to glxapp_getPref is made the framework uses glxapp_prefIsSet() in order to determine if it should return the default value that you have configured for a particular preference.

Examples

Media_1204602835988_display

You can store both string values (1) and arrays (2) in a preference. These examples demonstrate how to do both.

Call glxapp_savePrefs when you want to save changes to disk.

Broadcasting

Media_1204602617089_display

Note that when you call glxapp_setPref that any messages associated with the preference will be broadcast (1) unless you lock messages (2).

Comments (0)

Add your comment




E-Mail me when someone replies to this comment

Are you human?