Re: Reading individual bytes from a string
Re: Reading individual bytes from a string
- Subject: Re: Reading individual bytes from a string
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 17 Apr 2006 11:47:31 -0600
On Apr 17, 2006, at 11:02 AM, Phil Faber wrote:
// Place character 8 from the file into statusText - THIS
LINE FAILS!
[statusText setStringValue:[fileContents characterAtIndex:8]];
Assuming statusText is an NSTextField, you are trying to pass a
unichar into a method requiring an NSString. If fileContents is an
NSString, and you want a partial NSString, then you should use -
substringWithRange: and NSMakeRange() instead.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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