FROM : Hamish Allan
DATE : Wed Jun 11 22:36:05 2008
On Wed, Jun 11, 2008 at 8:50 PM, Robert Sesek <<email_removed>> 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
DATE : Wed Jun 11 22:36:05 2008
On Wed, Jun 11, 2008 at 8:50 PM, Robert Sesek <<email_removed>> 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
| Related mails | Author | Date |
|---|---|---|
| Robert Sesek | Jun 11, 21:50 | |
| Hamish Allan | Jun 11, 22:36 |






Cocoa mail archive

