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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to