I am trying to register a global hotkey using wxruby on Windows 7.
require 'wx'
frame = Wx::Frame.new
frame.register_hot_key(100, Wx::MOD_ALT, Wx::K_F1)
But I obtain this error message:
NoMethodError: undefined method register_hot_key for #<Wx::Frame:0x38bfd70>
Wx::Frame
inherits from Wx::Window
, so I would expect that method to be
there. Any ideas on why this doesn not work? Am I doing something wrong?
(I am using wxruby (2.0.1 x86-mingw32).)
Change your call to
frame.RegisterHotKey
and it might find it!