• 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
Re: Total newbie struggling with NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Total newbie struggling with NSMutableArray
      • From: John Hopkins <email@hidden>
  • Prev by Date: Re: How to know a file is writeable?
  • Next by Date: Re: Total newbie struggling with NSMutableArray
  • Previous by thread: Re: Total newbie struggling with NSMutableArray
  • Next by thread: Re: Total newbie struggling with NSMutableArray
  • Index(es):
    • Date
    • Thread