I recently switched to mac and I am trying to write my first mac program.
I have a problem with NSMutableString's
The code is much more complex but I've narrowed it down to this type of problem.
If I uncomment the line [testString appendString
"append worked!!];
and run setTestValue when I try to run sendTestValue the program crashes with "EXC_BAD_ACCESS"
Any ideas why?
I have a problem with NSMutableString's
The code is much more complex but I've narrowed it down to this type of problem.
Code:
NSMutableString* testString;
- (IBAction)sendTestValue:(id)sender{
[txt_value setStringValue:testString];
}
- (IBAction)setTestValue:(id)sender{
testString = @"test ";
//[testString appendString:@"append worked!!];
}
If I uncomment the line [testString appendString
and run setTestValue when I try to run sendTestValue the program crashes with "EXC_BAD_ACCESS"
Any ideas why?