Standalone shutting down cleanly on Windows
Ben Rubinstein
benr_mc at cogapp.com
Mon Jun 20 11:12:43 EDT 2011
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?
TIA,
Ben
More information about the use-livecode
mailing list