Re: NSTreeController, NSBrowser image setting
Re: NSTreeController, NSBrowser image setting
- Subject: Re: NSTreeController, NSBrowser image setting
- From: Ken Thomases <email@hidden>
- Date: Tue, 23 Mar 2010 21:33:44 -0500
On Mar 23, 2010, at 9:22 PM, Tony Romano wrote:
> I'm using a NSTreeController and bindings to contain the data for a NSBrowser. Data from my objects is being displayed fine. I want to add an image to the entries in the browser. From what I gather, I need to implement the willDisplayCell delegate method. The question I have is how do I get MY object stored for the node being displayed. The documents state you cannot use the itemAt* methods if you did not use a data source, which I didn't. I did find on the Internet someone else who had a similar problem and the solution they found was call this method [item representedObject]. It's not clear what the receiver 'item' is.
NSTreeController uses its own objects as the items. In Leopard and later, they are NSTreeNode instances. Prior to that, they were completely opaque objects.
See <http://developer.apple.com/mac/library/releasenotes/Cocoa/AppKitOlderNotes.html#NSTreeController>.
Regards,
Ken
_______________________________________________
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