• 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: Using NSNotificationCenter passing an object or value?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSNotificationCenter passing an object or value?


  • Subject: Re: Using NSNotificationCenter passing an object or value?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 3 Aug 2010 14:09:26 -0700

On Aug 3, 2010, at 13:50, eric dolecki GMail wrote:

> Many thanks. I didn't know object could be nil yet still pass it along when populated

I *knew* you were going to say exactly that. :)

Specifying nil for the 'object:' parameter just means (and I quote from the NSNotificationCenter reference) "the notification center doesn’t use a notification’s sender to decide whether to deliver it to the observer". All notifications still have a sender, available as the 'object' property of the notification object.

If the parameter had been named something like 'objectFilter:' instead, you wouldn't have been confused. As it is, reading the documentation would have cleared up the apparent ambiguity, which is why I keep harping on READING THE DOCUMENTATION.


_______________________________________________

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: 
 >Using NSNotificationCenter passing an object or value? (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Using NSNotificationCenter passing an object or value? (From: Quincey Morris <email@hidden>)
 >Re: Using NSNotificationCenter passing an object or value? (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Using NSNotificationCenter passing an object or value? (From: Quincey Morris <email@hidden>)
 >Re: Using NSNotificationCenter passing an object or value? (From: eric dolecki GMail <email@hidden>)

  • Prev by Date: Re: override hyperlink handler for WebView
  • Next by Date: Re: Threading and Event Queue Question
  • Previous by thread: Re: Using NSNotificationCenter passing an object or value?
  • Next by thread: Re: Using NSNotificationCenter passing an object or value?
  • Index(es):
    • Date
    • Thread