• 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: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?


  • Subject: Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 13 Jul 2001 10:45:28 -0700

On Friday, July 13, 2001, at 09:27 AM, Michel Haver wrote:

The compiler accepts that, but if I try to use the follwing statement
drawString = [ drawCharacterOfString characterAtIndex : i ];

I get a warning:

assignment makes pointer from integer without a cast

and my application quits.

Because characterAtIndex: returns a unichar, not an NSString *. Try using substringWithRange:NSMakeRange(i, 1) instead.

Douglas Davidson


  • Follow-Ups:
    • NSPopUpButton Problem
      • From: Mark T <email@hidden>
References: 
 >NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings? (From: Michel Haver <email@hidden>)

  • Prev by Date: Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • Next by Date: NSPopUpButton Problem
  • Previous by thread: Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • Next by thread: NSPopUpButton Problem
  • Index(es):
    • Date
    • Thread