Hi Mark,

Thanks for your reply; but I added code to handle, log, and pass both those... makes no difference.

In the case that I shutdown Windows, it appears that the app does not receive any messages: not shutdownRequest, not closeStackRequest, not shutDown, not closeStack.

Is there any other message that might be sent in this situation? Should the app be getting one or more of the above messages, and if so, what might be preventing it?

TIA,

Ben

On 20/06/2011 16:43, Mark Schonewille wrote:
Hi Ben,

You must handle the shutdownRequest and the closeStackRequest messages.

on closeStackRequest
   quitMyProject
end loseStackRequest

on shutdownRequest
   quitMyProject
end shutdownrequest

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.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

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?

TIA,

Ben





_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to