K
kazaam
Hi,
I'm working with wxruby since 2 days but next to this Wiki: http://wxruby.rubyforge.org/wiki/wiki.pl and this Doc: http://wxruby.rubyforge.org/doc/ I couldn't find something usefull for it. Also del.icio.us has no intresting links. Do you know any good website or book about wxruby?
My problem at the moment is, I wanna test the TaskBarIcon on Gnome and so I did:
#!/usr/bin/env ruby
$Verbose=true
require 'rubygems'
require 'wx'
include Wx
class MinimalApp < App
def on_init
mytask = TaskBarIcon.new
mytask.set_icon('shutdown.svg','thats my tooltip')
end
end
MinimalApp.new.main_loop
#eof
the doc tells about set_icon:
Boolean set_icon(Icon icon, String tooltip)
Sets the icon, and optional tooltip text.
shutdown.svg is an Icon and next to it comes a string, so it should be right or? But executed I'm always getting this error:
../task.rb:15:in `set_icon': in method 'SetIcon', argument 2 of type 'wxIcon const &' (TypeError)
from ./task.rb:15:in `on_init'
from ./task.rb:21:in `main_loop'
from ./task.rb:21
Someone knows why this happens?
greets
I'm working with wxruby since 2 days but next to this Wiki: http://wxruby.rubyforge.org/wiki/wiki.pl and this Doc: http://wxruby.rubyforge.org/doc/ I couldn't find something usefull for it. Also del.icio.us has no intresting links. Do you know any good website or book about wxruby?
My problem at the moment is, I wanna test the TaskBarIcon on Gnome and so I did:
#!/usr/bin/env ruby
$Verbose=true
require 'rubygems'
require 'wx'
include Wx
class MinimalApp < App
def on_init
mytask = TaskBarIcon.new
mytask.set_icon('shutdown.svg','thats my tooltip')
end
end
MinimalApp.new.main_loop
#eof
the doc tells about set_icon:
Boolean set_icon(Icon icon, String tooltip)
Sets the icon, and optional tooltip text.
shutdown.svg is an Icon and next to it comes a string, so it should be right or? But executed I'm always getting this error:
../task.rb:15:in `set_icon': in method 'SetIcon', argument 2 of type 'wxIcon const &' (TypeError)
from ./task.rb:15:in `on_init'
from ./task.rb:21:in `main_loop'
from ./task.rb:21
Someone knows why this happens?
greets