• 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
Re: NSArrayController selectedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController selectedObjects


  • Subject: Re: NSArrayController selectedObjects
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 1 Apr 2010 15:52:45 -0600

On Apr 1, 2010, at 3:29 PM, Richard Somers wrote:

> NSArrayController's selectedObjects method returns an array containing the receiver’s selected objects. I also need an array containing the receiver's unselected objects. Is there an easy way to do that?

Probably. Did you try something like this: (written in Mail, untested but it ought to do what you need)

NSMutableArray *unselectedObjects = [[[controller arrangedObjects] mutableCopy] autorelease];

[unselectedObjects removeObjectsInArray:[controller selectedObjects]];

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >NSArrayController selectedObjects (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: Get all available shortcuts/hotkeys
  • Next by Date: Using the #import directive
  • Previous by thread: NSArrayController selectedObjects
  • Next by thread: Using the #import directive
  • Index(es):
    • Date
    • Thread