For Programmers: Free Programming Magazines  


Home > Archive > Clarion > September 2005 > Preventing multiple instances of a procedure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Preventing multiple instances of a procedure
peter@petercrowe.co.uk

2005-09-15, 3:55 am

Hi
I wish to limit the running of a procedure from the main frame tool bar
to 1 instance.
Using Clarion 5.5 EE how can I achive this.

Pete Crowe

Michael Felten-Herer

2005-09-15, 7:55 am

peter@petercrowe.co.uk schrieb:
> Hi
> I wish to limit the running of a procedure from the main frame tool bar
> to 1 instance.
> Using Clarion 5.5 EE how can I achive this.
>
> Pete Crowe
>


The fastest way is, to set a globale variable to true (e.g. pro1_run (BYTE))

In the beginnig of the procedure you can write:

if pro1_run = false
pro1_run = true
else
post(event:closewindow)
end

In the close-Button:

pro1_run = false
post(event:closewindow)

-Michael
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com