[Newbie] mem errors cont.
[Newbie] mem errors cont.
- Subject: [Newbie] mem errors cont.
- From: Michael Hanna <email@hidden>
- Date: Sun, 3 Aug 2003 02:53:52 -0400
When the user clicks an IB button, this method gets called. Seems
whenever I reference an NSArray called lineArray I get a signal 10
error.
For instance here:
NSLog(@"lineArray count: %u", [lineArray count]);
and here:
for(i = 0 ; i < [lineArray count] ; i++)
{
[....]
}
this is valid cocoa code right? This is driving me a little cuckoo..
Michael
////////
//CODE//
- (IBAction)generate:(id)sender
{
int i;
int phraseNum = -1;
//int lineCount;
//int randIndex; // index of random phrase
NSString *tokenString = @"%s";
NSString *theLine;
NSLog(@"got here 1"); // will print this
NSLog(@"lineArray count: %u", [lineArray count]); // signal 10
here!(?)
NSLog(@"got here 2"); // won't print this
// a for-loop for each line in lineArray
for(i = 0 ; i < [lineArray count] ; i++) // signal 10 on this
line too
{
// copy over the line at index to the line NSString
NSLog(@"entered for"); // never gets here
/*... continues... */
... }
//CODE//
////////
_______________________________________________
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.