Trivial NSTreeController bug: removing leaf nodes with no siblings?
Trivial NSTreeController bug: removing leaf nodes with no siblings?
- Subject: Trivial NSTreeController bug: removing leaf nodes with no siblings?
- From: "Doug Knowles" <email@hidden>
- Date: Sun, 23 Jul 2006 15:34:06 -0400
Hi again,
I was trying to set up a simple sample project to illustrate what I
thought was an NSTreeController bug, and it turns out to be even
simpler than I thought. (I thought variable-height rows were
involved, but apparently not.)
A sample project exhibiting the bug is at:
http://homepage.mac.com/dougknowles/CocoaShare/FileSharing72.html
Succinctly: in my sample project, invoking
removeObjectAtArrangedObjectIndexPath: on a leaf node that never had
siblings triggers an error, apparently caused by an attempt to access
a released object.
The sample project sets up an outline view with a tree controller in
object mode; then sets the content to (an array containing the) root
node of an XML document. The object class for the NSTreeController is
NSXMLNode, and the child key path is NSXMLNode's "children".
To trigger the bug, it's necessary to try to remove the leaf node
("LeafD" in the sample) that was initialized with no siblings. If you
delete children of nodes with multiple children, the bug will not be
triggered, even when deleting the last remaining child.
This seems so trivial that I have to wonder if I'm soing something
wrong, although I gather that NSTreeController has earned a terrible
reputation...
I'll file a bug if I don't get corrected.
Thanks,
Doug K;
_______________________________________________
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