Re: NSTreeController - please help, can't see the forest for the tree controller
Re: NSTreeController - please help, can't see the forest for the tree controller
- Subject: Re: NSTreeController - please help, can't see the forest for the tree controller
- From: Michael McCracken <email@hidden>
- Date: Wed, 22 Jun 2005 14:02:32 -0700
Not the definitive answers, but HTH:
On 6/22/05, Keith Blount <email@hidden> wrote:
> Hmm, having played with this I've made a miniscule
> amount of headway, but it's been more headache than
> headway mostly... If anyone has any ideas on how to
> address the following issues when using
> NSTreeController bound to an NSOutlineView, I would be
> very grateful:
>
> 1) There is no addLeaf: method in NSTreeController, so
> how can I set it up so that I have two buttons, an Add
> Folder button that initiates child objects with their
> leaf key path (an isLeaf BOOL in my model) set to NO,
> and an Add Leaf button that initiates child objects
> with the leaf key path set to YES?
It sounds like you'd want to subclass nstreecontroller and provide
those actions.
In the methods you provide, create your entity and set the leaf
keypath to the appropriate value.
> 2) How do I save the state of the expanded items in my
> outline view, given that the outline view's datasource
> methods are rendered useless by NSTreeController
> sending proxy objects to them? Obviously, I don't want
> to save the state of the expanded items into my actual
> file - I want exactly the same behaviour I would get
> if I could use -outlineView:persistentObjectForItem:
> and
> -outlineView:itemForPersistentObject:.
I'm less sure about this one, but I'm not sure why proxy objects are a
problem here.
Why can't you get the data you want from the proxy object?
-mike
> Many thanks,
> Keith
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> 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
>
--
Michael McCracken
UCSD CSE PhD Student
San Diego Supercomputer Center
http://www.cse.ucsd.edu/~mmccrack/
_______________________________________________
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