Prev | Current Page 109 | Next

David Berube

"Practical Reporting with Ruby and Rails"

The update_display method uses this value later in the code to
retrieve the selected game ID.
Of course, you need to actually update the display when the user changes the
FXComboBox. You use the connect method to do just that:
@game_combobox.connect(SEL_COMMAND) do
update_display
end
The connect method attaches a block of code to a given FOX message on a given FOX
object. In this case, you??™re specifying that whenever SEL_COMMAND is received by the object,
the update_display method will be called. SEL_COMMAND is sent to FXComboBox objects when
they change, so your update_display method will be called whenever someone selects a
new game to analyze.
nTip Along with SEL_COMMAND, FOX has quite a few other trappable messages. You can use these to customize
your users??™ experience with fine touches. You can get a complete list of all the FOX messages at
http://www.fox-toolkit.org/ftp/FoxMessages.pdf.
After this, the script creates a player label and drop-down list in the same way as the
game label and list.


Pages:
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
aquilamed Spa Ciechocinek drzwiowe hosting hotele londyn