This makes no sense to me. Maybe someone here can explain why this happens.
I've got an NSMutableString that I alloc at the top of my iPhone app, then append to later in the process. It results in a SIGABRT, which doesn't add up to me. Here's the code:
Header File (simplified):
@interface MyAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
NSMutableString *locationErrorMessage;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, copy) NSMutableString *locationErrorMessage;
@end
And the relevant parts of the Main:
@implementation MyAppDelegate
@synthesize window;
@synthesize locationErrorMessage;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
self.locationErrorMessage = [[NSMutableString alloc] init];
}
- (void)anotherFunction {
[self.locationErrorMessage appendString: @"Blah Blah Blah"];
}
This all seems simple enough. What am I missing?