Re: newbie question: unsigned index
Re: newbie question: unsigned index
- Subject: Re: newbie question: unsigned index
- From: "Laurent Daudelin" <email@hidden>
- Date: Thu, 23 Oct 2003 15:37:24 -0400
>
From: "Eivind Andersen" <email@hidden>
>
Date: Thu, 23 Oct 2003 18:04:14 +0200
>
To: email@hidden
>
Subject: newbie question: unsigned index
>
>
Hi,
>
>
Sorry to bug you with these really basic questions, but I don't know
>
what to do. Here goes:
>
>
I want to get out all the objects from an array (not all at once, so I
>
use notifications say when the next object should be fetched), using
>
the objectAtIndex method.
>
>
I have decleard "int index;" in the header-file and try to run the
>
following:
>
>
- (void)updateNextObject:(NSNotification *)note
>
{
>
if(index < [list count]){
>
id object;
>
object = [list objectAtIndex:buddyIndex];
>
index++;
>
// do something with object
>
}
>
>
But the applications quits due to signal 10 (SIGBUS). (What does that
>
mean?)
>
>
The documentation says that the objectAtIndex takes an unsigned
>
parameter. Is that where the problem lies?
>
I believe I got a compiler warning that said something about
>
objectAtIndex and casting, but now the warning has disappeared.
>
What is this 'buddyIndex' variable you're using and where do you initialize
it?
To force the compiler to recompile and give you the warning again, do a
clean, then a build.
-Laurent.
--
===========================================================================
Laurent Daudelin Developer, Multifamily, ESO, Fannie Mae
mailto:email@hidden Washington, DC, USA
************************* Usual disclaimers apply *************************
_______________________________________________
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.