The last method in the class actually starts the application running:
def go
@main_window.show( PLACEMENT_SCREEN )
@fox_application.run
end
end
The go method simply shows the main screen and starts the application. The constant
PLACEMENT_SCREEN indicates that your main window should be shown centered in
the screen. There are a few other options, which you can see in the documentation at
http://www.fxruby.org/doc/api/classes/Fox/FXTopWindow.html.
Finally, let??™s take a look at the initialization code:
hostname = ARGV.shift
port_number = ARGV.shift
my_app = FXTickerApp.new(hostname, port_number, 240)
my_app.go
This code simply takes the server hostname and port number from the command
line and passes them to the FXTickerApp class. The call to new also includes an optional
parameter specifying the font size. This parameter is in tenths of a point, so the value
240 produces a 24-point font.
Summary
Financial applications can be complicated and involve transferring rapidly changing data
across multiple machines.
Pages:
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271