Any way to trigger a dialog when closing a patch or app?
Is there any way to trigger a dialog when a user clicks to close the patch or standalone app?
I am using "window flags close" and "window exec" messages to thispatcher so that standard OS interface buttons can be used to close a standalone. When the user clicks to close the window (with the X button on Windows or red dot on Mac), I would like to trigger a dialog object and give them a chance to save any unsaved work.
I can use a closebang to automatically save anything after the window is closed, but it doesn't seem possible to add a delay and trigger the dialog before the window closes.
Anyone have thoughts or know a way to deal with this?
(I know I can add a custom close button and keep the OS button disabled, which would work, but I was hoping to find another way...).
Thanks in advance!
Shane
It is not that easy to do that 100% reliable.
In first place to disable quitting of Max or Standalone
using system shortcuts etc.
You will have to treat Max with any unsaved patchers, or data like pattr stuff
or similar differently then Standalone.
AND - be aware that Max on Windows does not store audio settings at all
if one quits it in any way other then having close flag enabled.
Yes, seems like it won't work...
Thanks!