• 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: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!


  • Subject: Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
  • From: Jonathan Mitchell <email@hidden>
  • Date: Thu, 12 Mar 2015 10:01:14 +0000

> On 11 Mar 2015, at 23:28, Quincey Morris <email@hidden> wrote:
>
>
> I don’t have an explanation of exactly why that might fail, but it certainly seems a lot like the conditions for bug I talked about earlier. You have the same object observing the same property of the same target twice.
>
But surely this is the whole point of the context - to be able to differentiate between multiple observations to the same object and path.
When observing complex objects it is useful to be able to do this.
I do it on occasion and it works fine.

Having said that I agree that the OP’s usage within a bind override looks convoluted.

Jonathan
_______________________________________________

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: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
      • From: Quincey Morris <email@hidden>
References: 
 >removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Sean McBride <email@hidden>)
 >Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Quincey Morris <email@hidden>)
 >Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Sean McBride <email@hidden>)
 >Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Quincey Morris <email@hidden>)
 >Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Sean McBride <email@hidden>)
 >Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?! (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
  • Next by Date: Re: Cocoa GUI app getting slower on MacPro or MacMini when disconnecting all screens
  • Previous by thread: Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
  • Next by thread: Re: removeObserver:forKeyPath:context: fails; but removeObserver:forKeyPath: works?!
  • Index(es):
    • Date
    • Thread