FXRuby multiple applications

P

pseudoman4

i use FXRuby and try to start a applicattion twice with the following
code:

require "fox12.so"
include Fox

def start_fox_app
application = FXApp.new("FoxTest", "ruby")
application.init(ARGV)
window = FXMainWindow.new(application, "FOX", nil, nil, DECOR_ALL,
0, 0, 580, 500)
window.show(PLACEMENT_SCREEN)
application.create
application.run
end

start_fox_app
start_fox_app

The second call of "start_fox_app" leads to a segmentation fault. The
same thing
also occurs if i try to differenet apps
Any ideas why this can happen and how to prevent this behavior?

hth, Michael
 
P

pseudoman4

the problem is that i want to embed to start_fox_app in c++.
so c++ opens a FXRuby GUI. starting the script twice (in the same c++
process)
does not solve the probelm :(
 
L

Lyle Johnson

i use FXRuby and try to start a applicattion twice with the following
code:

Well, you can't have more than one application instance in the same
process, so that's a problem. What is it that you're trying to
accomplish? Do you want multiple main windows or something?
 
P

pseudoman4

I try to make a c++ application with a "open"-button allowing the user
to open an FXRuby window (to enrich the app with more interactivity).
If the window is closed (and the FXApp terminates) opening the same
window a second time via the "open"-button does not work.
So i want to restart the whole FXApp with one window. Another way would
be to make the window invisible when user tries to close it and make
visible again on "open"-button press.
Is this possible? Any ideas how to this or another solutions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top