【发布时间】:2010-04-01 05:56:54
【问题描述】:
现在看了一会儿,不明白为什么这个简单的代码会引发错误。为简洁起见缩短:
NSMutableString *output;
...
@property (nonatomic, retain) NSMutableString *output;
...
@synthesize output;
...
// logs "output start" as expected
output = [NSMutableString stringWithCapacity:0];
[output appendString:@"output start"];
NSLog(@"%@", output);
...
// error happens here
// this is later on in a different method
[output appendString:@"doing roll for player"];
谁能看出我的错误?
【问题讨论】:
-
确切的错误是什么?
标签: objective-c nsmutablestring