{"action":"created","issue":{"url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/6","labels_url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/6/comments","events_url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/6/events","html_url":"https://github.com/matt-curtis/MochaJSDelegate/issues/6","id":116403882,"number":6,"title":"Crash after `saveDocumentWithDelegate:didSaveSelector:contextInfo`","user":{"login":"berkcebi","id":447045,"avatar_url":"https://avatars.githubusercontent.com/u/447045?v=3","gravatar_id":"","url":"https://api.github.com/users/berkcebi","html_url":"https://github.com/berkcebi","followers_url":"https://api.github.com/users/berkcebi/followers","following_url":"https://api.github.com/users/berkcebi/following{/other_user}","gists_url":"https://api.github.com/users/berkcebi/gists{/gist_id}","starred_url":"https://api.github.com/users/berkcebi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berkcebi/subscriptions","organizations_url":"https://api.github.com/users/berkcebi/orgs","repos_url":"https://api.github.com/users/berkcebi/repos","events_url":"https://api.github.com/users/berkcebi/events{/privacy}","received_events_url":"https://api.github.com/users/berkcebi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-11T19:25:25Z","updated_at":"2015-11-11T21:10:45Z","closed_at":"2015-11-11T19:36:05Z","body":"Hey! I'm trying to get notified when the document is saved after calling `saveDocumentWithDelegate:didSaveSelector:contextInfo:` on the `doc`.\r\n\r\nHere's what I've tried:\r\n```\r\n@import 'MochaJSDelegate.js'\r\n\r\nCOScript.currentCOScript().setShouldKeepAround_(true);\r\n\r\nvar delegate = new MochaJSDelegate({\r\n    \"document:didSave:contextInfo:\": (function(document, didSave, contextInfo) {\r\n        [NSApp displayDialog:\"Done!\" withTitle:\"Awesome!\"];\r\n\r\n        COScript.currentCOScript().setShouldKeepAround_(false);\r\n    })\r\n});\r\n\r\n[doc saveDocumentWithDelegate:delegate.getClassInstance() didSaveSelector:NSSelectorFromString(@\"document:didSave:contextInfo:\") contextInfo:nil];\r\n```\r\n\r\nThis seems to crash on 3.4 though. Any ideas?\r\n\r\nThanks a lot! :beers: "},"comment":{"url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/comments/155911689","html_url":"https://github.com/matt-curtis/MochaJSDelegate/issues/6#issuecomment-155911689","issue_url":"https://api.github.com/repos/matt-curtis/MochaJSDelegate/issues/6","id":155911689,"user":{"login":"berkcebi","id":447045,"avatar_url":"https://avatars.githubusercontent.com/u/447045?v=3","gravatar_id":"","url":"https://api.github.com/users/berkcebi","html_url":"https://github.com/berkcebi","followers_url":"https://api.github.com/users/berkcebi/followers","following_url":"https://api.github.com/users/berkcebi/following{/other_user}","gists_url":"https://api.github.com/users/berkcebi/gists{/gist_id}","starred_url":"https://api.github.com/users/berkcebi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berkcebi/subscriptions","organizations_url":"https://api.github.com/users/berkcebi/orgs","repos_url":"https://api.github.com/users/berkcebi/repos","events_url":"https://api.github.com/users/berkcebi/events{/privacy}","received_events_url":"https://api.github.com/users/berkcebi/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T21:10:45Z","updated_at":"2015-11-11T21:10:45Z","body":"Don't know really, just gave this a try today. Sorry for the hassle."}}