Re: combo box and objects?
Re: combo box and objects?
- Subject: Re: combo box and objects?
- From: T Reaves <email@hidden>
- Date: Thu, 2 Jun 2005 22:08:02 -0400
On Jun 2, 2005, at 4:51 PM, Steven Kramer wrote:
Op 31-mei-05 om 22:57 heeft Timothy Reaves het volgende geschreven:
Does anyone have an extention to the NSComboBox that allows
values of
objects to be selected, instead of just strings? I'd really like to
bind the content of a combo box to an array controller, and have the
selection be the object the display string is for, not just the
string.
Bindings already does this for you, using the contentObjects and
contentValues bindings. Where the latter is used as the display
value, naturellement.
If you're doing this by hand (I mean using a datasource), search
the docs for an article "Providing Data for a Combo Box". You need
an NSFormatter.
Regards,
Steven Kramer
When I do that, and I click the combo box, I get [MyClass
copyWithZone:]: selector not recognized' exceptions. It's bound to
an NSArrayController fronting a CoreData object. That error is -
it's my understanding - indicative of a message sent an object that
has been released. As it's a core data object, I'm not sure what's
going on.
When I set it up to use a datasource, and do all the work in
code, it works fine. I just can't seem to get it to work with bindings.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden