I want to know what is the defacto standard used by LC developers when saving their user-changed app settings? Do you store it as INI file somewhere? What do you use? For example, the last window size and position.
Also, how do I center the application window?
Most common used cross-platform way to save preferences?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 64
- Joined: Fri Apr 26, 2013 8:38 am
Most common used cross-platform way to save preferences?
Learning LiveCode, one step at a time.
Re: Most common used cross-platform way to save preferences?
If it's plain text data, I just use a text file. If it's binary, I use a stack and set custom properties in the stack to hold the data. I also use a stack if the data holds confidential info and needs to be obscured, because the stack can be password protected which encrypts the custom properties so they can't be read. Then I write the file (text or stack) to the specialFolderPath("preferences") for desktop, or "documents" for mobile, or in some cases to the app support folder, depending on usage and OS.
I think that's a pretty standard way to do it in LiveCode. When your stack opens, you just open the prefs file invisibly and read the data you need to retrieve.
I think that's a pretty standard way to do it in LiveCode. When your stack opens, you just open the prefs file invisibly and read the data you need to retrieve.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com