28 Jan
2008
28 Jan
'08
4:25 p.m.
On Jan 28, 2008 6:16 AM, James Bucanek <subscriber@gloaming.com> wrote:
Since my app can't tell the difference between a Quit for a Shutdown and a Quit just for the sake of quitting, I think I'll have to give up on the KeepAlive flag for this version.
You might try listening for distributed notifications associated with shutdown and restart: com.apple.restartInitiated com.apple.shutdownInitiated com.apple.logoutCancelled (I found these on Leopard with Notification Watcher: http://www.tildesoft.com/Programs.html) If you get a Quit after receiving either of the first two but without having received the third, it's a Quit for a Shutdown rather than a Quit just for the sake of quitting. Hamish