FWIW I like to store global application preferences in an INI file and read them into properties of my application object at BOJ time. I use a pair of API-based routines to read and write the INI files. I prefer INI files over the registry because (a) I understand INI files, (b) I can update them with Notepad if I need to, and (c) if the registry gets hosed by the OS or by some other renegade application, my INI files are still OK.
My apps contain an "Options" form which allows the user to change these settings on the fly. The new settings can then be saved for the current session only (change the app properties but not the INI file) or as the default values for this and future sessions (change both the app properties and the INI file). In a multi-user app, the INI file is stored locally on each workstation so each user can have their own preferences.
Public memvars have a (justifiably) bad reputation in the brave new world of OOP. IMHO they're actually still OK as long as your app will always be the only thing running in that particular session of VFP, so you know for certain that your public memvars won't conflict with anybody else's. But even at that, it's a much better design practice to use properties.
>I would like to here from some other VFP developers on how they handle global preference variables in medium to large size apps.
>
>items of interest:
>
>Do you use public vars, private declared in main prg or some type of object?
>Do you use ini's, registry or dbf?
>How you handle saving and restoring of these settings?
>
>Any and all comments are welcome. Thanks.
Rick Borup, MCSD
recursion (rE-kur'-shun) n.
see recursion.