Re: Not responding problem.

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu