Re: Why does this keep sending EXC_BAD_ACCESS
Re: Why does this keep sending EXC_BAD_ACCESS
- Subject: Re: Why does this keep sending EXC_BAD_ACCESS
- From: April Gendill <email@hidden>
- Date: Tue, 30 Mar 2004 12:14:57 -0700
It means that your array is uninitalized.
Make sure that if the array is global it is declared some where in the
header or above the implementation line in the class file.
NSMutableArray * serverWindows;
then in your init method:
serverWindows = [[NSMutableArray alloc]init];
If you are transfering data from a static array:
serverWindows = [[NSMutableArray alloc]initWithArray:otherArray];
or
[serverWindows setArray:otherArray];
Either way you have to make sure the array is initialized. Thats why it
crashed at the NSLog line when you added it.
April.
On Mar 30, 2004, at 10:33 AM, Angel Caban wrote:
Hello,
Thank you for your suggestion.
I added the line but the program ended up crashing
on the NSLog line instead. But thank you for taking
the time to suggest that to me.
On Mar 30, 2004, at 12:27 PM, April Gendill wrote:
NSLog(@"Server windows count: %i",[serverWindows count]);
--
Angel Caban
_______________________________________________
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.