[fxruby-users] FXListBox ...connect(SEL_COMMAND)

Gérard Ménochet gerard.menochet at wanadoo.fr
Tue Apr 25 17:48:19 EDT 2006


    I think I got a  problem  with the FXListBox widget. ( ruby 1.8.4 (2005-12-24) [i386-mswin32]) )

      FXListBox.new(parent, nil, 0) do |libo4|
       libo4.appendItem("0 very weird")
       libo4.appendItem("1 very weird")
       libo4.appendItem("2 very weird")
       libo4.appendItem("3 very weird")
       libo4.appendItem("4 very weird")
       libo4.appendItem("5 very weird")
       libo4.appendItem("6 very weird")
       libo4.appendItem("7 very weird")
       libo4.appendItem("8 very weird")
       libo4.numVisible = 6
       libo4.connect(SEL_COMMAND) do |sender,selector,data|
            puts data

 The data value  printed is always 1.  Not always, sometimes true, false .....

  I am amazed. It's a very common widget. I Hope I'm wrong somewhere


 Gérard Ménochet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060425/552409f0/attachment.htm 

More information about the fxruby-users mailing list