Re: Why would [NSArrayController setSelectionIndex] fail?
Re: Why would [NSArrayController setSelectionIndex] fail?
- Subject: Re: Why would [NSArrayController setSelectionIndex] fail?
- From: vincent habchi <email@hidden>
- Date: Thu, 28 Oct 2010 08:09:11 +0200
Le 28 oct. 2010 à 00:02, Keary Suska a écrit :
> On Oct 27, 2010, at 3:30 PM, vincent habchi wrote:
>
>> Small question: I have a NSArrayController managing a Core data entity array. I want to alter the selection via -setSelectionIndex, and it fails (the index won't change). The documentation is (also) rather terse on the possible causes for such a failure – I do no edition, I just want to pick up an entity through a dialog. Does someone have a little experience with these cases? Especially, how to dig up to the point responsible for the denial?
>
> Do you mean the method is returning NO, or you just don't notice a selection change? Note that if a table view is bound to the controller, its delegate must approve the selection change as well.
The method returns YES, so the selection should change. However, it does not. There is no table view in this case, just a pair of NSTextView whose value are bound to some ivars of the entity stored in the array. The array controller selection index is tied to the indexOfSelectedItem of a NSPopUp.
Thanks a lot,
Vincent_______________________________________________
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