Standalone shutting down cleanly on Windows
m.schonewille at economy-x-talk.com
Mon Jun 20 10:43:48 CDT 2011
You must handle the shutdownRequest and the closeStackRequest messages.
You can find the quitMyProject script here http://qery.us/tg
Note that you might need to remove the MySQL part from that script and you might remove anything else that your stack doesn't need.
Economy-x-Talk Consulting and Software Engineering
New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce
On 20 jun 2011, at 17:12, Ben Rubinstein wrote:
> I have a standalone that's supposed to perform various tasks when it exits. I thought it was doing so, but having recently changed the hardware it's running on, there's now an error on shutting the machine down which we've traced to my app not doing these tasks.
> The app consists of a mainstack and a sub-stack, but the sub-stack is only ever opened if the app is used interactively, which it generally isn't.
> The app performs the shutdown tasks if it gets either a closeStack or shutDown message. It currently logs things so I can find out what's happening.
> - If I quit the app from its own menu, it gets the shutDown message, does its stuff, I can then shut down the machine without error.
> - If I right click the button for the app in the taskbar, and select Close, it gets the closeStack message, does its stuff, I can then shut down the machine without error.
> - If I shut down the computer from the Start menu (which is closest to what actually happens in production use) then the log doesn't show it getting either message. So it doesn't clean up properly, and then Windows throws an error.
> Is there another message I could be trapping? Is there something else I need to make sure that one of these messages is sent when Windows shuts the app down? Is there a trick I'm missing?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode