• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why would NSTreeController ignores remove:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Should I retain/release IBOutlet?
  • Next by Date: Re: Undefined symbols error in deployment build
  • Previous by thread: Re: Re: Should I retain/release IBOutlet?
  • Next by thread: VideoView rendering [was Double click in QTMovieView]
  • Index(es):
    • Date
    • Thread