• 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: Registering for NSNotification globally?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Registering for NSNotification globally?


  • Subject: Re: Registering for NSNotification globally?
  • From: Peter Maurer <email@hidden>
  • Date: Mon, 13 Dec 2004 18:26:41 +0100

For example, so I could register for the "NSApplicationDidBecomeActiveNotification" and have my method called whenever the user switches apps (not just to mine), and then find out the name of the newly activated app.

In this particular case, it may actually be the exception. I'm not sure anymore whether this was Carbon or Cocoa, but I think if you register for this notification and pass NIL as the object, you will even get notifications for other applications.

NSApplicationDidBecomeActiveNotification is a NSWorkspace notifification, as far as I remember. That might explain why other applications can "see" it.


Cheers,

Peter.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Registering for NSNotification globally? (From: Lee Morgan <email@hidden>)
 >Re: Registering for NSNotification globally? (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: How can I implement labels without the overhead of an NSTextField?
  • Next by Date: Re: Kill other process's warning dialog
  • Previous by thread: Re: Registering for NSNotification globally?
  • Next by thread: NSTimers and document based app
  • Index(es):
    • Date
    • Thread