Re: Handling Undo/Redo in KVC To-Many Accessors
Re: Handling Undo/Redo in KVC To-Many Accessors
- Subject: Re: Handling Undo/Redo in KVC To-Many Accessors
- From: Ashley Clark <email@hidden>
- Date: Thu, 27 May 2004 20:54:54 -0500
On May 11, 2004, at 10:16 AM, Allan Odgaard wrote:
>
On 7. May 2004, at 19:39, Sean Todd wrote:
>
>
> [...] I am having trouble and I haven't found anything in the
>
> archives addressing this issue. When I try to Undo the creation of a
>
> new object in a mutable array I sometimes get errors such as:
>
>
>
> *** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)
>
>
I seem to recall a few posts from people complaining that when
>
removing the last entry of an array under the control of an array
>
controller which have that last item selected, it will spew out such
>
an "beyond bounds" error -- but I have not looked into it myself...
It's covered in Aaron Hillegass' book (2nd ed.) It doesn't give a
reason on the page, but p.127 says to uncheck the "Preserves selection"
checkbox of the NSArrayController. By doing that, the beyond bounds
errors I've been getting have disappeared.
Ashley Clark
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.