• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Close All Documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Close All Documents
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: Built-in Activity Types
  • Next by Date: Re: View Based TableView - how to use bindings?
  • Previous by thread: Re: View Based TableView - how to use bindings?
  • Next by thread: Re: Close All Documents
  • Index(es):
    • Date
    • Thread