Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Handling interface events and tcp connections.

From: nitsch-lists:netcologne at: 10-Dec-2003 18:09

Am Mittwoch 10 Dezember 2003 14:01 schrieb Bruno G. Albuquerque:
> Hello. > > Back to my never-ending problems on using Rebol (hey, I am learning!), I > just hit another problem. > > I have this Rebol program that connects to a server, waits for it (the > server) to send some data and when it receives this data it prints it. Now > I need to create a view interface for it. This interface will have a text > area and the data received will be sent to this text area. > > The problem I need to solve is that I need to wait for data arriving from > the server and, at the same time, handle user interface events. For now I > used a timer in the text area to check for data available in the server > but that's not exactly a clean approach. > > In resume, I guess I wwant some wait to wait at the same time on ports and > on user-interface events. Is that possible at all? >
Yes. Your script now: lots of code forever[ .. wait .. ] Your code later lots of code view/new layout[ .. ] forever[ .. wait .. ] With view/new 'view does not block. And 'wait has the event-processing inbuild, so when waiting events are processed automatically. So gui stays alive. The smarter way using port/awake i leave to others ;)
> -Bruno
-Volker