Re: CharacterAtIndex method?
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