[Gambas-devel] About Watching and Wait()

Benoit Minisini gambas at ...20...
Sat Nov 1 18:25:10 CET 2003


Le Lundi 27 Octobre 2003 22:21, Daniel Campos a écrit :
> Hello Benoît (and company):
>
>  I was trying to create a little program using my "networking"
> component, but without using "QT" component. I could see that watching
> process was not working at all, and then I saw at Gambas Wiki that
> Wait() works only if "QT" component is present. The code is very simple:
>
> ...
> Socket.ConnectSocket("localhost",7)
> While Socket.Status <> 7  ' while connection is not completed
> 	Wait (0.1)
> 	Print "Connecting..."
> Loop
> ...
>
> Using this code, with QT all works OK, without QT loop never ends,
> as networking needs callbacks provided by GB.Watch().
>

Hi, Daniel,

I told you rubbish about the WATCH hook. Actually, the event loop IS 
implemented, the WAIT instruction excepted.

So, the following code don't work without the QT component:

  Socket.ConnectSocket("localhost",7)
  While Socket.Status <> 7  ' while connection is not completed
    Wait (0.1)
    Print "Connecting..."
  Loop

I just have to let the default WAIT hook calls the event loop, like QT does.

Second point, I think I will integrate your network component not in the next 
version (0.71), but after, in the 0.72, because I want to talk you about the 
component interface. I will send you another mail with some proposals about 
class, method, constant and event names, and you will tell me if you are 
agree :-)

Best regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the Devel mailing list