• 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
Using canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:


  • Subject: Using canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:
  • From: Peter Lennie <email@hidden>
  • Date: Tue, 7 Jan 2003 20:30:19 -0500

My application uses NSDocument to manage multiple documents each of
which can have multiple windows. In managing closing and saving I am
using the recommended

canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:

The Cocoa documentation is opaque on how one should handle the
shouldCloseSelector. When I close a document by closing its last
window, my override of canCloseDocumentWithDelegate... is called with
a private Cocoa selector that I need to override (by substituting a
selector of my own) to get the method to work, but if I (implicitly)
close all open documents during application termination,
canCloseDocumentWithDelegate... is called with a private selector
that I must not override, or the application terminates abnormally.
All this makes me think I'm not using the method correctly. Can
anyone help with an example of its correct use?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Working with 32-bit Unicode (NSString stringWithUTF32String: (const UTF32Char *) bytes needed)
  • Next by Date: Re: Aqua Human Interface and Safari
  • Previous by thread: Re: Auto-Shrinking Window 'Feature'?
  • Next by thread: Re: WebCore Framework
  • Index(es):
    • Date
    • Thread