Re: [shoes] Listbox
- From:
- Per Mikaelsson
- Date:
- 2011-11-14 @ 15:24
Thanks for the help ashbb but I tried irc and got help there, the solution
I am using looks like this.
@commands = { "ls" => "ls -la", "ifconfig" => "ifconfig", "ps" => "ps
aux" }
@cmd = list_box :items => @commands.keys
and this to execute the command $output = ssh.exec! @commands[@cmd.text]
Works like a charm :)
Shoe on
2011/11/14 ashbb <ashbbb@gmail.com>
> Hi Per,
>
> Try out the following:
>
> require 'green_shoes'
> Shoes.app do
> list_box items: ['ls -la', 'hello all'] do |lb|
> p lb.text
> end
> end
>
> I got 'ls -la' on my Windows 7. I can't confirm on Linux right now, though.
>
> ashbb
>
Re: [shoes] Listbox
- From:
- ashbb
- Date:
- 2011-11-14 @ 21:33
Hi Per,
Good solution!
Thank you for sharing. We can learn a lot. ;-)
Keep Shoesing,
ashbb