Prev | Current Page 105 | Next

David Berube

"Practical Reporting with Ruby and Rails"


nNote You could use a Tempfile object, which automates the unlinking behavior, but you can??™t specify a
Tempfile??™s extension, and FXRuby uses file extensions to determine the file format of a given image. This is
an unfortunate approach, yet apparently fairly common??”the Gruff and PDF writer gems both have a similar
issue.
In order for the update_display method to do anything, you need a user interface
element to call it. So, first you must create a window to contain that user interface:
CHAPTER 4 n CREATING REPORTS ON THE DESKTOP 69
fox_application=FXApp.new
@main_window=FXMainWindow.new(fox_application,
"Transmegtech Studios Player Reporting Software",
nil, nil, DECOR_ALL )
@main_window.width=640; @main_window.height=480
The first line creates a new FXApp object, which represents the entire application.
FXApp handles application-wide tasks such as starting messaging loops, event timers,
quitting the application, and so forth. The second line creates the main window as an
instance of the FXMainWindow class.


Pages:
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
Ludacris Linkin Park baseny ogrodowe Yngwie Malmsteen Marc et Claude