[fxruby-users] Hot keys working?
roys at mindspring.com
Sun Jul 31 23:32:03 EDT 2005
Yes, hotkeys work... mostly. (And I assume you mean accelerators) Here
are two examples from my source code:
FXMAPFUNC(SEL_COMMAND, FXApp::ID_LAST+124, :do_close_file)
(Map a hotkey to a function. Note: You should probably use an
enumeration for the ID number instead of the hack I was doing here.
This was just from a spike attempt, not production code)
plugin['/system/ui/fox/FXApp'].data, FXSEL(SEL_COMMAND, FXApp::ID_QUIT))
(Map an accelerator to an existing command ID. Another example from my
The 'mostly' part of my statement was from the fact that the third
parameter passed to the function in the first example cannot be accessed
without causing a segmentation fault. Another list member said he gave
up on doing them that way. Check the archives, it was within the last
week or so we had that discussion.
Jacob Hanson wrote:
>I'm using fxruby12 and I'm having trouble getting hotkeys to work.
>I've spent some time digging through the examples, the manual, and
>even the FOX source, but to no avail. Are hot keys working in fxruby?
>Does anyone have a working example?
> _/ _/ _/ Jacob Hanson
> _/ _/_/_/ mailto:jacdx at jacobhanson.com
> _/_/_/ _/ _/ http://www.jacobhanson.com
>fxruby-users mailing list
>fxruby-users at rubyforge.org
More information about the fxruby-users