how to continuously update a graphics window in ruby using tk -


i'm looking way 'dynamically' update variables (and what's being displayed) in real time fashion in ruby/tk. can please modify code below in way when run program i'll able have value of blah_text updated directly assigning values piece of ruby code?

require 'tk' require 'tkextlib/tile' root = tkroot.new() blah_text="yolo" blah = tk::tile::label.new(root) {text blah_text}.grid tk.mainloop() 

e.g.:

magic-procedure  {   while (1)   {     reads comma delimited text filehandle     based on above assigns value blah_text_from_file   } }  require 'tk' require 'tkextlib/tile' root = tkroot.new() blah_text=blah_text_from_file blah = tk::tile::label.new(root) {text blah_text}.grid tk.mainloop() 

desired effect :

the tk window continuously updates text values assign 'blah_text_from_file' until close it


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -