• 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: Andreas Monitzer <email@hidden>
  • Date: Fri, 13 Jul 2001 19:17:02 +0200

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

My problem is if I implement this idea in cocoa, I stumble against the
conversion issue between NSArray and NSString

The assignment is made with statement

drawCharacterOfString =[scrambledRound1PlayStringArray
objectAtIndex:10];

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.

But I don't know why?

characterAtIndex: returns (surprise, surprise) a char (well, unichar, but that doesn't matter in this case). I guess you're trying to save it into a char*, which doesn't work, even in C++.

unichar drawCharacter=[drawCharacterOfString characterAtIndex: i];


andy
--
Description forthcoming.


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: Auto-opening a Drawer
  • Next by Date: Re: NSMutableString, NSMutableArray, scrambledString
  • Previous by thread: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • Next by thread: Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • Index(es):
    • Date
    • Thread