Re: Bug with NSTreeController
Re: Bug with NSTreeController
- Subject: Re: Bug with NSTreeController
- From: "Pierce T.Wetter III" <email@hidden>
- Date: Mon, 13 Mar 2006 09:39:00 -0700
Personally, I had to give up on NSTreeController and NSOutlineView so
I'm now faking it with NSArrayController/NSTableView.
The problem I kept running into was that the NSTreeController/
NSOutlineView really doesn't like it if the underlying tree structure
changes overly much. The problem seems to be that it has too much
stuff cached with no way to invalidate the cache. And since
NSTreeController is "opaque", that all makes it even more complicated.
A whole set of weird bugs in Frictionless (http://
www.twinforces.com) went away when I got rid of the two in favor of
an NSOutlineView "emulation" done with NSTableView.
Of course, now I have new weird bugs but it doesn't crash now.
So this doesn't necessarily answer your question, its just my
comment that you may have to give up on the combo. Perhaps others
have similar or different opinions, but I've gathered from reading
the archives that everyone ignores NSOutlineView/NSTreeController
questions.
On the other hand, it works fine if your structure doesn't change
much.
An aside:
Sometimes I think that they made a very weird decision with all
this controller stuff in that rather then bind
controller.managedObjects to "rows" in NSTableView, and then bind to
row.value in NSTableColumn you instead shove all the values down the
NSTableColumn instead.
Yet all the examples I've seen of this stuff either rely on
"observedObject" in NSTreeController to move between the item object
and the underlying object, or rely on [[arrayController
arrangedObjects] objectAtIndex: row] being a 1-1 mapping from the
table to the array.
Pierce
_______________________________________________
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