freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] Re: FR UI problem with 2 windows


From: Laurent Julliard
Subject: [FR-devel] Re: FR UI problem with 2 windows
Date: Wed, 12 Jun 2002 15:46:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Curt Hibbs wrote:
I'm afraid that my understanding of FOX/FxRuby is probably about the same as
yours, so I'm sending this to Lyle as well.

Lyle, the main thing that is different here from a more traditional
FOX/FXRuby app is that I discovered a workaround to the problem where the
FOX UI blocks all other threads from running in the non-cygwin build of
Ruby:

    # This is called from FreeBASE Core
    @plugin["/system/ui/messagepump"].set_proc  do
      @app. runWhileEvents(self) if @running
    end

The one-line proc is called repeatedly from the main FreeRIDE loop. Could
this be related to the problem that Laurent is experiencing? Either way, any
assistance you can give him would be greatly appreciated.

Curt


Curt,

Could you tell me what I should do remove this hack completely, just to see if ti makes a difference. In other words what would the code look like in freebase/core.rb and in plugins/System_GuiRenderFox/foxhacks.rb if there was no need for the message pump hack.

Laurent


-----Original Message-----
From: Laurent Julliard [mailto:address@hidden
Sent: Wednesday, June 12, 2002 5:56 AM
To: Curt Hibbs; Rich Kilmer; FreeRIDE Developers
Subject: FR UI problem with 2 windows


Curt, Rich

  I'm contacting you directly because I have been fighting with a
problem in the implementation of the Databus Inspector (DBI) for the
last 2 days and I'm stuck.

The way the DBI works is that when you select the "Databus Inspector"
item in the Tools Menu a second window pops up and remain on the desktop
as long as you don't close it. It is a second main window if you want.

Now the problem is that when i create such a window there is aboslutely
no way by which I can make the window active. If I click on the tree
list showing the databus the window broder quickly flashes for a little
while, a beep can be heared but the main FR window remains the active one.

One could think it is a FOX problem with 2 main windows but I tried to
write minimal piece of FOX code to validate the concept and it works
perfectly ok (See sample code below). So there is something wrong in FR
and it's probably in the way FOX events or focus or both are handled. Do
you have any idea on what could cause this problem?

Do you think it could be linked with the message pump hack which plays
the role of a classical app.run() if I understand the code correctly

Any idea/suggestion is welcome because it's really blocking the DBI
development

Thanks for your help.


------ 2 main window sample code ----------------
# Create a new application
app = FXApp.new("Browser", "FoxTest")

# Open the display
app.init(ARGV)

main = FXMainWindow.new(app, "Hello", nil, nil, DECOR_ALL)
button = FXButton.new(main, "&Hello, World!")# nil, app, FXApp::ID_QUIT)


button.connect(SEL_COMMAND) { |sender, sel, checked|
  main2 = FXMainWindow.new(app, "Hello2", nil, nil, DECOR_ALL)
  contents = FXHorizontalFrame.new(main2, LAYOUT_FILL_X|LAYOUT_FILL_Y)
  groupbox = FXGroupBox.new(contents, "Classes",
                            LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
  button2 = FXButton.new(groupbox, "&Hello, World2!", nil, app,
FXApp::ID_QUIT)
  main2.create
  main2.show
}

app.create
main.show(PLACEMENT_SCREEN)

app.run

---- end of code -----

--
Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team
>> Host your Xerox Software project on CodeX: http://codex.xerox.com
>> address@hidden community: http://xww.linux.world.xerox.com





.




--
Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team
>> Host your Xerox Software project on CodeX: http://codex.xerox.com
>> address@hidden community: http://xww.linux.world.xerox.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]