• 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: Reading individual bytes from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Reading individual bytes from a string
      • From: Phil Faber <email@hidden>
References: 
 >Setting a custom NSImageCell (From: Jim Turner <email@hidden>)
 >Re: Setting a custom NSImageCell (From: Mike Abdullah <email@hidden>)
 >Reading individual bytes from a string (From: Phil Faber <email@hidden>)

  • Prev by Date: Re: Resolving a alias w/o mounting file systems
  • Next by Date: Re: Question on thread communication
  • Previous by thread: Reading individual bytes from a string
  • Next by thread: Re: Reading individual bytes from a string
  • Index(es):
    • Date
    • Thread