Storing Application Data and User Preferences

The GLX Application Framework simplifies creating application data folders and storing user preferences. Before you can call the glxapp_getPref, glxapp_setPref and glxapp_savePrefs handlers you must define where the preference files will be stored.

Currently preference data is stored as Revolution stacks. A nice addition might be to move Windows preferences to the Registry and to store OS X preferences as a plist.

Locate Application Data and Preference Settings on General Tab

Specify Folder and File Locations

1) Provide a relative folder location to store application data in. The folder is relative to the user or shared application data folder for each platform.

2) Specify if you will be storing data in the user application data folder and/or the shared application data folder. Usually you will just be storing data in the User data folder.

3) For preference files on OS X you provide the name of the file that will be stored in the user preference folder. This is typically ~/Library/Preferences.

4) On Windows you specify the name of the file relative to the user application data folder. This is done since Windows has no specific folder for preferences and usually stores preferences in the Registry. Notice that in this example we are storing the preference file inside of the application data folder (1) which the framework will create when the application is launched.

Notes:
* Call glxapp_getProp("user preference file") to get the full path the preference file.
* Call glxapp_getProp("user data folder") to get the full path to the user data folder (you must have the "user" checkbox checked).
* Call glxapp_getProp("shared data folder") to get the full path to the shared data folder (you must have the "shared" checkbox checked).

Previous Lesson: Editing Your Application Properties Table of Contents Next Lesson: Specifying Application Icon to Use in Ask/Answer Dialogs