From: MENON Jean-Francois Date: 2002-04-22T11:51:08+09:00 Subject: Re: Tk under Ruby [newbie to ruby] "Kontra, Gergely" wrote: > > Hello! > > I'd like to use Tk under ruby. > > My main problem, that I want to use Tk in the other way: it must listen > to a port, and display incoming data. > > My problem: when I call Tk.mainloop, it will never return. > Shall I write? > > Thread.new { Tk.mainloop } > > Looks ugly... > > +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ > | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | > | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | > +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ > . > Magyar php mirror es magyar php dokumentacio: http://hu.php.net use Tk.after in a thread to read in your socket, then launch Tk.mainloop. beside that: I think That Tk.mainloop should be re-written in the ruby's interpreter source, but who can do that ? jf -- _________________________________ / Do you play go? \ \ http://www.multimania.com/cdlib / --------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||