Lyle Johnson wrote:
>> I'm using FXRuby (Thanks Lyle for the good work) and my toy 
>> application creates a mainWindow with a Menu bar. On of this Menu item 
>> is in charge of opening a second window (not a dialog box or 
>> something-box but a real second window) and I couldn't find how to do 
>> that....
> 
> 
> I'm not sure if I understand the question, but if you're just wanting to 
> display a second main window you could do this:
> 
>     menuItem = FXMenuCommand.new(aMenu, "Show another main window")
>     menuItem.connect(SEL_COMMAND) {
>       mainWindow2 = FXMainWindow.new(app, "Main Window #2")
>       mainWindow2.create
>       mainWindow2.show
>     }
> 

Thanks for the suggestion. Jeroen told me that this is not supported in 
FOX 1.0.x but will be in 1.2.0. I however tried to your approach with 
FOX 1.0.11. I can create the second window ok but the problem is that 
there is no way by which I can make the second window active. The focus 
stays on the first one even when I use an explicit setFocus()


> In addition to dialog boxes (which you already know about), yet another 
> kind of top-level window is a popup, which is what we use for tooltips, 
> menu panes, etc.
> 

A Dialog box leads to a similar problem: if I attach it to the 
application (which I understand should make it non-modal - the API doc 
says so) then I can't select the second window (dialog box) with the 
mouse. And if I make it modal (execute) then it becomes the active 
window but it doesn't serve my purpose because I can no longer work 
within my first window until I close the dialog box. And I want both of 
them on screen at the same time.

So I'm really stuck here and I can;t believe there isn't a way to have 2 
windows open at the same time and simply go from one to the other with a 
simple mouse click. If sbdy could give me a 10 lines sample code showing 
two selectable windows at the same time may be that would help me a lot.

My last hope was to create a new type of window derived from FXTopWindow 
as suggested
by Jeroen but for some reason this class doesn't seem to exist in 
FXRuby. Any
idea why Lyle?


Laurent