NSTreeController and Custom Views
NSTreeController and Custom Views
- Subject: NSTreeController and Custom Views
- From: Rob Keniger <email@hidden>
- Date: Thu, 30 Nov 2006 19:47:32 +1000
Hi all,
I'm trying to build a non-Core Data application that uses an
NSTreeController to populate a custom tree-like view (I can't use
NSOutlineView).
Unless I'm mistaken this appears to be very difficult to do without
using unsupported hackery. I've been using mmalcolm crawford's
excellent Graphics Bindings example as a starting point:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
This example uses an NSArrayController which is not suited to the
tree-like nature of my data. However, when I try to use an
NSTreeController instead, I get all sorts of problems because the
arrangedObjects keyPath returned from the controller is not a "real"
array, it is an opaque type that I cannot iterate. This makes it next
to impossible to set up all the observing necessary when binding.
Is it possible to do what I am doing? Has anyone done this? I have
searched CocoaDev, this list and Google in vain for some clues.
I really want to use bindings if at all possible since it would
vastly simplify the rest of my app.
Thanks for any help you might be able to offer.
- rob.keniger
_______________________________________________
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