Re: NSMutableString, NSMutableAray, scrambled
Re: NSMutableString, NSMutableAray, scrambled
- Subject: Re: NSMutableString, NSMutableAray, scrambled
- From: Enrique Zamudio <email@hidden>
- Date: Fri, 13 Jul 2001 12:31:26 -0500
- Organization: Nasoft
If you have tempString declared as a NSMutableString but you assign a
NSString to it, then it's a NSString object, no matter how it's
declared.
when you create strings using @"this", you're creating immutable
NSStrings.
So, you would have to change this:
[scrambledPlayStringArray insertObject: @"sunshineandcocoa" atIndex:0];
to this:
[scrambledPlayStringArray insertObject: [[@"sunshineandcocoa"
mutableCopy] autorelease] atIndex:0];
and then when you assign the objectAtIndex:0 of scrambledPlayString to
tempString, you will be able to delete characters from it.
eZL