Why would NSTreeController ignores remove:?
Why would NSTreeController ignores remove:?
- Subject: Why would NSTreeController ignores remove:?
- From: Gabriele de Simone <email@hidden>
- Date: Sat, 13 May 2006 17:55:35 -0400
While coding my first app that uses an NSOutlineView bound to an
NSTreeController (not using CoreData), I noticed that sending the
remote: message to my NSTreeController would not remove any selected
objects from the NSTreeController/NSOutlineView. I double checked
that my outline view's selectionIndexPaths key was bound to the
NSTreeController's, then tried the following:
NSArray* indexPaths = [_myTreeController selectionIndexPaths];
[_myTreeController removeObjectsAtArrangedObjectIndexPaths:indexPaths];
which incidentally works. What I don't understand is: shouldn't
[NSTreeController remove:] be doing exactly the same thing?
Regardless of the above workaround, I also noticed that the
"canRemove" key in the NSTreeController never returns YES, no matter
how many objects are selected. Am I doing anything wrong?
Thanks
Gabriele
_______________________________________________
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