On Sun, 10 Nov 2013, PICCORO McKAY Lenz wrote:
> i read the wiki and sleep its prefered, but sleep stop complete
> runtime, and wait i dont understand
> 
> in my program, the main Form, i change wait , and use sleep and then
> some message before run process (shell executing) do not show
> 
> either in the other program, only console, works ok! why?
> 

I don't completely understand your words but it's like that:

Sleep puts the program to sleep - literally. It just waits for a given time
to elapse and then resumes execution.

Wait, OTOH, keeps the interpreter active by recursively calling the event
loop. This way, events can fire, the GUI can be updated, etc..

So yes, if you use Sleep, the program will "freeze" for the given time while
with Wait you can still have your forms redraw themselves and stuff.

The thing with the console you mentioned maybe happens as follows (you
didn't really provide details): you call an external program through Shell
which is not affected by your program being asleep. If you don't catch the
output from the Shell instruction (or redirect it), it will be shown in the
IDE console, no matter if your program is Sleeping or whatever.

Regards,
Tobi

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to