[Gambas-user] wait vs sleep confusion, console works, graphically have strange behabior

Tobias Boege taboege at ...626...
Mon Nov 11 18:20:24 CET 2013


On Mon, 11 Nov 2013, PICCORO McKAY Lenz wrote:
> From: Tobias Boege <taboege at ...626...>
> > Sleep puts the program to sleep - literally. It just waits for a given time
> > to elapse and then resumes execution.
> all programs inherint and parent? !! ok thnks for clarification! but
> some details more:

I didn't say anything about a parent or inheritance, did I?

> >
> > Wait, OTOH, keeps the interpreter active by recursively calling the event
> > loop. This way, events can fire, the GUI can be updated, etc..
> ok but if i used waith in console? i do not note the behabior??? that's
> why i made the question as u see

What do you mean by "waith in console"? Assuming "waith" contains a typo,
how would you use Wait in console?

Do you mean: the Wait instruction in a Gambas program without GUI or do you
mean the "wait" program in a shell? Or do you mean you start an external
program in a shell from a Gambas program and then use Wait?

And... what "behaviour" do you mean after all? In the paragraph you
responded to above, I was talking about the event loop running when you use
Wait. How could that possibly *not* happen in a console program using Wait?

I'm not sure if I can really help you because I can't even guess what your
words mean - unlike others, I noticed!

> >
> > 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.
> ok but i try also calling other things internally inside lopp and do
> not have same behabior as when use gui forms
> >
> 

It would be best if you send some code and try again to explain to me what
you think is inconsistent or confuses you.

Regards,
Tobi




More information about the User mailing list