Re: Bound NSTreeNode - Inserting Children
Re: Bound NSTreeNode - Inserting Children
- Subject: Re: Bound NSTreeNode - Inserting Children
- From: "Hamish Allan" <email@hidden>
- Date: Wed, 11 Jun 2008 21:36:05 +0100
On Wed, Jun 11, 2008 at 8:50 PM, Robert Sesek <email@hidden> wrote:
> I have no other ideas for how to get this to work. Basically, the tree
> displayed is incomplete, and as the user expands the tree, data is fetched
> from a server and then inserted beneath a node.
Do you really want to add them to the tree as the user expands it, or
do you just want to fetch them when the controller asks the model for
them?
Here is a sample project which uses NSTreeController to present the
filesystem through an NSBrowser. (I wrote it to demonstrate some bugs
in NSBrowser bindings in Tiger, which have since been fixed.) Of
course, I do not pre-populate some model object with the whole
filesystem; instead, the code just fetches directory contents as and
when they are needed. This sounds akin to what you need; hope it is
useful.
http://igor.gold.ac.uk/~map01ra/assorted/NSBrowserBugWorkarounds.zip
Hamish
_______________________________________________
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