Reputation: 2619
ich have a document based app which works under lion but not under mountain lion.
I have subclassed the AppDelegate to open a SavePanel on first app start, if no recent document is available to create a new named document. This is because the user should not work with an untitled document. So I changed the applicationShouldOpenUntitledFile to call my Method doSaveAs when no recentDocumentURL its found.
- (BOOL)doSaveAs
{
NSLog(@"doSaveAs");
NSSavePanel *tvarNSSavePanelObj = [NSSavePanel savePanel];
NSUInteger tvarInt = [tvarNSSavePanelObj runModal];
Under ML it crashes without any console output. The crash appears in Thread 8 "Quicklook.pluginload" if that helps?
Can anyone help me ?
Regards
Claus
Upvotes: 6
Views: 634
Reputation: 1827
I had this problem too. The thing is, it's not a crash, it's a C++ exception that Apple left in there, and the Xcode debugger is hitting an exception breakpoint.
What you need to do is change your exception breakpoint from All Exceptions to just All Objective-C Exceptions.
This appears in the Breakpoints tab on the left in Xcode.
Upvotes: 9
Reputation: 14003
You're probably not opening the dialog on the main thread. Move the code or use performSelectorOnMainThread
.
Upvotes: 0