• 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: NSMutableString, NSMutableAray, scrambled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSMutableString, NSMutableArray, scrambledString
  • Next by Date: Re: NSString, NSArray, get the characters of one of the NSString in an Array of NSStrings?
  • Previous by thread: NSMutableString, NSMutableAray, scrambled
  • Next by thread: how to disable drawing of subviews
  • Index(es):
    • Date
    • Thread