I added this to my application script:
on applicationShouldTerminateAfterLastWindowClosed_()
return YES
end applicationShouldTerminateAfterLastWindowClosed_
That makes the script now call windowShouldClose_ when the user clicks close window.
on windowShouldClose_(sender)
log "windowShouldClose_"
return gBlnEditMode = false
end
However, it gets called AFTER the user is presented with a “do you want to save” dialog. If I could just get rid of THAT I’d be set.