Re: NSArrayController selectedObjects
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