Starting an App in the Dev IDE
Posted: Wed Jan 16, 2013 10:57 am
Hi,
At the risk of becoming an official 'Forum Pest' or as being seen as 'stalking' this Forum...
I have created an app in LC - standard sort of thing I'm sure : multiple controls on a set of cards all within/under my main Stack.
The app accesses/uses an SQLite database and needs accees to said DB before it can 'do anything'...
I have, therefore, (I'm a newbie with limited understanding) put an 'Open the DB' script within the main Stack - in fact the 'Open DB' script is called from within an 'On Startup' script within my Stack script/code area.
Without a valid datbase ID the rest of my scripts pretty much all fail safe and simply report "No Datbase connection..."
When I try to test a script on a card (bearing in mind I need access to the info stored in the Database), say to manipulate / display some data, the said script(s) simply report the default "No Database connection..." unless I have run the main Stack code first.
So, to my question :
Is there a way to start my test from the main Stack (so that I include the 'Open Database' script without having to open the main Stack code window and run this first...
I mean, is there a 'Run' button to emulate the app starting up from scratch (like Run 'Main' - sorry, hangups back to VS !) or do I simply need to display the main Stack each time, run the 'On Startup' script there and then run the 'real' script I want to test after that?
I appreciate the flexibility LC offers with regards to the <Apply> and little green 'Play' button adjacent but in many cases I need the app to 'initialise' itself before any particular sub-Script can be run...
Ideas ? Or am I still talking baloney / missing the obvious ?
TIA
Regards.
At the risk of becoming an official 'Forum Pest' or as being seen as 'stalking' this Forum...
I have created an app in LC - standard sort of thing I'm sure : multiple controls on a set of cards all within/under my main Stack.
The app accesses/uses an SQLite database and needs accees to said DB before it can 'do anything'...
I have, therefore, (I'm a newbie with limited understanding) put an 'Open the DB' script within the main Stack - in fact the 'Open DB' script is called from within an 'On Startup' script within my Stack script/code area.
Without a valid datbase ID the rest of my scripts pretty much all fail safe and simply report "No Datbase connection..."
When I try to test a script on a card (bearing in mind I need access to the info stored in the Database), say to manipulate / display some data, the said script(s) simply report the default "No Database connection..." unless I have run the main Stack code first.
So, to my question :
Is there a way to start my test from the main Stack (so that I include the 'Open Database' script without having to open the main Stack code window and run this first...
I mean, is there a 'Run' button to emulate the app starting up from scratch (like Run 'Main' - sorry, hangups back to VS !) or do I simply need to display the main Stack each time, run the 'On Startup' script there and then run the 'real' script I want to test after that?
I appreciate the flexibility LC offers with regards to the <Apply> and little green 'Play' button adjacent but in many cases I need the app to 'initialise' itself before any particular sub-Script can be run...
Ideas ? Or am I still talking baloney / missing the obvious ?
TIA
Regards.