• 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: Lion doesn't like tricky.key.paths in bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lion doesn't like tricky.key.paths in bindings?


  • Subject: Re: Lion doesn't like tricky.key.paths in bindings?
  • From: Charles Srstka <email@hidden>
  • Date: Fri, 29 Jul 2011 02:39:19 -0500

On Jul 28, 2011, at 9:42 PM, Kyle Sluder wrote:

> If you're not returning precisely the same NSString instance every
> time KVO thinks you should, then you are violating the rules and KVO
> has every right to complain.
>
> KVO doesn't do an -isEqual: on the result of your method. It does
> pointer equality. Something changed on Lion that causes it to now care
> that the return value of your method stays constant when it should.

Actually, on further thought, this can’t be true, can it? Plenty of methods built right into the frameworks create objects on the fly — call valueForKey: to retrieve a property that’s declared as an NSInteger, and you’ll get an NSNumber object that was created to wrap it. Send valueForKey: to an array, and you get a newly-created array containing the results of getting that property from each object in the array. Both of these times, you’re not going to have the same pointer on subsequent calls, and these work fine, so pointer discrepancies can’t be the cause of his problem.

Charles_______________________________________________

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: Lion doesn't like tricky.key.paths in bindings?
      • From: Kyle Sluder <email@hidden>
References: 
 >Lion doesn't like tricky.key.paths in bindings? (From: Jerry Krinock <email@hidden>)
 >Re: Lion doesn't like tricky.key.paths in bindings? (From: Clark Cox <email@hidden>)
 >Re: Lion doesn't like tricky.key.paths in bindings? (From: Jerry Krinock <email@hidden>)
 >Re: Lion doesn't like tricky.key.paths in bindings? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Lion doesn't like tricky.key.paths in bindings?
  • Next by Date: UIModalTransitionStylePartialCurl with UITabBarController
  • Previous by thread: Re: Lion doesn't like tricky.key.paths in bindings?
  • Next by thread: Re: Lion doesn't like tricky.key.paths in bindings?
  • Index(es):
    • Date
    • Thread