The Shoes GUI kit for Ruby seems like a really nice and easy way to add a GUI to my various scripts, but after banging my head against it, I can\'t seem to make a paragraph
it seems like you need the every method (search for it here). The every method will call your code every second (or as many second as you pass in).
Should work like this:
every do
# your appending code
end
(might need 1 as an argument, not 100% sure atm)
If you're looking to list all files in a directory and refresh the list every second, then I think this is what you're looking for:
Shoes.app do
stack do
@btn_exit = button("Exit") {exit}
@log = para "Logging goes here..."
end
every 1 do
@log.text = Dir.entries('C:/Test').select{|file| file != "."*file.length}.join("\n")
end
end