[fxruby-users] programmatically "pushing" a button

Philippe Lang philippe.lang at attiksystem.ch
Wed Dec 19 02:19:53 EST 2007

Hi Jason,
Can you try this?
button.handle(self, FXSEL(SEL_LEFTBUTTONPRESS, 0), nil)
button.handle(self, FXSEL(SEL_LEFTBUTTONRELEASE, 0), nil)

It would be a good idea to have a look at these classes too:
(You might find them here, more or less: C:\ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.13-mswin32\lib\fox16)
I think it does exactly what you need.

Philippe Lang


De : fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] De la part de Thomas, Jason M (Software)
Envoyé : mardi, 18. décembre 2007 20:09
À : fxruby-users at rubyforge.org
Objet : [fxruby-users] programmatically "pushing" a button

I'm trying to use the Ruby unit test framework to exercise my FxRuby application. I have access to my button but I don't know how to programmatically "push" it. I tried the following:
  button.handle(button, MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
This appears to have no effect at all. What am I doing wrong?

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

More information about the fxruby-users mailing list