Created
November 18, 2015 06:51
-
-
Save berkcebi/e6f31b2b5d140da17bea to your computer and use it in GitHub Desktop.
save-document-with-delegate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'MochaJSDelegate.js' | |
COScript.currentCOScript().setShouldKeepAround_(true); | |
var delegate = new MochaJSDelegate({ | |
"document:didSave:contextInfo:": (function(document, didSave, contextInfo) { | |
[NSApp displayDialog:"Done!" withTitle:"Awesome!"]; | |
COScript.currentCOScript().setShouldKeepAround_(false); | |
}) | |
}); | |
[doc saveDocumentWithDelegate:delegate.getClassInstance() didSaveSelector:NSSelectorFromString(@"document:didSave:contextInfo:") contextInfo:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment