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
Post a Comment