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

Gérard Ménochet gerard.menochet at wanadoo.fr
Tue Apr 25 18:57:57 EDT 2006

I forgot

    To turn the problem around :    sender.currentItem      it's ok
  ----- Original Message ----- 
  From: Gérard Ménochet 
  To: fxruby-users at rubyforge.org 
  Sent: Tuesday, April 25, 2006 11:48 PM
  Subject: [fxruby-users] FXListBox ...connect(SEL_COMMAND)


      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


  fxruby-users mailing list
  fxruby-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060426/39d6e2f0/attachment.htm 

More information about the fxruby-users mailing list