Re: populate a custom sub-class with data from bindings - SOLVED
Re: populate a custom sub-class with data from bindings - SOLVED
- Subject: Re: populate a custom sub-class with data from bindings - SOLVED
- From: "Adam Gerson" <email@hidden>
- Date: Fri, 21 Mar 2008 19:20:54 -0400
The answer in my case was to first impliment some NSOutlineView
extenssions so that I could actually access the objects stored in the
tree. These can be found at:
http://homepage.mac.com/matthol2/cocoa/page2/page2.html
Then I implemented the NSOutlineView delegate method
- (void)outlineView:(NSOutlineView *)outlineView
willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
to update the values in the custom cell from the data in my item.
On Wed, Mar 19, 2008 at 7:05 PM, Adam Gerson <email@hidden> wrote:
> I want to use the custom Apple subclass ImageAndTextCell.h in my
> NSOutlineView. How would I hook up the Text and Images used by this
> custom sub-class to a TreeController's data? The "value" binding
> already populates the text of the cell. Is there away for me to add a
> second binding to the sub-class and set it programatically? Then with
> a ValueTransformer I could populate the NSImage as well.
>
> I am reading through "Cocoa Bindings Programming Topics"
>
> Thanks,
> Adam
>
_______________________________________________
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