Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Installation Paths
Message
From
27/04/1998 14:34:32
 
 
To
27/04/1998 12:04:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095134
Message ID:
00095207
Views:
24
You all may laugh if you will, but I find that it's very simple to use a .MEM file for this single piece of data. It's much easier than writing to the registry (which as far as I can tell is never necessary although since mine crashes all the time I'm biased.)

You can't just use a hardcoded path from the calling .EXE directory if you are running on a network. So I have the program look immediately for THISAPP.MEM. You could as easily use an INI, but I prefer to keep other settings in a table. Eventually I will set it up like this and ditch the MEM file:

- Put a local machine settings table in a set path from the calling directory, and a user/system settings table in the data path. The data path will be listed in the MACHINE.DBF table. The structure of the settings table is:

SE_Name C 50 - A name such as "DATAPATH"
SE_Type C 1 - Same as returned by Type()
SE_Value Memo - Value of the setting
SE_Us_key N 10 - link to the user table, 0 if not applicable.

Then you have library routines to set and retrieve settings. The library routine to set should automatically add a new setting if it is not found, giving it a default value passed to it.

Adam
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform