For some reason calling an NSPathControl object in a thread is causing crashes.
- (IBAction) action5:(id)sender {
[outlet_NSPathControl1 setURL: [NSURL fileURLWithPath: @"/Users/admin/"]]; // Works fine here
[self performSelectorInBackground:@selector(background1) withObject:self]; // Jump to the thread
}
-(void) background1 {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[outlet_NSButton1 setTitle: [NSString stringWithFormat: @"%d", index]];
[outlet_NSPathControl1 setURL:[NSURL fileURLWithPath: @"/Users/admin/"]]; // Crashes here
[pool drain];
}