In former AS Studio there was a command line to show an alert giving the user a chance to save, not save or cancel before closing an edited document (in particular with table views)
In AS Studio:
set modified of document of window "main" to true
I searched for an equivalent command in ASOC but without success.
I found some pieces which I can’t put together:
- (BOOL) hasEditedDocuments (in NSDocumentController)
- (BOOL) isDocumentEdited (in NSDocument)
- (void) canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: (in NSDocument)
The shouldCloseSelector shoult have the signature:
- (void) document: (NSDocument *) doc shouldClose:(BOOL) shouldClose contextInfo:(void *) contextInfo
Heiner