• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Newbie] mem errors cont.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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.

  • Follow-Ups:
    • Re: [Newbie] mem errors cont.
      • From: Danny Swarzman <email@hidden>
    • Re: [Newbie] mem errors cont.
      • From: Thomas Deniau <email@hidden>
  • Prev by Date: Re: To add or not to add libraries
  • Next by Date: Re: NSScanner problem...
  • Previous by thread: Re: To add or not to add libraries
  • Next by thread: Re: [Newbie] mem errors cont.
  • Index(es):
    • Date
    • Thread