How to prevent window close during data entry

Doug Easterbrook doug at artsman.com
Fri May 2 03:20:18 UTC 2025


Hi Mike

Override the method in the window called

 $canclose

Quit method kfalse if you want to keep the window open


Quit method ktrue if you want to allow it to close


Put whatever edit checked in $canclose that you want



------------
Doug Easterbrook
Arts Management Systems Ltd.
doug at artsman.com

> On May 1, 2025, at 8:18 PM, Mike Rowan <mgrowan at fastmail.com> wrote:
> 
> Hi all.
> I've found yet another thing I just don't get.
> 
> I want to prevent a window closing if my 'entering data' flag iEDmode is not zero.
> $event method (overridden) I have:
> 
> On evClosebox
> If iEDmode>0
>    OK message [A suitable message]
>    Quit event handler (Discard event)
> End if
> 
> I thought the discarded  event is the click on the closebox. But the window closes anyway.
> 
> No doubt there is a simple answer to this. Care to share?
> 
> Mike Rowan
> Mobile: 0417 812 509
> Email: mgrowan at fastmail.com
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list