Once again, a property problem_

Hello,

I have subclassed a NSArrayController but simply can’t get the properties out of it.

I want to return a formatted string into a property variable, to get the selection index+1 (as the index is zero-based) and the count of the arranged objects of the controller into a bound textField, with format:

nn : mmm (where nn is the selectionIndex and mmm the count.

No way. I must be just too tired.

@property (nonatomic) NSUInteger realIndex; // (.h file)
.
In .m file :

-(NSUInteger) realIndex {
NSLog(@“SelectionIndex %ld”,[self selectionIndex]); // selectionIndex returns “NSNotFound”, but of course there IS a selection.
return [self selectionIndex]+1; // and of course a negative number is returned.
}
Why is the selectionIndex equal to NSNotFound? It I use:

BOOL ignore = [self setSelectionIndex:0];

the index is set properly (the first item gets selected)

What an I missing? I cannot use “retain” for a non-object property. Is it lost somewhere? I don’t understand.

Can you help me?