> currentSection = @"Some value";
has nothing to do with
> [currentSection setString:@"Some value"];
The first sets currentSection to a string, the second sets the content of
currentSection.
a) In the second line you just set the content but you never assigned an
NSMutableString to currentSection before. Therefore the call is ignored and
currentSection itself stays nil.
b) The first line should throw a warning as @"Some value" is not mutable. It is
an error.
atze
Am 03.02.2010 um 12:55 schrieb Philip Vallone:
> Hi List,
>
> This is probably a very elementary question. I have a NSMutableString that I
> Synthesize. When I assigned a value to it:
>
> currentSection = @"Some value";
>
> The retain count goes to 1
>
> However if I assign a value with
>
> [currentSection setString:@"Some value"];
>
> The retain count is still zero.
>
> Can someone explain the difference?
>
> Thanks,
>
> Phil
>
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/atze%40freeport.de
>
> This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]