• 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: CharacterAtIndex method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CharacterAtIndex method?


  • Subject: Re: CharacterAtIndex method?
  • From: Kevin Gessner <email@hidden>
  • Date: Mon, 22 Dec 2008 14:41:38 -0500

On Dec 22, 2008, at 2:22 PM, Richard S. French wrote:

I am receiving a compiler warning: “NSString may not respond to
–characterAtIndex” from the following code.
This is from MathPaper – Chapter 12 of Building Cocoa Apps. Any help is
appreciated.
Thanks.


- (void)appendString:(NSString *)string
{
   int i;

   for (i=0;i<[string length];i++) {
       unichar c = [string characterAtindex:i];

[snip]

Watch your capitalization: you've got "characterAtindex:", but the selector is "characterAtIndex:".


HTH,
-- Kevin

Kevin Gessner
http://kevingessner.com
email@hidden







_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >CharacterAtIndex method? (From: "Richard S. French" <email@hidden>)

  • Prev by Date: Re: NSCalendar/NSDate - generating all months/days in a year
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 2191
  • Previous by thread: CharacterAtIndex method?
  • Next by thread: Re: Cocoa-dev Digest, Vol 5, Issue 2191
  • Index(es):
    • Date
    • Thread