Close All Documents
Close All Documents
- Subject: Close All Documents
- From: Steve Mills <email@hidden>
- Date: Wed, 01 May 2013 14:03:49 -0500
Since this is no longer handled by the OS (probably in lieu of the silly new "quit when last doc is closed" behavior), is there a better way to handle it than what I have below?
-(void) documentController:(NSDocumentController*)documentController didReviewAll:(BOOL)didReviewAll contextInfo:(void*)contextInfo
{
UNUSED_VAR(contextInfo);
if(didReviewAll)
for(MusicDocument* doc in [documentController documents])
[doc close];
}
-(IBAction)closeAllDocuments:(id)sender
{
UNUSED_VAR(sender);
[self reviewUnsavedDocumentsWithAlertTitle:nil cancellable:YES delegate:self didReviewAllSelector:@selector(documentController:didReviewAll:contextInfo:) contextInfo:nil];
}
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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