Check for first run

Bob Sneidar bobs at twft.com
Mon Apr 18 12:51:17 EDT 2011


Trouble with the prefs approach is that sometimes prefs will get "corrupted" whatever that means, and a user will delete it expecting that the app will create another one with the default settings. Making them go through the setup procedure can actually cause more problems, if the setup has information critical to the connection and operation of the app. If the user points to another location for the database for instance, they will think they "lost" their data, because they will create a new database. 

I like the idea of checking for the existence of the database itself. I wouldn't let the user choose where to save that, unless you want the user to be able to pick from multiple databases. In that case a token file in a place with read write access that is not the preferences file would be the way to go. For Windows, you would probably want to set a registry value. 

Bob


On Apr 18, 2011, at 4:24 AM, Trevor DeVore wrote:

> On Sun, Apr 17, 2011 at 2:42 AM, Maarten Koopmans <
> maarten.koopmans at gmail.com> wrote:
> 
>> Is there a best practice for checking if the application is on  a
>> first run for a standalone(especially one that will go to an App store
>> eventually)?
>> 
>> I simply need to ask the user a few questions on first run (and set up
>> a sqlite db).
>> 
> 
> Does your application create a preference file? If so you could check
> whether or not the pref file exists yet. If it doesn't then consider it a
> first run.
> 
> -- 
> 
> Trevor DeVore
> 
> Blue Mango Learning Systems
> 
> 
> LiveCode Resources for Developers: http://livecode.bluemangolearning.com
> 
> 
> Get SQL Yoga as part of the Omegabundle for LiveCode 2011: Save 85% on
> essential tools for LiveCode development - omegabundle.com.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list