• 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: Is this a bug, or am I hacking?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this a bug, or am I hacking?


  • Subject: Re: Is this a bug, or am I hacking?
  • From: Keary Suska <email@hidden>
  • Date: Fri, 15 Aug 2008 07:53:24 -0600
  • Thread-topic: Is this a bug, or am I hacking?

8/14/08 6:45 PM, also sprach email@hidden:

> [[NSNotificationCenter defaultCenter] addObserver:self selector:
> (<...>) name:kMyConstant1 object:<theObjectOfInterest>];
>
> My observer doesn't receive notifications from kMyConstant2 even
> though it's defined to be the same literal string as kMyConstant1.
>
> As it turns out I can get the functionality I need by simply
> subscribing to both notifications, but I was trying to avoid linking
> in the headers for all the object types that are contained by my data
> management code - the UI for that model doesn't otherwise "need to
> know" what object types they are, as apart from this one notification,
> they conform to a common protocol.

What if we bark up the tree of the "object" parameter? If you are passing
this parameter, you will only receive notifications from the specific
object. It sounds like you are working with two different objects that you
want to receive notifications for. In this case, you will have to pass nil
for the object, and possibly test the object for interest in your
notification method.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Follow-Ups:
    • Re: Is this a bug, or am I hacking? [SOLVED]
      • From: Graham Cox <email@hidden>
References: 
 >Re: Is this a bug, or am I hacking? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Making a bound view re-read its value
  • Next by Date: Question about directory for Application Caches
  • Previous by thread: Re: Is this a bug, or am I hacking?
  • Next by thread: Re: Is this a bug, or am I hacking? [SOLVED]
  • Index(es):
    • Date
    • Thread