Re: NSOutlineView and NSTreeController
Re: NSOutlineView and NSTreeController
- Subject: Re: NSOutlineView and NSTreeController
- From: Milton Sagen <email@hidden>
- Date: Wed, 3 Aug 2005 17:36:41 -0700
First: email to you, Jacques, bounces.
Second: I don't see why you can't use an NSTreeController to manage a
NSOutlineView and a hierarchy of NSMutableArray's, looking at the
documentation that seems to be one of its purpose, but getting it set
up was easier read than done for me. In fact that's why I checked out
Corbin's suggestion of looking at the Spotlighter example.
Finally to get an idea of how to do this I went to Scott Stevenson's
Cocoa bindings article (http://www.cocoadevcentral.com/articles/
000080.php) and MailDemo example. In the example I changed it such
that mailboxes can have "sub" mailboxes, i.e. a mailbox object has a
NSMutableArray of mailboxes. Then I replaced the NSArrayController
for the mailboxes in his article with an NSTreeController and the
NSTableView for the mailboxes with an NSOutlineView. I still haven't
figured out all the details but I thought it was a good start. So I'd
look at Scott's article and just extend it. Hopefully that will also
help you. I'd be happy to share what I have but as I said there's
more to do, and I moved off on to something else before I could see
how well and how far I could carry the extension.
Milt
On Aug 03, 2005, at 15:14, Jacques Foucry wrote:
On 3 août 05, at 17:39, Corbin Dunn wrote:
Yes, my mistake! For some reason I thought that the Spotlighter
one did use it; but the other example is a good use case.
-corbin
On Aug 2, 2005, at 3:03 PM, Milton Sagen wrote:
Maybe I'm missing something but I don't see where this example
uses NSOutlineView's or NSTreeController's. An example that I
know does is CoreRecipes, however, its also uses CoreData so your
milage may vary.
Thanks.
In fact all the samples I saw show how to use NSTreeController with
CoreData, using managedObject.
I try to use NSTreeController and NSOutlineView to display a XML
tree. I can parse my XML file into a NSMutableArray and (may be I
misinterstood) I was thinking that NSTreeController could manage
the displaying of my NSMutableArray inside my NSOutlineView.
Jacques
--
Site web : <http://www.foucry.net>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden