Re: Custom NSCell and Bindings
Re: Custom NSCell and Bindings
- Subject: Re: Custom NSCell and Bindings
- From: Sean McBride <email@hidden>
- Date: Tue, 28 Jun 2011 16:11:30 -0400
- Organization: Rogue Research Inc.
On Fri, 24 Jun 2011 09:33:38 -0400, Carter R. Harrison said:
>It's a pretty typical situation. I've got my model objects stored in an
>NSSet. An NSArrayController that is bound to the NSSet. And then an
>NSTableView with one NSTableColumn bound to the arrangedObjects.name
>property of the NSArrayController. It works great. Now I've introduced
>a custom NSCell object into the NSTableView. The custom cell displays a
>title, a subtitle, and a status image - all of which I want to be able
>to bind to 3 separate properties of the model object. How do I do
>this? Right now with the 'value' binding bound to the
>arrangedObjects.name property, on the title of my custom cell updates
>when the model updates. If the subtitle or status update in the model
>object the cell does not update. Any help is greatly appreciated.
Basically, you can't. :(
The table column has only one value binding, so can only be bound to one thing, not many. You could change your model to have one property that is an amalgamation of your title, subtitle, and image and bind to that.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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