Re: NSPopUpButtonCell bindings help
Re: NSPopUpButtonCell bindings help
- Subject: Re: NSPopUpButtonCell bindings help
- From: Keary Suska <email@hidden>
- Date: Tue, 24 Apr 2007 11:43:26 -0600
- Thread-topic: NSPopUpButtonCell bindings help
on 4/23/07 8:13 PM, email@hidden purportedly said:
> content - arrangedObjects.nextDate (running through a transformer to
> get an array of dictionaries with two keys - val and display)
> contentObjects - arrangedObjects.nextDate.val
> contentValues - arrangedObjects.nextDate.display
> selectedObject - arrangedObjects.repeats
A common issue that seems to be the source of most popupbutton binding
issues, is that the object acquired from the selectedObject binding must
exist in the object array acquired from the content or contentObjects
binding. That is, the *exact same object*, not just an equivalent object.
Additionally, the selectedObject object must be KVC compliant for the key
used in a contentValues binding, as you have noticed. If you meet the first
criteria, the second usually follows. In your case, bindings expect
"repeats" to be a "nextDate".
Depending on how your transformer works, you might be able to just use it on
the selectedObject binding. Your transformer will need to be reversible,
however.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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