一直在尋找這一點,而不理解爲什麼這個簡單的代碼會拋出一個錯誤。爲簡潔起見縮短:將字符串附加到NSMutableString
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"];
任何人都可以發現我的錯誤嗎?
什麼是確切的錯誤? – outis 2010-04-01 06:09:15