NSDocument close notification
NSDocument close notification
- Subject: NSDocument close notification
- From: Bob Peterson <email@hidden>
- Date: Tue, 25 Feb 2003 12:05:50 -0500
I need a notification of imminent NSDocument closure, one which allows
the runloop to continue to run before actually doing the final close.
I have written an application which connects the user to a special
device. I chose to make it a document-based application, since the user
might (in theory) have more than one of these devices. Also the user
can open past dialogs with the device for read only purposes. In fact,
it is a lot like iChat over special hardware.
When an NSDocument is going to be closed I need to perform a handshake
to shut down the device connection, and include in the document any
final messages generated by that handshake. I've tried extending the
close method, but that doesn't work. Because of the nature of the
asynchronous communications my runloop has to keep functioning.
Should I roll my own document controller, subclass
NSDocumentController, or is there some notification I've overlooked?
_______________________________________________
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.