Greetings,
I need to know when the computer is going to shut down. I tried the
NSNotificationObserverMBS class, like in the example (with the center class
also), and I have this in the GotNotification event:
if notification.name=NSWorkspaceMBS.NSWorkspaceWillPowerOffNotification then
app.IsGoingToShutDown=True
NSLogMBS "Detected that the computer will shut down!"
Else
NSLogMBS notification.name
end if
(I do NSLog with the other notifications for debugging purposes; debugging at
shut down isn't convenient!)
However, I'm getting a lot of notifications, but not the
NSWorkspaceWillPowerOffNotification one. I need it in order for my app to stop
launching other applications (which then prevent the shut down).
If the notification was “misspelled”, I'd still get it with the “NSLogMBS
notification.name” line, but it looks like it's never even received, regardless
of its name.
Should I do something special to get that notification?
(Mac OS 10.7 or 10.8, tested under 10.7 currently).
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info