From: Lyle Johnson Date: 2003-05-11T23:53:26+09:00 Subject: Re: FXRuby - FXMainWindow question John Reed wrote: > I think that my problem is that I've got 2 classes that are both > subclassed from FXMainWindow, which I believe won't work. Possibly so; FOX version 1.0 really only supports one main window (instance) per application. This problem is being addressed for FOX 1.2. > Here's a short description of my data entry application and what I'm > trying to do. When my application is launched, the 1st FXMainWindow > class shows all of the data entries in my MySQL database. OK. > The user can either double click on one of the FXTable cells or use > Ctrl-N to launch the 2nd FXMainWindow class, which is where the data > is shown so entry/update can be done. Sounds like you might want to instead use a dialog box for that second window (the entry/update window). See the dialog.rb example program (among others) for an example of how to create and use custom dialog boxes. > The error I'm getting when a cell in the table in the 1st > FXMainWindow class is clicked is undefined method `show' because the > method I'm calling in the 2nd FXMainWindow class is a clone of the > above create method. I don't follow this. The 'show' instance method is defined in FXWindow, which is the base class for all of the windows & widgets in FOX. > What would be the best way to change the application to make it work? > Any ideas are greatly appreciated. See previous recommendation about making the second window a dialog box. From your brief description, it sounds like the 1st main window is always shown, and is used primarily for display purposes; but the 2nd window is transient, and used temporary to add or update table entries. Hope this helps, Lyle