Quitting a Standalone Problem
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Mar 27 05:26:41 EDT 2014
Hi Charles,
No, I don't think the "bug" was solved. The bug you're referring ro is
probably that the engine stays running in memory after closing all stacks.
This is my standard script:
on quitThisApp
lock messages
-- MySql
-- put revOpenDatabases() into myDatabases
-- repeat for each item myBase in myDatabases
-- revCloseDatabase myBase
-- end repeat
-- stop using stacks
put the stacksInUse into myStacks
repeat for each line myStack in myStacks
stop using stack myStack
end repeat
-- stacks
put the openStacks into myStacks
put "message box,home,tool,Message Box,revTools,revMenubar" \
& comma & the short name of me into myDontClose
repeat for each line myStack in myStacks
if myStack is not among the items of myDontClose then
close stack myStack
end if
end repeat
-- messages
put the pendingmessages into myMsgs
repeat for each line myMsg in myMsgs
cancel item 1 of myMsg
end repeat
set the backdrop to none
if the platform is "Win32" then close me
if the environment is not "development" then
quit
end if
end quitThisApp
You need to adjust this to your own needs. E.g. uncomment the database
part or replace that by code for SQLite etc. You may want to alter the
list of stacks that stay open.
The script should close all stacks and quit properly. It should also
prevent crashes.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 3/27/2014 03:55, Charles Szasz wrote:
> Is there a standard script for quitting windows standalones? I have run into this problem on Windows XP, Windows 7 and 8. The Rev Archives indicate that there was a bug In quitting standalones. Was this bug resolved in LC 5.5.5? A link to a solution in the archives is no longer active.
>
> Sent from my iPad
>
> _______________________________________________
> 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