Hi Gav, sounds like you want $canclose(). You can add a $canclose() method in the application’s task class. Within your $canclose method you can test whatever conditions needed to determine whether you will allow the app to shut down, or block it. Simply “Quit method kFalse” to halt the shut-down; “Quit method kTrue” to allow the task instance (and your app) to close.
You can define an optional parameter (bIsQuit) if you need to be able to distinguish between clicks on the Omnis-environment close-box vs a close-event from within your application’s logic. If the task instance is being asked to close based on click in the Omnis-env close-box, then bIsQuit will be kTrue.