New topic: GLobal variable to last between app close/open?
<http://forums.realsoftware.com/viewtopic.php?t=45808> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message tudorH Post subject: GLobal variable to last between app close/open?Posted: Sun Nov 04, 2012 10:35 pm Joined: Thu Feb 03, 2011 5:44 pm Posts: 85 Hi I am wondering how to create a variable in my application that will remain set after the application is shut down. For example, my app will use the internet to get a license key, and I want that key to be stored in the application. So if I close the application and reopen it, the license key will still be stored.... How do I create such a variable? I'm not sure what to even call it... Thank You! Top charonn0 Post subject: Re: GLobal variable to last between app close/open?Posted: Sun Nov 04, 2012 10:46 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 957 Location: San Francisco, CA, USA You would need to either save the stuff you want to keep out to a file, or store it in some OS-provided data-store (e.g. the Registry under Windows.) _________________ Boredom Software Top tudorH Post subject: Re: GLobal variable to last between app close/open?Posted: Sun Nov 04, 2012 11:15 pm Joined: Thu Feb 03, 2011 5:44 pm Posts: 85 charonn0 wrote:You would need to either save the stuff you want to keep out to a file, or store it in some OS-provided data-store (e.g. the Registry under Windows.) Is there no internal variable to the application I can save the data to? I tried creating a property in the App but that does not work as it resets each time . Is a text file the only solution? Top charonn0 Post subject: Re: GLobal variable to last between app close/open?Posted: Sun Nov 04, 2012 11:57 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 957 Location: San Francisco, CA, USA No changeable property can be stored in the application after it's been built. If you have values which need to be stored but never change, you can use a Constant. _________________ Boredom Software Top timhare Post subject: Re: GLobal variable to last between app close/open?Posted: Mon Nov 05, 2012 12:09 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 11773 Location: Portland, OR USA tudorH wrote:Is there no internal variable to the application I can save the data to? There is not. Quote:Is a text file the only solution? Text file, Database, Registry, Preferences. Take your pick. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
