applicationShouldTerminate gets called on with no edited documents
applicationShouldTerminate gets called on with no edited documents
- Subject: applicationShouldTerminate gets called on with no edited documents
- From: Brad Stone <email@hidden>
- Date: Fri, 11 Jun 2010 17:51:02 -0400
I have (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender in my app delegate and it gets called when the user quits if **no** documents have been edited (I'm using Core Data). If one of my documents **is** edited it doesn't get called. It goes right to - (void)closeAllDocumentsWithDelegate:(id)delegate didCloseAllSelector:(SEL)didCloseAllSelector contextInfo:(void *)contextInfo in my subclassed NSDocumentController.
I set up a breakpoint in my subclassed NSDocumentController at closeAllDocuments and I see this when I quit (assuming there's an edited document):
0 -[SRDocumentController closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:]
1 -[NSDocumentController(NSInternal)_shouldTerminateWithDelegate:shouldTerminateSelector:]
2 -[NSApplication _shouldTerminate]
3 -[NSApplication terminate:]
........
I want to have an opportunity to send an NSApplicationTerminateReply before closeAllDocumentsWithDelegate is called. If applicationShouldTerminate would get called like it does with no edited documents I would be in great shape.
Can anyone help me?_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden