Best Practices Question

Richard Gaskin ambassador at fourthworld.com
Thu May 28 13:35:59 EDT 2009


Bill Andersen wrote:
> This is one area I am having issues.  I'm new enough to Rev that I 
> didn't realize fields on my Preferece Page (DB IP Address, DB Name, etc.)
> wouldn't be remembered between sessions when I make a Standalone!
> 
> Can I take what the user enters in the fields for their Preferences
> (database's IP Address, DB Name, etc.) and then assign them to a Custom
> Property before they exit the standalone.  Will that keep the data?
> 
> OR, do I have to store that in a "prefs" text file and just parse it
> at runtime? What do others do?

Best of both:  use properties in a stack file for the convenience of not 
having to parse data, but just store that stack file separate from the 
application.

Ordinarily prefs files are stored in specialFolderPath("preferences") on 
OS X and specialFolderPath(26) on Windows.


For details on working with data from standalones:

Saving data in Revolution standalones
by Sarah Reichelt
<http://www.revjournal.com/tutorials/saving_data_in_revolution.html>


For details on using specialFolderPath:

'specialFolderPath' Codes
by Ken Ray
<http://sonsothunder.com/devres/revolution/tips/file010.htm>

--
  Richard Gaskin
  Fourth World
  Revolution training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com



More information about the use-livecode mailing list