Selecting an object of a NSArrayController
Selecting an object of a NSArrayController
- Subject: Selecting an object of a NSArrayController
- From: "Michael Varlik" <email@hidden>
- Date: Fri, 04 Jan 2008 20:32:30 +0100
Hi,
I have an NSArrayController which controles entities.
These entities have a boolean attribute and there is
exactly one entitie where this attribute is YES, all
the others are NO. When I want to select the one entity
with the attribute set to YES, I iterate through the
NSArrayController's arrangedObjects and when I find
the entity, I call setSelectionIndex to the index of
the object within arrangedObjects.
This works pretty good, but I wonder if there is a more
convenient way to perform this, something like
"selectObjectWithValueForKey". Is there a way to do
this?
Many thanks in advance,
Michael
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
_______________________________________________
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