How to prevent window close during data entry

Paul Mulroney pmulroney at logicaldevelopments.com.au
Fri May 2 04:43:10 UTC 2025


Hi Mike

Try using the $canclose method - if you have quit method kfalse, then it won't allow the window to close

eg

Quit method iEDmode=0 ## Only close if iEDmode=0  (ie not in enter data)

Regards
Paul.


> On 2 May 2025, at 10:15 am, 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 


I was going to wear my camouflage shirt today, but I couldn't find it.
-- 
Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
www.logicaldevelopments.com.au                   ACN 161 009 374 
Ph: +61 8 9458 3889                                       86 Coolgardie Street
                                                                         BENTLEY  WA  6102





More information about the omnisdev-en mailing list