Thread: [Fxruby-users] multiple FXDirLists all get same drive from different FXDriveBoxs
Status: Inactive
Brought to you by:
lyle
From: Tom <tku...@so...> - 2004-05-26 01:42:20
|
Here is something very interesting. This only affects windows, of course. When I have two FXDriveBox's and two FXDirList's, paired up so the dirlists are supposed to only respond to their own drive box's events, it turns out that when I select a drive in either of the FXDriveBox's, both of the FXDirLists change! Is there some way to keep the FXDirList's separate so that each FXDriveBox only changes the appropriate FXDirList? When I comment out the connect() for either the left or the right, changing the live drive box still changes the directories both dirlists. With neither connected, of course, nothing happens, but as long as one is connected, all FXDirLists get the same thing. I *must* be doing something wrong here. Here's the sample code: require 'fox' include Fox class DriveDialogs < FXMainWindow def initialize(owner) super(owner, "DriveDialogThingy", nil, nil, DECOR_ALL, 0, 0, 0, 0) createUI() end def create super() show(PLACEMENT_SCREEN) end def createUI() @contents = FXHorizontalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) @leftvframe = FXVerticalFrame.new(@contents, LAYOUT_FILL_X|LAYOUT_FILL_Y) @rightvframe = FXVerticalFrame.new(@contents, LAYOUT_FILL_X|LAYOUT_FILL_Y) @leftdrivebox = FXDriveBox.new(@leftvframe,5) @rightdrivebox = FXDriveBox.new(@rightvframe,5) @leftdirlist = FXDirList.new(@leftvframe,10) @rightdirlist = FXDirList.new(@rightvframe,10) @leftdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| @leftdirlist.directory = @leftdrivebox.drive } @rightdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| @rightdirlist.directory = @rightdrivebox.drive } end end def run application = FXApp.new("DriveDialogThingy","DriveDialogThingy") DriveDialogs.new(application) application.create application.run end run |
From: jeroen <je...@fo...> - 2004-05-26 22:34:08
|
On Tuesday 25 May 2004 08:41 pm, Tom wrote: > Here is something very interesting. This only affects windows, of > course. When I have two FXDriveBox's and two FXDirList's, paired up so > the dirlists are supposed to only respond to their own drive box's > events, it turns out that when I select a drive in either of the > FXDriveBox's, both of the FXDirLists change! Is there some way to keep > the FXDirList's separate so that each FXDriveBox only changes the > appropriate FXDirList? > > When I comment out the connect() for either the left or the right, > changing the live drive box still changes the directories both dirlists. > With neither connected, of course, nothing happens, but as long as > one is connected, all FXDirLists get the same thing. I *must* be doing > something wrong here. > > Here's the sample code: > > > require 'fox' > > include Fox > > class DriveDialogs < FXMainWindow > def initialize(owner) > super(owner, "DriveDialogThingy", nil, nil, DECOR_ALL, 0, 0, 0, 0) > createUI() > end > > def create > super() > show(PLACEMENT_SCREEN) > end > > def createUI() > @contents = FXHorizontalFrame.new(self, > LAYOUT_FILL_X|LAYOUT_FILL_Y) > @leftvframe = FXVerticalFrame.new(@contents, > LAYOUT_FILL_X|LAYOUT_FILL_Y) > @rightvframe = FXVerticalFrame.new(@contents, > LAYOUT_FILL_X|LAYOUT_FILL_Y) > @leftdrivebox = FXDriveBox.new(@leftvframe,5) > @rightdrivebox = FXDriveBox.new(@rightvframe,5) > @leftdirlist = FXDirList.new(@leftvframe,10) > @rightdirlist = FXDirList.new(@rightvframe,10) > > @leftdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| > @leftdirlist.directory = @leftdrivebox.drive > } > @rightdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| > @rightdirlist.directory = @rightdrivebox.drive > } > > end > > end > > def run > application = FXApp.new("DriveDialogThingy","DriveDialogThingy") > DriveDialogs.new(application) > application.create > application.run > end Just asking, is this FOX 1.0 or FOX 1.2? - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:50 12/11/2003 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |
From: Tom <tku...@so...> - 2004-05-27 00:11:03
|
This is FOX 1.0 with FXRuby 1.0.28. Tom jeroen wrote: > On Tuesday 25 May 2004 08:41 pm, Tom wrote: > >>Here is something very interesting. This only affects windows, of >>course. When I have two FXDriveBox's and two FXDirList's, paired up so >>the dirlists are supposed to only respond to their own drive box's >>events, it turns out that when I select a drive in either of the >>FXDriveBox's, both of the FXDirLists change! Is there some way to keep >>the FXDirList's separate so that each FXDriveBox only changes the >>appropriate FXDirList? >> >>When I comment out the connect() for either the left or the right, >>changing the live drive box still changes the directories both dirlists. >> With neither connected, of course, nothing happens, but as long as >>one is connected, all FXDirLists get the same thing. I *must* be doing >>something wrong here. >> >>Here's the sample code: >> >> >>require 'fox' >> >>include Fox >> >>class DriveDialogs < FXMainWindow >> def initialize(owner) >> super(owner, "DriveDialogThingy", nil, nil, DECOR_ALL, 0, 0, 0, 0) >> createUI() >> end >> >> def create >> super() >> show(PLACEMENT_SCREEN) >> end >> >> def createUI() >> @contents = FXHorizontalFrame.new(self, >> LAYOUT_FILL_X|LAYOUT_FILL_Y) >> @leftvframe = FXVerticalFrame.new(@contents, >> LAYOUT_FILL_X|LAYOUT_FILL_Y) >> @rightvframe = FXVerticalFrame.new(@contents, >> LAYOUT_FILL_X|LAYOUT_FILL_Y) >> @leftdrivebox = FXDriveBox.new(@leftvframe,5) >> @rightdrivebox = FXDriveBox.new(@rightvframe,5) >> @leftdirlist = FXDirList.new(@leftvframe,10) >> @rightdirlist = FXDirList.new(@rightvframe,10) >> >> @leftdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| >> @leftdirlist.directory = @leftdrivebox.drive >> } >> @rightdrivebox.connect(SEL_COMMAND) { |send,sel,ptr| >> @rightdirlist.directory = @rightdrivebox.drive >> } >> >> end >> >>end >> >>def run >> application = FXApp.new("DriveDialogThingy","DriveDialogThingy") >> DriveDialogs.new(application) >> application.create >> application.run >>end > > > Just asking, is this FOX 1.0 or FOX 1.2? > > > - Jeroen > |
From: jeroen <je...@fo...> - 2004-05-27 12:27:10
|
On Wednesday 26 May 2004 07:10 pm, Tom wrote: > This is FOX 1.0 with FXRuby 1.0.28. > Tom That's what I suspected. FOX 1.0's FXDirList starts the scan from the current drive letter. In FOX 1.2, the problem is fixed:- all the drives are listed at the toplevel and the scan will proceed from all drive letters (multiple driveletters may be opened up or unfolded). So this problem is fixed in the latest 1.2 FXRuby. Regards, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 23:50 12/11/2003 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |
From: Lyle J. <ly...@kn...> - 2004-05-27 13:19:05
|
On May 27, 2004, at 8:28 AM, jeroen wrote: > So this problem is fixed in the latest 1.2 FXRuby. :s/is/will be/ ;) |