• 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: Keys dependent on NSArrayController's selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keys dependent on NSArrayController's selection


  • Subject: Re: Keys dependent on NSArrayController's selection
  • From: Dave Dribin <email@hidden>
  • Date: Thu, 8 May 2008 01:53:01 -0500

On May 7, 2008, at 6:58 PM, Sean McBride wrote:
Have you put a breakpoint in 'canEnableButton'? When
'peopleController.selectionIndexes' changes, do you hit the breakpoint?
I suspect not.

Nope. Well, it does get called once at app startup, but not as the selection changes.


The docs for keyPathsForValuesAffectingValueForKey say
keyPaths are ok, but mmalc has mentioned on this list "provided that the
path doesn't include to-many relationships". This appears to be true in
your case, so probably explains it. The docs don't mention this
caveat. :(

I don't believe this falls under the to-many case. That would be doing something like observing "arrangedObjects.firstName" to watch when any first name in the array changes. That is not supported. You have to observer every object in the array. For kicks, I did try "peopleController.selectionIndex" as well as "peopleController.selectedObjects" to no avail.


Also, I seem to remember reading that doing willChange/didChange back-to-
back without actually changing anything is a no-no. You might check the
archives to confirm my shoddy memory.

Unfortunately, my search foo must be weak. Searching on {will/ did}ChangeValueForKey turns up way to many hits.


-Dave

_______________________________________________

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: Keys dependent on NSArrayController's selection
      • From: "Sean McBride" <email@hidden>
References: 
 >Keys dependent on NSArrayController's selection (From: Dave Dribin <email@hidden>)
 >Re: Keys dependent on NSArrayController's selection (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Threading - How its done?
  • Next by Date: Re: setting frequency using CoreAudio (like iTunes - Equalizer )
  • Previous by thread: Re: Keys dependent on NSArrayController's selection
  • Next by thread: Re: Keys dependent on NSArrayController's selection
  • Index(es):
    • Date
    • Thread