Skip navigation.
 
mlRe: Selecting an object of a NSArrayController
FROM : I. Savant
DATE : Fri Jan 04 21:21:17 2008

> 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.


  It'd be easier to make recommendations if you described your goal a
bit more broadly. What is this attribute used for? Why does selection
depend upon it? What makes the attribute "YES"? What mechanism do you
use to ensure only one entity instance has "YES" for the attribute?

--
I.S.

Related mailsAuthorDate
mlSelecting an object of a NSArrayController Michael Varlik Jan 4, 20:32
mlRe: Selecting an object of a NSArrayController Hank Heijink Jan 4, 20:41
mlRe: Selecting an object of a NSArrayController William Turner Jan 4, 20:52
mlRe: Selecting an object of a NSArrayController Michael Varlik Jan 4, 21:04
mlRe: Selecting an object of a NSArrayController I. Savant Jan 4, 21:21
mlRe: Selecting an object of a NSArrayController Michael Varlik Jan 4, 22:18