• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: User Shutdown or Logout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Shutdown or Logout


  • Subject: Re: User Shutdown or Logout
  • From: development2 <email@hidden>
  • Date: Sat, 11 Aug 2007 10:12:26 -0600

Sorry for the delay. Yes I am using the correct notification center. I had to go back and look to make sure.

Like I said I tried it on a little test app. And the notification NSWorkspaceWillPowerOffNotification gets triggered, but under my Status Item app it does not. I am doing the very same thing in both apps. Also i just found out that my terminate notification NSApplicationwillterminate does not get called either in my status item app, on a User Logout or Shutdown in . I think it may be a bug.

On Aug 10, 2007, at 4:58 PM, Scott Anguish wrote:

as someone else said.. right notification center?


On Aug 10, 2007, at 5:25 PM, development2 wrote:


Thanks for this info, but it does not seem to work correctly. I have a Status Item app (Main menu bar), and the Notification NSWorkspaceWillPowerOffNotification setup correctly, but it never gets called. I just tried this in a normal app and there is no problem with that it gets called with no problem. But under this Menu Bar app it is never called. Now I found some links that talk about this not working for background apps, but they never came to any real conclusion. Has anyone else ever experienced this?


Thanks in advance.


On Aug 9, 2007, at 2:23 PM, development2 wrote:

I am trying to figure out how to detect when the user either logs out or the user Shuts down. How can I detect this? This may have already been covered, but i can't seem to find the answer in the list archives.

Thanks in advance for any help.


http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/Classes/NSWorkspace_Class/index.html#//apple_ref/ doc/uid/TP40004153


Specifically the notifications...





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >User Shutdown or Logout (From: development2 <email@hidden>)
 >Re: User Shutdown or Logout (From: Scott Anguish <email@hidden>)
 >Re: User Shutdown or Logout (From: development2 <email@hidden>)

  • Prev by Date: Re: convert NSBitmapImageRep to black/white depending on pixel hsb
  • Next by Date: Re: User Shutdown or Logout
  • Previous by thread: Re: User Shutdown or Logout
  • Next by thread: Re: User Shutdown or Logout
  • Index(es):
    • Date
    • Thread