[fxruby-users] FXSwitcher message problem

Manfred Usselmann usselmann.m at icg-online.de
Tue Apr 18 03:23:27 EDT 2006


I use @mySwitcher.setCurrent( index ) and have a method connected to my
FXSwitcher object: 

@mySwitcher.connect(SEL_COMMAND, method(:onCmdSwitch))

I would expect that onCmdSwitch(sender, sel, index) would receive the
new index as third parameter. At least it should according to the
fxruby documentation:

"SEL_COMMAND:	sent whenever the current (topmost) child window
changes; the message data is an integer indicating the new current
window’s index."

This does not work for me. I get a different number or sometimes even

As a workaround I now use @mySwitcher.current in onCmdSwitch, which
contains the new index...

I'm using fxruby 1.4.5.


More information about the fxruby-users mailing list