1. Not responding problem.

When I my begin on_click procedure, my progie goes through a lengthy bit 
of 
"for.....end for code." during this time the buttons on my little 
display pannel "cancel", "close", etc.. become inactive and the window 
stops responding. (Hence the the procedure is still actualy running. as 
the output display is still being updated.)

How can I set up this on_click procedure so that the main window stays 
active and the buttons like "cancel" etc.. will function.

If anyone can help please reply, thxs.

H.McKay

new topic     » topic index » view message » categorize

2. Re: Not responding problem.

On Wed, 19 Nov 2003 12:15:48 +0000, Hayden McKay <hmck1 at dodo.com.au>
wrote:

>When I my begin on_click procedure, my progie goes through a lengthy bit 
>of 
>"for.....end for code." during this time the buttons on my little 
>display pannel "cancel", "close", etc.. become inactive and the window 
>stops responding. (Hence the the procedure is still actualy running. as 
>the output display is still being updated.)
>
>How can I set up this on_click procedure so that the main window stays 
>active and the buttons like "cancel" etc.. will function.
>
call doEvents(0) within the loop. Your cancel button (etc) should set
a flag which causes the loop to exit. eg (untested code):

integer CancelKeyed

procedure onClick(..)
	CancelKeyed=0
	for
		<lots of code>
		doEvents(0)
		if CancelKeyed then exit
	end for
end procedure

procedure onCancel(..)
	CancelKeyed=1
end procedure

HTH,
Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

new topic     » goto parent     » topic index » view message » categorize

3. Re: Not responding problem.

Throw in some doEvents(0) in your for loop.

Hayden McKay wrote:

>
>
>When I my begin on_click procedure, my progie goes through a lengthy bit 
>of 
>"for.....end for code." during this time the buttons on my little 
>display pannel "cancel", "close", etc.. become inactive and the window 
>stops responding. (Hence the the procedure is still actualy running. as 
>the output display is still being updated.)
>
>How can I set up this on_click procedure so that the main window stays 
>active and the buttons like "cancel" etc.. will function.
>
>If anyone can help please reply, thxs.
>
>H.McKay
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Not responding problem.

Worked like a charm, THANKS, muchious gracious.
theese windows routines are somehow not like programing in my primitive
Qbasic, but im still learning!
----- Original Message -----
From: "Pete Lomax" <petelomax at blueyonder.co.uk>
To: <EUforum at topica.com>
Subject: Re: Not responding problem.


>
>
> On Wed, 19 Nov 2003 12:15:48 +0000, Hayden McKay <hmck1 at dodo.com.au>
> wrote:
>
> >When I my begin on_click procedure, my progie goes through a lengthy bit
> >of
> >"for.....end for code." during this time the buttons on my little
> >display pannel "cancel", "close", etc.. become inactive and the window
> >stops responding. (Hence the the procedure is still actualy running. as
> >the output display is still being updated.)
> >
> >How can I set up this on_click procedure so that the main window stays
> >active and the buttons like "cancel" etc.. will function.
> >
> call doEvents(0) within the loop. Your cancel button (etc) should set
> a flag which causes the loop to exit. eg (untested code):
>
> integer CancelKeyed
>
> procedure onClick(..)
> CancelKeyed=0
> for
> <lots of code>
> doEvents(0)
> if CancelKeyed then exit
> end for
> end procedure
>
> procedure onCancel(..)
> CancelKeyed=1
> end procedure
>
> HTH,
> Pete
> http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>
> --
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.541 / Virus Database: 335 - Release Date: 15/11/03
>


---



--

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu