application.sleep() runs 'Before' any other statement!

Hi Folks, seems this sleep command runs before anything else in the function regardless of where its located? Here’s what I was trying to structure:

elements.login.visible = false
elements.logo.visible = true
elements.logo_words.visible = true
application.sleep(10000);
elements.login.visible = true

This results in nothing shown until after the sleep is run!

Is there a work-around?

This is in 5.1 beta BTW.

What happens when you do an updateUI before the sleep?

IT2Be:
What happens when you do an updateUI before the sleep?

Same thing Marcel - nothing shows until after the sleep!

Is there something else you do (wrong) in that method that could cause this?

Is this in the WebClient, because then it’s expected behavior, see http://wiki.servoy.com/display/DOCS/Web+Client+compatibility+overview

Paul

pbakker:
Is this in the WebClient, because then it’s expected behavior, see http://wiki.servoy.com/display/DOCS/Web+Client+compatibility+overview

Paul

This is Smart Client Paul - my function works fine other wise and its the first 5 lines of the function!

Ian,

Did a litle test in 5.1 beta :

	application.output('-1')
	application.output('-2')		
	application.sleep(10000);
	application.output('-3')

This works oke, the application stops for 10 seconds between displaing 2 and 3 in the developer console.

Regards

Hans Nieuwenhuis:
Ian,

Did a litle test in 5.1 beta :

	application.output('-1')
application.output('-2')		
application.sleep(10000);
application.output('-3')



This works oke, the application stops for 10 seconds between displaing 2 and 3 in the developer console.

Regards

Hmm in the console perhaps Hans - but these are graphics on a form.

Looks like you’re not updating the UI. Servoy freezes the UI while a script runs to avoid flickering. Just add an updateUI line where you want the ui to repaint in the middle of a script.

http://wiki.servoy.com/display/DOCS/App … n-updateUI