NSTreeController vs. representedObject
NSTreeController vs. representedObject
- Subject: NSTreeController vs. representedObject
- From: Murat Konar <email@hidden>
- Date: Fri, 25 May 2007 18:48:54 -0700
I'm playing with a design using bindings and an outline view with one
column.
My model objects are dictionaries, and I have an NSCell subclass that
renders a display depending on more than one value in my model
objects. So my cell needs access to the model object itself (i.e. the
dictionary), not just a value in the dictionary.
It seems like the way to do this is to bind my column's "value"
binding to my treecontroller's "arrangedObjects" and leave the
optional "Model Key Path" blank. I had hoped that my cell subclass
could then look at its "representedObject" and find a dictionary
there, but no dice: it's always nil. Must I resort to implementing
"outlineView:willDisplayCell:forTableColumn:item:" in my outline
view's delegate and setting the represented object there?
_murat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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