Simulating a key press in FXRuby

S

Steve

I have some event-handling code I'd like to test (e.g.
widget.connect...) that's activated upon SEL_KEYRELEASE. I've been
trying to google around and figure out how the FXWindow.handle method
works...its purpose is obvious but I can't find the right combination
of constants to put in a MKUINT call to form the right unsigned int to
send in as the selector Fixnum.

In addition, I noticed that I can't instantiate an FXEvent. How do I
create an FXEvent object - is there a factory method somewhere that I
should use?

Thanks,
Steve
 
S

Steve

The first argument to MKUINT is the message identifier part (e.g.
ID_xxx) and the second number is the message type (e.g. SEL_KEYRELEASE):

widget.handle(sender, MKUINT(ID_FOO, SEL_KEYRELEASE), evt)

Do you know what the ID is for this? Or more to the point, how I
would go about finding out what ID constant to use?

Regards,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top