I have a NSOutlineView bound to a NSTreeController in class mode(i.e. each
NSTreeNode represents my Node object). Everything up to now is working fine.
I am trying to remove a single node in the outline view by calling [outlineView
remove:self] as a test. The documents are pretty simple and they state that
the remove: method removes the selected item, simple enough. I've put some
test code around the remove. The test code is looking at the selected node
Before the remove then looking at the selected node again(assuming the
controller picked a new selection). The before and after are the same which is
also reflected in the UI. I verified this in the debugger. Here's the snippet.
...
NSArray * selectedObjects = [outlineController selectedObjects];
// Only selecting one node for the test, it should be at index 0.
Node * node = [selectedObjects objectAtIndex:0];
NSIndexPath * paths = [outlineController selectionIndexPath];
[outlineController remove:self];
selectedObjects = [outlineController selectedObjects];
node = [selectedObjects objectAtIndex:0];
paths = [outlineController selectionIndexPath];
The canRemove binding which is hooked up to the menu item, is working(Menu Item
is enabled). Is there some setting I am completely overlooking. Searching has
come up empty handed.
TIA,
-Tony
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]