FROM : Mark Alldritt
DATE : Wed Apr 13 00:17:15 2005
Hi All,
I need to intercept the document saving process (both via File/Save and
window close).
My application is an AppleScript IDE where the document may contain syntax
errors that prevent it from being saved. When this happens, I need to show
the error and offer to save the document in a textual format which allows
the errors to remain uncorrected.
I have a few other situations where I need to pre-flight saves. For
instance, if the user attempts to save over a running AppleScript applet, I
want to (a) warn the user, and (b) offer to the Quit the applet and continue
the save.
I've been looking at the
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: method, but
its not clear to me how to do what I want to do. Does anyone have any
suggestions or pointers to examples illustrating how to do this kind of
thing.
Thanks
-Mark
------------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 Script Debugger 3.0 - AppleScript IDE
WEB: http://www.latenightsw.com/ Affrus 1.0 - Perl Debugging
DATE : Wed Apr 13 00:17:15 2005
Hi All,
I need to intercept the document saving process (both via File/Save and
window close).
My application is an AppleScript IDE where the document may contain syntax
errors that prevent it from being saved. When this happens, I need to show
the error and offer to save the document in a textual format which allows
the errors to remain uncorrected.
I have a few other situations where I need to pre-flight saves. For
instance, if the user attempts to save over a running AppleScript applet, I
want to (a) warn the user, and (b) offer to the Quit the applet and continue
the save.
I've been looking at the
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: method, but
its not clear to me how to do what I want to do. Does anyone have any
suggestions or pointers to examples illustrating how to do this kind of
thing.
Thanks
-Mark
------------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 Script Debugger 3.0 - AppleScript IDE
WEB: http://www.latenightsw.com/ Affrus 1.0 - Perl Debugging
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

