custom view binding to NSTreeController
custom view binding to NSTreeController
- Subject: custom view binding to NSTreeController
- From: Matthew Johnson <email@hidden>
- Date: Tue, 02 Dec 2008 19:51:48 -0600
I am creating a custom view which I would like to bind to
NSTreeController. I have tried observing both [treeController
arrangedObjects] and [[treeController arrangedObjects] childNodes].
Both seem to only notify that a change has occurred and do not provide
any details about the change (insertion, removal, etc). If this is
the case, you would have to walk the entire tree every time a change
happens in order to detect changes. This seems like a pretty bad
idea. There must be a better way to do this.
I am hoping somebody can share an example of how to implement the
observation necessary to create a custom view that binds to
NSTreeController. Does anybody have sample code? Is anyone able to
provide a high level idea of how NSOutlineView and NSBrowser do this?
Is it even possible to do this efficiently with public API?
Thanks,
Matthew
_______________________________________________
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