Using canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:
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.