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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to