Hi,
this probably sounds terribly stupid but apparently I can't find
this out on my own so here I am asking for help again:
I have a NSDocument subclass with a simple tree structure attached to
an NSOutlineView via NSTreeController and bindings. I learned -
through this list - to add items in KVO compliant way like this
TreeNode *node = [[TreeNode init] alloc];
[[self mutableArrayValueForKeyPath:@"treeContent"] addObject:node];
this works very well the NSOutlineView gets updated and displays the
structure I fill into my model.
The only thing that I can't seem to figure out is how to get to the
NSOutlineView's item for a specific node that was added. Say I want to
expand or collapse a specific node when it's added:
[myOutlineView expandItem:node];
does not work - I believe because it's the model's data object not the
item that represents it in the OutlineView (right?).
So how do I determine the outline item for a data node? I hope this
makes any sense at all. I feel like a bloody beginner.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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 [EMAIL PROTECTED]