Re: Total newbie struggling with NSMutableArray
Re: Total newbie struggling with NSMutableArray
- Subject: Re: Total newbie struggling with NSMutableArray
- From: Harilaos Skiadas <email@hidden>
- Date: Fri, 25 Feb 2005 06:54:51 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
> - (IBAction)surName:(id)sender
> {
> [array addObject:@"hopkins"];
> [display setStringValue:[array objectsAtIndex:1]];
> }
>
> @end
In case this isn't a typo, you probably want
objectAtIndex in the above part, not objectsAtIndex.
Of course, allocating the array is the main problem,
since otherwise you would be seeing a message saying
that NSMutableArray doesn't respond to selector
objectsAtIndex:. Since you are not seeing this
message, it means, as others already pointed out, that
you have nil instead of array over there when the
thing actually runs, since you never allocated and
inited the array.
HTH,
Haris
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden