From: SpringFlowers AutumnMoon Date: 2007-10-14T19:54:29+09:00 Subject: Re: how to use Ruby / Tk to display a text message status bo If however, you don't want a separate reporting thread, this is it: require 'tk' tk = TkRoot.new text = TkText.new(tk, 'width'=>80, "height" => 60).pack() #text = TkText.new(Tk.root).pack i = 0 n = 100000 Tk.root.protocol(:WM_DELETE_WINDOW){ if Tk.messageBox(:type=>'okcancel', :message=>'Really exit? ') == 'ok' printf "Bye ...\n" exit else # ignore end } evloop = Thread.new{ Tk.mainloop } while (1) i += 1 if i % n == 0 text.value = <