• 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: Receiver type for instance message is a forward declaration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiver type for instance message is a forward declaration


  • Subject: Re: Receiver type for instance message is a forward declaration
  • From: Roland King <email@hidden>
  • Date: Wed, 11 May 2016 07:19:45 +0800

> On 11 May 2016, at 07:11, Jens Alfke <email@hidden> wrote:
>
>
>> On May 10, 2016, at 4:05 PM, Carl Hoefs <email@hidden> wrote:
>>
>> Yes, yes, and yes! I'm using a nil context. I'm not sure how context is to be used here... Is this an arbitrary value that I check in -observeValueForKeyPath?
>
> Yes, but I’m not aware of it being required … what goes wrong if it’s NULL, Quincey?
>
> —Jens

nothing goes wrong if it’s null, however you can’t tell which observations are yours and which belong to one of the other classes in the inheritance chain who are also potentially using KVO.

However lots of people use nil for it and get away with it, but don’t. You will one-day handle the KVO notifications for something which isn’t you and starve it of doing so.

Either way - this KVO notification has been passed to the superclass hence the exception. I’d doubt it’s because of the context, more likely that he’s comparing the notification name string incorrectly and not handling it, or handing the KVO and then *still* calling the superclass method.



_______________________________________________

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: 
 >Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Quincey Morris <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Carl Hoefs <email@hidden>)
 >Re: Receiver type for instance message is a forward declaration (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Receiver type for instance message is a forward declaration
  • Next by Date: Re: Receiver type for instance message is a forward declaration
  • Previous by thread: Re: Receiver type for instance message is a forward declaration
  • Next by thread: Re: Receiver type for instance message is a forward declaration
  • Index(es):
    • Date
    • Thread