What command does LiveCode give when the app is force-quit? (ie: double clicking the Home button and "x"ing the app...or restarting your phone)
I need to know this so I can set the file "trackCard".
Thanks bunches!
-Tester2
Force Quit - Command
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Force Quit - Command
Try "shutdown".
g
g
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Force Quit - Command
Hey Gerry,
I tried "shutdown" and this command is triggered when the app is hibernated (ie: pressing the Home button once), but here is my scenario...
I am setting the file "trackCard" to allow my user to re-open the app to the card they were last on. This is the code I have on my stack script for startup:
set the defaultfolder to specialFolderPath("documents")
/* check if there is or is not a file trackCard*/
if there is not a file "trackCard" then
put "Home" into URL "file:trackCard"
end if
if there is a file "trackCard" then
put URL "file:trackCard" into whichCard
go card whichCard
end if
My issue, however, is when the user force-quits" the app. I am wondering if there is a way that the file 'trackCard' gets reset?
Like, say I restart my phone...is there a way to tell this file to clear itself, so that the app opens as if it was the first time the user opened it?
Thanks.
-Tester2
I tried "shutdown" and this command is triggered when the app is hibernated (ie: pressing the Home button once), but here is my scenario...
I am setting the file "trackCard" to allow my user to re-open the app to the card they were last on. This is the code I have on my stack script for startup:
set the defaultfolder to specialFolderPath("documents")
/* check if there is or is not a file trackCard*/
if there is not a file "trackCard" then
put "Home" into URL "file:trackCard"
end if
if there is a file "trackCard" then
put URL "file:trackCard" into whichCard
go card whichCard
end if
My issue, however, is when the user force-quits" the app. I am wondering if there is a way that the file 'trackCard' gets reset?
Like, say I restart my phone...is there a way to tell this file to clear itself, so that the app opens as if it was the first time the user opened it?
Thanks.
-Tester2
Re: Force Quit - Command
Not that I can think of, no. Your app is sandboxed and no outside influence or action can touch it's files.
Gerry
Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Force Quit - Command
Hopefully, this problem will go away when Livecode supports multitasking as implemented in iOS. Right now, there's no difference between the two states. As far as your app is concerned, when the user quits your app by pressing the home button, it's the same as if they "force quit". That's why your splash screen appears each time. So technically, the question isn't "how can I tell when the user force quits?", it's "how can I tell when the user doesn't?"