Re: Please explain this error message...
Re: Please explain this error message...
- Subject: Re: Please explain this error message...
- From: email@hidden
- Date: Wed, 20 Feb 2002 18:15:48 -0800
I'm dealing with NS(Mutable)Arrays and NS(Mutable)Dictionaries just to
teach
me in Cocoa. Now I'm running into trouble since my small address book
app
(which compiles fine) claims an error message while running.
Could someone enlight me what this message means?
-[NSCFArray objectAtIndex:]: index (1) beyond bounds (1)
It means you tried to access the element at index 1 in some array, but
the array has only one element (the one at index 0). You may just be
running off the end of your array, or you may be confused about the fact
that in Foundation, array classes begin with element 0, not element 1
the way arrays do in Pascal and perhaps other languages.
If you can figure out (or already know) how to add a breakpoint on
-[NSException raise] in the debugger, you can break on the spot where
this is occurring in your code, since Foundation raises an exception in
this situation. Having a breakpoint on raise is generally a useful
thing.
Good luck...
Ben Haller
Stick Software
_______________________________________________
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.