Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question




On 1 Apr 2008, at 21:37, Bart Beulen wrote:
// Get seconds, float, Time index 1
sTimeFloat = [[sTime subStringWithRange:NSMakeRange(6,2)] floatValue];

When I compile this code I get the warning:
warning: 'NSString' may  not respond to '-subStringWithRange:'

I understand that there might be some variable type problem, but I cannot find out how to solve this? I ran into comparable problem multiple times before.

That is because NSString doesn't respond to the message 'subStringWithRange:'.

It does, however, respond to 'substringWithRange:'. That might be just what you're looking for. Remember that messages, just like everything else, are case sensitive.

Robert

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden

References: 
 >newbie question (From: Bart Beulen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.