Forum: wxRuby undefined method `register_hot_key' for Wx::Window

Posted by Nicholas e. Rabenau (nerab)
on 2010-10-15 00:32
Hi,

  I am trying to register a global hotkey using wxruby on Windows XP
SP3. The documentation at
http://wxruby.rubyforge.org/doc/window.html#Window... says
that register_hot_key is available (although I don't quite understand
the comment there about Windows CE).

Anyway, here is the smallest piece of code I could come up with for
reproducing the problem:

require 'wx'
frame = Wx::Frame.new
frame.register_hot_key(100, Wx::MOD_ALT, Wx::K_F1)

=> 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).

Fine regards

Nicholas
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.