Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
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.