FXRuby: Multiple FXMainWindow => seg fault

Hi,

My students are having problems when they try to have multiple
FXMainWindow’s in a FXRuby app. Since I’m no king on FXRuby details I
turn to the community. Maybe someone knows if this is a bug or "feature"
and/or what to do?

This script show the problem:

require 'fox’
include Fox
a = FXApp.new
mw1 = FXMainWindow.new(a, “1”)
mw2 = FXMainWindow.new(a, “2”) if ARGV[0] == "2"
a.create
a.run

which starts ok when no arg is given but seg faults when a 2 is given:

$ ruby multi_mainwindows.rb 2
multi_mainwindows.rb:6: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i386-mswin32]

The date is a bit strange there though since we have installed the
latest Ruby installer (ruby181-11.exe) for them. Might it be that they
are running on an older one?

When searching the archives for this it seems FXRuby should be able to
handle multiple main windows…

Any ideas/comments welcome,

Robert

Robert Feldt wrote:

Hi,

My students are having problems when they try to have multiple
FXMainWindow’s in a FXRuby app. Since I’m no king on FXRuby details I
turn to the community. Maybe someone knows if this is a bug or “feature”
and/or what to do?

My understanding of Fox is that multiple main windows won’t be possible
until 1.2. You can always use dialog windows, though.

Hello Joel,

Friday, March 12, 2004, 5:04:49 AM, you wrote:

Robert Feldt wrote:

Hi,

My students are having problems when they try to have multiple
FXMainWindow's in a FXRuby app. Since I'm no king on FXRuby details I
turn to the community. Maybe someone knows if this is a bug or "feature"
and/or what to do?

My understanding of Fox is that multiple main windows won't be possible
until 1.2. You can always use dialog windows, though.

Create one main window that stays invisible and use toplevel windows
as normal application windows.

···

--
Best regards,
Lothar mailto:mailinglists@scriptolutions.com