Appending Strings to NSMutableString
Posted
by Typeoneerror
on Stack Overflow
See other posts from Stack Overflow
or by Typeoneerror
Published on 2010-04-01T05:56:54Z
Indexed on
2010/04/01
6:03 UTC
Read the original article
Hit count: 425
objective-c
|nsmutablestring
Been looking at this for a bit now and not understanding why this simple bit of code is throwing an error. Shortened for brevity:
NSMutableString *output;
...
@property (nonatomic, retain) NSMutableString *output;
...
@synthesize output;
...
// logs "output start" as expected
output = [NSMutableString stringWithString:@"output start"];
NSLog(@"%@", output);
...
// error happens here
[output appendString:@"doing roll for player"];
Can anyone spot my mistake?
© Stack Overflow or respective owner