From brutyn_nick at hotmail.com Wed Feb 1 13:00:41 2006 From: brutyn_nick at hotmail.com (Nick Brutyn) Date: Wed, 01 Feb 2006 18:00:41 +0000 Subject: [fxruby-users] fxruby system tray Message-ID: hey, can anyone help me to make my .rb file convert to an .exe and i want that the program also comes in the system trey, not just only in the bar with the rest (like msn messenger) Thanks in advance. Brutyn Nick From brutyn_nick at hotmail.com Wed Feb 1 13:01:19 2006 From: brutyn_nick at hotmail.com (Nick Brutyn) Date: Wed, 01 Feb 2006 18:01:19 +0000 Subject: [fxruby-users] Option Menu help Message-ID: hey, i want to make an option menu when the first list is selected, the second will be filled. the first list contains a list of clients the second list contains all locations of the selected client this is my code: Making the client list # Second row FXLabel.new(matrix, "Client") # Popup menu clientPane = FXPopup.new(self) FXOption.new(clientPane, "Select a client" , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) @clients = @driver.FetchClients(@@twa, @user.id) for client in @clients FXOption.new(clientPane, client.name , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT).connect(SEL_COMMAND) { getGeotagsByClient() } end # Option menu @clientMenu = FXOptionMenu.new(matrix, clientPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) Making the location list (just shows "Select a client first") # Third row FXLabel.new(matrix, "Geotag") # Popup menu geotagPane = FXPopup.new(self) FXOption.new(geotagPane, "Select a client first", nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) # Option menu @geotagMenu = FXOptionMenu.new(matrix, geotagPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) when i select an item in the first list the getGeotagsByClient() is actived. def getGeotagsByClient() getApp().beginWaitCursor() do current_option = @clientMenu.getCurrentNo() current_client_id = @clients[current_option-1].id pane = FXPopup.new(self) geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, current_client_id) test = "" for geotag in geotags FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) test += geotag.address1 + "\n " end @testing.text = test @geotagMenu.menu = pane end end here the second list should be filled but isnt. "@testing" contains all the locations => CORRECT " @geotagMenu" only contains the first item, no the whole list Can some help me? Thanks in adance Nick From brutyn_nick at hotmail.com Wed Feb 1 13:03:10 2006 From: brutyn_nick at hotmail.com (Nick Brutyn) Date: Wed, 1 Feb 2006 19:03:10 +0100 Subject: [fxruby-users] Option Menu help Message-ID: hey, this is a little update i want to make an option menu when the first list is selected, the second will be filled. the first list contains a list of clients the second list contains all locations of the selected client this is my code: Making the client list # Second row FXLabel.new(matrix, "Client") # Popup menu clientPane = FXPopup.new(self) #Connect to webservice (FetchClients) @clients = @driver.FetchClients(@@twa, @user.id) for client in @clients FXOption.new(clientPane, client.name , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT).connect(SEL_COMMAND) { getGeotagsByClient() } end # Option menu @clientMenu = FXOptionMenu.new(matrix, clientPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) Making the location list (first time, locations from first client) # Third row FXLabel.new(matrix, "Geotag") # Popup menu geotagPane = FXPopup.new(self) #Connect to webservice (FetchGeotagsByClient) @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, @clients[0].id) for geotag in @geotags FXOption.new(geotagPane, geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) end # Option menu @geotagMenu = FXOptionMenu.new(matrix, geotagPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) when i select an item in the first list the getGeotagsByClient() is actived. def self.getGeotagsByClient() getApp().beginWaitCursor() do current_option = @clientMenu.getCurrentNo() current_client_id = @clients[current_option].id pane = FXPopup.new(self, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) #Connect to webservice (FetchGeotagsByClient) @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, current_client_id) test = "" for geotag in @geotags FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) test += geotag.address1 + "\n " end @user_text.text = test @geotagMenu.menu = pane @geotagMenu.setCurrentNo(2) end end here the second list should be filled but isnt. "@testing" contains all the locations => CORRECT " @geotagMenu" only contains the one item (selects the 3rd, no the whole list) Can some help me? Thanks in adance Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060201/039586eb/attachment.htm From lyle at knology.net Wed Feb 1 13:05:19 2006 From: lyle at knology.net (lyle@knology.net) Date: 1 Feb 2006 18:05:19 -0000 Subject: [fxruby-users] Option Menu help In-Reply-To: <> References: <> Message-ID: <20060201180519.9993.qmail@webmail1.knology.net> On Wed, 01 Feb 2006 18:01:19 +0000, "Nick Brutyn" wrote : > when i select an item in the first list the getGeotagsByClient() is > actived. > > def getGeotagsByClient() > getApp().beginWaitCursor() do > current_option = @clientMenu.getCurrentNo() > current_client_id = @clients[current_option-1].id > pane = FXPopup.new(self) > geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, > current_client_id) > test = "" > for geotag in geotags > FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + > geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) > test += geotag.address1 + "\n " > end > @testing.text = test > @geotagMenu.menu = pane > end > end > > here the second list should be filled but isnt. > "@testing" contains all the locations => CORRECT > " @geotagMenu" only contains the first item, no the whole list > > Can some help me? What happens if you add a call to pane.create after you've added all of the items: for geotag in geotags FXOptionMenu.new(pane, ...) end pane.create # <------- add this here @geotag.menu = pane -- Lyle From lyle at knology.net Wed Feb 1 13:09:11 2006 From: lyle at knology.net (lyle@knology.net) Date: 1 Feb 2006 18:09:11 -0000 Subject: [fxruby-users] fxruby system tray In-Reply-To: <> References: <> Message-ID: <20060201180911.11355.qmail@webmail1.knology.net> On Wed, 01 Feb 2006 18:00:41 +0000, "Nick Brutyn" wrote : > can anyone help me to make my .rb file convert to an .exe and i want that > the program also comes in the system trey, not just only in the bar with the > rest (like msn messenger) Perhaps exerb (http://exerb.sourceforge.jp/index.en.html) can do this for you? From d.cano.lagneaux at gmail.com Wed Feb 1 13:42:12 2006 From: d.cano.lagneaux at gmail.com (Diego Cano Lagneaux) Date: Wed, 01 Feb 2006 19:42:12 +0100 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> Message-ID: > hi fxruby users! > > i decided to maybe put some efforts into a new release of foxguib. as > the creator and maintainer of foxguib (who sadly never got much > feedback) i am very interested if it is worth the effort. often i > heard the opinion: "well, foxguib is nice, but i prefer coding my > interfaces by hand." Personally, I find GUI coding the most boring coding there is, so I really appreciate something like foxguib. I discovered it 2 days ago, and rapidly try it. I don't have much experience of it yet, but what I would like on a next release of foxguib would be a) More documentation b) Maybe some way to add messages to the components? When I am more familiar with the program, I'll see to answer directly in the project's site. From meinrad.recheis at gmail.com Wed Feb 1 14:41:29 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 1 Feb 2006 20:41:29 +0100 Subject: [fxruby-users] foxguib In-Reply-To: References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> Message-ID: <43d756720602011141v3746951fu38ec59a7813a33e1@mail.gmail.com> thanks for the comment!! it gives me motivation to keep it alive. unfortunately replacing widgets makes problems with newer fxruby versions. yet, i don't know what else is broken. i will fix that recently. -- henon On 2/1/06, Diego Cano Lagneaux wrote: > > > hi fxruby users! > > > > i decided to maybe put some efforts into a new release of foxguib. as > > the creator and maintainer of foxguib (who sadly never got much > > feedback) i am very interested if it is worth the effort. often i > > heard the opinion: "well, foxguib is nice, but i prefer coding my > > interfaces by hand." > > Personally, I find GUI coding the most boring coding there is, so I really > appreciate something like foxguib. I discovered it 2 days ago, and rapidly > try it. I don't have much experience of it yet, but what I would like on a > next release of foxguib would be > a) More documentation > b) Maybe some way to add messages to the components? > > When I am more familiar with the program, I'll see to answer directly in > the project's site. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From jacdx at jacobhanson.com Wed Feb 1 14:55:09 2006 From: jacdx at jacobhanson.com (Jacob Hanson) Date: Wed, 1 Feb 2006 12:55:09 -0700 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602011141v3746951fu38ec59a7813a33e1@mail.gmail.com> References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> <43d756720602011141v3746951fu38ec59a7813a33e1@mail.gmail.com> Message-ID: <887852112.20060201125509@jacobhanson.com> Hi, I just tried it to see what the fuss was about. I definitely think you should keep going. It's looking really good. A lot farther along than I thought it would be. A short tutorial would really be nice. Jacob See ya, -- _/ _/ _/ Jacob Hanson _/ _/_/_/ mailto:jacdx at jacobhanson.com _/_/_/ _/ _/ http://www.jacobhanson.com Wednesday, February 1, 2006, 12:41:29 PM, you wrote: > thanks for the comment!! it gives me motivation to keep it alive. > unfortunately replacing widgets makes problems with newer fxruby > versions. yet, i don't know what else is broken. i will fix that > recently. > -- henon > On 2/1/06, Diego Cano Lagneaux wrote: >> >> > hi fxruby users! >> > >> > i decided to maybe put some efforts into a new release of foxguib. as >> > the creator and maintainer of foxguib (who sadly never got much >> > feedback) i am very interested if it is worth the effort. often i >> > heard the opinion: "well, foxguib is nice, but i prefer coding my >> > interfaces by hand." >> >> Personally, I find GUI coding the most boring coding there is, so I really >> appreciate something like foxguib. I discovered it 2 days ago, and rapidly >> try it. I don't have much experience of it yet, but what I would like on a >> next release of foxguib would be >> a) More documentation >> b) Maybe some way to add messages to the components? >> >> When I am more familiar with the program, I'll see to answer directly in >> the project's site. >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users From Antti.Karanta at iki.fi Wed Feb 1 15:58:55 2006 From: Antti.Karanta at iki.fi (Antti Karanta) Date: Wed, 1 Feb 2006 22:58:55 +0200 Subject: [fxruby-users] foxguib In-Reply-To: References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> Message-ID: <200602012258.55422.Antti.Karanta@iki.fi> On Wednesday 01 February 2006 20:42, Diego Cano Lagneaux wrote: > > hi fxruby users! > > > > i decided to maybe put some efforts into a new release of foxguib. as > > the creator and maintainer of foxguib (who sadly never got much > > feedback) i am very interested if it is worth the effort. often i > > heard the opinion: "well, foxguib is nice, but i prefer coding my > > interfaces by hand." > > Personally, I find GUI coding the most boring coding there is, so I really > appreciate something like foxguib. I discovered it 2 days ago, and rapidly > try it. I don't have much experience of it yet, but what I would like on a > next release of foxguib would be > a) More documentation > b) Maybe some way to add messages to the components? I could not agree more - coding a gui is boring, especially with trial and error approach. And a good gui requires a lot of coding. A builder would be great. I tried foxguib some time ago (October 05 I believe) on my work win laptop and what I quit at was the lack of documentation. Although I had to admit I had downloaded it to try it out on a cross-atlantic flight, so I did not have access to the wiki-page. Would it be a good idea to bundle whatever documentation there is into the download and add a link to the foxguib home saying something like "Check the latest doc to make sure you are up to date" or some such. I just tried it on my linux laptop and all I got was a crash: antti at hyperion:~/downloaded/ruby/foxGUIb> ruby foxGUIb.rbw ./FX.rb:634: uninitialized constant FX::Text (NameError) from foxGUIb.rbw:11 antti at hyperion:~/downloaded/ruby/foxGUIb> ruby -rfox14 foxGUIb.rbw /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i686-linux] Aborted antti at hyperion:~/downloaded/ruby/foxGUIb> ruby -rfox12 foxGUIb.rbw ./FX.rb:634: uninitialized constant FX::Text (NameError) from foxGUIb.rbw:11 Could be my environment, too. I'm running Suse 9.1, ruby 1.8.4, fxruby 1.4.4 (although the .so file for fxruby 1.2 seems to still be there, too) and fox 1.4.26. Maybe it could be mentioned in the documentation what version combination of ruby-fox-fxruby the builder has been verified to work on, and of course on what os(es), too? But to answer the original quetion: if I am able to get the foxguib up and running and can actually build a gui with it, I'll be sure to use it! I'm working on a moderately large fxruby gui atm and could really use a tool like this. -Antti- From brutyn_nick at hotmail.com Thu Feb 2 03:51:27 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 09:51:27 +0100 Subject: [fxruby-users] 2 Problems: Multi main windows, and text is not displayed Message-ID: hey, Problem 1 I have this progam: -it has a login screen, when logging in (through webservices) u get a second screen -the second screen is dialog with optionmenus, here u can select options and submit them -after submit u get another dialog with a confirmation the problem i have, when i drag the dialog i automatically shrinks to fit it own components, and u cant set a icon The solution i want I want 3 main windows, when logging in, it disappears and the second window is shown,same for the third one. Is that possible? Or make the dialog not dragable? .... Problem 2 When logging in it should say "Connecting..." and a sandmile is running , but that isnt showing, but after the login the "Login succesfull." and the "Wrong username or password." are shown. See code (bottom) My code: ------------------ require 'rubygems' require_gem 'fxruby' require 'soap/wsdlDriver' include Fox @@wsdl = "xxxxx" @@twa = "xxxx" @@login = "" @@pass = "" @@employee_id = 0 @@geotag_id = 0 def initializeMenu(popup=false) #Make menu bar menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # Help menu helpmenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&Help", nil, helpmenu, LAYOUT_RIGHT) # Help Menu entries FXMenuCommand.new(helpmenu, "&About...").connect(SEL_COMMAND) { FXMessageBox.new(self, "About Twodecode", "Twodecode for Mobile Users.\n\n" + "Using the FOX C++ GUI Library (http://www.fox-toolkit.org)\n\n" + "Copyright (C) 2006 Twodecode (support at twodecode.com)", nil, MBOX_OK|DECOR_TITLE|DECOR_BORDER).execute } if !popup FXMenuCommand.new(helpmenu, "&Quit\tCtl-Q", nil, getApp(), FXApp::ID_QUIT) end # Separator FXHorizontalSeparator.new(self) end # A little dialog box to use in our tests class FXResultDialog < FXDialogBox def initialize(owner) # Invoke base class initialize function first super(owner, "Twodecode", DECOR_TITLE|DECOR_BORDER, 0, 0, 400, 300,0 ,0 ,0 ,0 ,0) initializeMenu(true) mainFrame = FXVerticalFrame.new(self, LAYOUT_CENTER_X|LAYOUT_CENTER_Y) # Arrange nicely matrix = FXMatrix.new(mainFrame, 1, MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X| LAYOUT_FILL_Y) @user_text = FXLabel.new(matrix, "Sending...") btn = FXButton.new(matrix, "&OK", nil, @@application, FXApp::ID_QUIT,FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_X|LAYOUT_CENTER_Y) if @@employee_id != 0 && @@geotag_id != 0 #Connect to webservice (register_time_entry) factory = SOAP::WSDLDriverFactory.new(@@wsdl) @driver = factory.create_rpc_driver result = @driver.RegisterTimeEntry(@@twa, @@employee_id, @@geotag_id) responsecode = result[0] local_time = result[1] if responsecode == "TIMER_SUCCESS" @user_text.text = "Thank You!\nYour registration was received on " + local_time else @user_text.text = "Error in the URL conversion\nThe location code and/or license was not found" end else @user_text.text = "Invalid data. \nPlease select an employee and a geotag." end end end # A little dialog box to use in our tests class FXTimeDialog < FXDialogBox def initialize(owner) # Invoke base class initialize function first super(owner, "Twodecode", DECOR_TITLE|DECOR_BORDER, 0, 0, 400, 300,0 ,0 ,0 ,0 ,0) initializeMenu(true) getApp().beginWaitCursor() do #Showing user details # First row #Connect to webservice (fetchUser) factory = SOAP::WSDLDriverFactory.new(@@wsdl) @driver = factory.create_rpc_driver @user = @driver.fetchUser(@@twa, @@login, @@pass) @user_text = FXLabel.new(self, "Welcome " + @user.last_name + " " + @user.first_name + ".") #Main frame (select lists) mainFrame = FXVerticalFrame.new(self, LAYOUT_CENTER_X | LAYOUT_CENTER_Y | LAYOUT_FILL_X ) # Arrange nicely matrix = FXMatrix.new(mainFrame, 2, MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X| LAYOUT_FILL_Y) # First row FXLabel.new(matrix, "Employee") # Popup menu employeePane = FXPopup.new(self) #Connect to webservice (FetchEmployees) @employees = @driver.FetchEmployees(@@twa, @user.id) for employee in @employees FXOption.new(employeePane, employee.last_name + " " + employee.first_name , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) end # Option menu @employeeMenu = FXOptionMenu.new(matrix, employeePane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) # Second row FXLabel.new(matrix, "Client") # Popup menu clientPane = FXPopup.new(self) #Connect to webservice (FetchClients) @clients = @driver.FetchClients(@@twa, @user.id) for client in @clients FXOption.new(clientPane, client.name , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT).connect(SEL_COMMAND) { getGeotagsByClient() } end # Option menu @clientMenu = FXOptionMenu.new(matrix, clientPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) # Third row FXLabel.new(matrix, "Geotag") # Popup menu geotagPane = FXPopup.new(self) #Connect to webservice (FetchGeotagsByClient) @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, @clients[0].id) for geotag in @geotags FXOption.new(geotagPane, geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) end # Option menu @geotagMenu = FXOptionMenu.new(matrix, geotagPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) # Bottom buttons buttons = FXHorizontalFrame.new(self, LAYOUT_SIDE_BOTTOM|FRAME_NONE|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH) # Separator FXHorizontalSeparator.new(self, LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|SEPARATOR_GROOVE) # Accept accept = FXButton.new(buttons, "&Send", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) # Cancel FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) accept.setDefault accept.setFocus accept.connect(SEL_COMMAND, method(:onCmdSendButton)) end def self.getGeotagsByClient() getApp().beginWaitCursor() do current_option = @clientMenu.getCurrentNo() current_client_id = @clients[current_option].id pane = FXPopup.new(self, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) #Connect to webservice (FetchGeotagsByClient) @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, current_client_id) test = "" for geotag in @geotags FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) test += geotag.address1 + "\n " end @user_text.text = test @geotagMenu.menu = pane @geotagMenu.setCurrentNo(2) end end end # Show a modal dialog def onCmdSendButton(sender, sel, ptr) current_employee = @employees[@employeeMenu.getCurrentNo()] current_client = @clients[@clientMenu.getCurrentNo()] current_geotag = @geotags[@geotagMenu.getCurrentNo()] @user_text.text = "Employee:" + current_employee.last_name + " " + current_employee.first_name + "\n" + "Client:" + current_client.name + "\n" + "Geotag:" + current_geotag.address1 + " " + current_geotag.address2 + " " + current_geotag.floor + "\n" @@employee_id = current_employee.id @@geotag_id = current_geotag.id #popup 2nd window FXResultDialog.new(self).execute return 1 end end class LoginWindow < FXMainWindow def initialize(theApp) # Initialize base class first super(theApp, "Twodecode", nil, nil, DECOR_ALL, 0, 0, 400, 300) begin iconFileName = "icons/Twodecode.ico" iconFile = File.open(iconFileName, "rb") self.icon = FXICOIcon.new(theApp, iconFile.read) rescue puts "Error reading icon file #{iconFileName}" end initializeMenu() mainFrame = FXVerticalFrame.new(self, LAYOUT_CENTER_X|LAYOUT_CENTER_Y) # Arrange nicely matrix = FXMatrix.new(mainFrame, 2, MATRIX_BY_COLUMNS|LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y) # First row FXLabel.new(matrix, "Login") @loginText = FXTextField.new(matrix, 20, @stringLogin, FXDataTarget::ID_VALUE) # Second row FXLabel.new(matrix, "Password") @passText = FXTextField.new(matrix, 21, @stringPass, FXDataTarget::ID_VALUE, TEXTFIELD_PASSWD) # Third row FXLabel.new(matrix, " ") # Button to pop modal dialog loginButton = FXButton.new(matrix, "&Login...\tLogin in the Twodecode", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) loginButton.connect(SEL_COMMAND, method(:onCmdLoginButton)) @resultLabel = FXLabel.new(mainFrame, " ") end # Show a modal dialog def onCmdLoginButton(sender, sel, ptr) login_succesfull = false getApp().beginWaitCursor() do @resultLabel.text = "Connecting..." #Connect to webservices @@login = @loginText.text @@pass = @passText.text factory = SOAP::WSDLDriverFactory.new(@@wsdl) @driver = factory.create_rpc_driver responsecode = @driver.authenticate(@@twa, @@login, @@pass) #p responsecode if responsecode == "USER_FOUND" login_succesfull = true else login_succesfull = false end end if login_succesfull @resultLabel.text = "Login succesfull." #popup 2nd window FXTimeDialog.new(self).execute return 1 else #User doesnt exist, or wrong password @resultLabel.text = "Wrong username or password." end end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 @@application = FXApp.new("Twodecode", "FXRuby") LoginWindow.new(@@application) @@application.create @@application.run end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060202/29879196/attachment-0001.htm From brutyn_nick at hotmail.com Thu Feb 2 03:54:56 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 09:54:56 +0100 Subject: [fxruby-users] Option Menu help References: <> <20060201180519.9993.qmail@webmail1.knology.net> Message-ID: Thanks that worked fine. ----- Original Message ----- From: To: Cc: Sent: Wednesday, February 01, 2006 7:05 PM Subject: Re: [fxruby-users] Option Menu help > > On Wed, 01 Feb 2006 18:01:19 +0000, "Nick Brutyn" > > wrote : > >> when i select an item in the first list the getGeotagsByClient() is >> actived. >> >> def getGeotagsByClient() >> getApp().beginWaitCursor() do >> current_option = @clientMenu.getCurrentNo() >> current_client_id = @clients[current_option-1].id >> pane = FXPopup.new(self) >> geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, >> current_client_id) >> test = "" >> for geotag in geotags >> FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + >> geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) >> test += geotag.address1 + "\n " >> end >> @testing.text = test >> @geotagMenu.menu = pane >> end >> end >> >> here the second list should be filled but isnt. >> "@testing" contains all the locations => CORRECT >> " @geotagMenu" only contains the first item, no the whole list >> >> Can some help me? > > What happens if you add a call to pane.create after you've added all of > the > items: > > for geotag in geotags > FXOptionMenu.new(pane, ...) > end > pane.create # <------- add this here > @geotag.menu = pane > > -- Lyle > From meinrad.recheis at gmail.com Thu Feb 2 04:25:59 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 2 Feb 2006 10:25:59 +0100 Subject: [fxruby-users] foxguib In-Reply-To: <200602012258.55422.Antti.Karanta@iki.fi> References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> <200602012258.55422.Antti.Karanta@iki.fi> Message-ID: <43d756720602020125qcc8342dteb4e2abb0196e21e@mail.gmail.com> hi antti, i migrated to linux a couple of month ago, so i now got the possibilities to test on linux too. On 2/1/06, Antti Karanta wrote: > [....] > > I just tried it on my linux laptop and all I got was a crash: > > antti at hyperion:~/downloaded/ruby/foxGUIb> ruby foxGUIb.rbw > ./FX.rb:634: uninitialized constant FX::Text (NameError) > from foxGUIb.rbw:11 > antti at hyperion:~/downloaded/ruby/foxGUIb> ruby -rfox14 foxGUIb.rbw > /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox12.so: [BUG] Segmentation > fault > ruby 1.8.4 (2005-12-24) [i686-linux] > > Aborted > antti at hyperion:~/downloaded/ruby/foxGUIb> ruby -rfox12 foxGUIb.rbw > ./FX.rb:634: uninitialized constant FX::Text (NameError) > from foxGUIb.rbw:11 > > Could be my environment, too. I'm running Suse 9.1, ruby 1.8.4, fxruby 1.4.4 > (although the .so file for fxruby 1.2 seems to still be there, too) and fox > 1.4.26. on linux it runs if you completely comment the following lines in FX.rb:626 out: if Fox.constants.include? "FXScintilla" class Scintilla < Fox::FXScintilla def initialize(p, opts=0) super(p, nil, 0, opts) end end else puts "Fox::FXScintilla not found! Substituting Fox::FXText." Scintilla = Text end > > Maybe it could be mentioned in the documentation what version combination of > ruby-fox-fxruby the builder has been verified to work on, and of course on > what os(es), too? ok. the current download works with fxruby 1.2.6 on win32 (and linux if you manually fix the previously mentioned problem). i am currently working on the release for fxruby 1.4.4 which broke the replacement of widgets. > > > But to answer the original quetion: if I am able to get the foxguib up and > running and can actually build a gui with it, I'll be sure to use it! I'm > working on a moderately large fxruby gui atm and could really use a tool like > this. > > > > -Antti- > thanks a lotfor your comments!!! regards, -- henon From ujb1 at gmx.de Thu Feb 2 04:28:04 2006 From: ujb1 at gmx.de (ujb1@gmx.de) Date: Thu, 2 Feb 2006 10:28:04 +0100 (MET) Subject: [fxruby-users] foxguib Message-ID: <2321.1138872484@www093.gmx.net> Hello Meinrad, I can only assent to the statements of the other users who responded to your mail: I 've created FXRuby gui's manually before I knew foxguib. This wasn't fun at all and so I really appreciate a gui builder like foxguib. I'm really contented with foxguib, but as you have asked for points to be enforced: - even more stability is always a good thing (the versions before 0.4.1 crashed very often, 0.4.1 seems to be much better) - could you make the ascii file format (pp) the default (instead of the rbin format) -- if something goes wrong with export / import it gives you a (little) chance to repair things with a text editor - foxguib seems to save a lot more attributes than necessary (e.g. absolute widget positions) -- maybe you could only save the necessary attributes. - help with "complicated widgets" would be nice (it takes some trails until you know how to create menu bars with menus or tabbooks). Best regards Dirk -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie From meinrad.recheis at gmail.com Thu Feb 2 06:45:03 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 2 Feb 2006 12:45:03 +0100 Subject: [fxruby-users] create issue Message-ID: <43d756720602020345h6e4aceecu619f148b0b697033@mail.gmail.com> dear lyle, i want to propose a solution to an unecessary complication in fxruby: calling create on widgets whose parents are not created yet! in previous versions it caused a segfault in the latest versions it results in application halt and this message: "trying to create window before creating parent window." i think it complicates code too much. now i often code something like that: wdg.create if App.instance.created? therefore i had to wrap Fox::FXApp into a singleton class App which remembers if it has been created yet. that's a convenient workaround for me but it is unnecessary. but how about fxruby putting out a warning "warning: trying to create window before creating parent window." (a linenumber would be confortable) and simply ignore that call if the application is not yet created? it would allow to reuse code without needing to worry about the create-order-issue. kind regards, -- henon From lyle at knology.net Thu Feb 2 08:20:00 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 2 Feb 2006 07:20:00 -0600 Subject: [fxruby-users] create issue In-Reply-To: <43d756720602020345h6e4aceecu619f148b0b697033@mail.gmail.com> References: <43d756720602020345h6e4aceecu619f148b0b697033@mail.gmail.com> Message-ID: <0a8e98876075a0fb433268b5f27b26d5@knology.net> On Feb 2, 2006, at 5:45 AM, Meinrad Recheis wrote: > but how about fxruby putting out a warning "warning: trying to create > window before creating parent window." (a linenumber would be > confortable) and simply ignore that call if the application is not yet > created? > it would allow to reuse code without needing to worry about the > create-order-issue. Henon, I've added a feature request (http://rubyforge.org/tracker/index.php? func=detail&aid=3425&group_id=300&atid=1226) on this one; I'm going to have to think about it. It definitely won't happen in FXRuby 1.4, but it is something we can consider doing for FXRuby 1.6 (which is just waiting on a final release of FOX 1.6). All of the confusion surrounding when you need to call create(), and when you shouldn't, etc. is probably the biggest problem that new FOX and FXRuby users deal with. I understand why Jeroen did things this way, but it doesn't change the fact that I've answered more questions about create() than I can count! So I'm definitely interested in doing something(s) in the FXRuby binding to address the problem. Thanks, Lyle From brutyn_nick at hotmail.com Thu Feb 2 09:23:32 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 15:23:32 +0100 Subject: [fxruby-users] Option Menu problem (list to long) Message-ID: Hey, I have a option menu filled with client options. Some user have a lot of clients, so the menu list is ver long, it takes al space on screen and it cant scroll down :s:s, or use the arrows to go down. U dont see the rest of list. Does anyone has any slution for this? Or Use another object? Clients can easily go up to 200+. This is the code: # Second row FXLabel.new(matrix, "Client") # Popup menu clientPane = FXPopup.new(self) #Connect to webservice (FetchClients) @clients = @driver.FetchClients(@@twa, @user.id) for client in @clients FXOption.new(clientPane, client.name , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT).connect(SEL_COMMAND) { getGeotagsByClient() } end # Option menu @clientMenu = FXOptionMenu.new(matrix, clientPane, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y))Thanks in advanceNick. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060202/c4d0e4b5/attachment.htm From lyle at knology.net Thu Feb 2 09:36:30 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 2 Feb 2006 08:36:30 -0600 Subject: [fxruby-users] Option Menu problem (list to long) In-Reply-To: References: Message-ID: <88f0c4213f699ba881a7a8b0bfb33577@knology.net> On Feb 2, 2006, at 8:23 AM, Brutyn Nick hotmail wrote: > I have a option menu filled with client options. > Some user have a lot of clients, so the menu list is ver long, it > takes al space on screen and it cant scroll down :s:s, or use the > arrows to go down. > U dont see the rest of list. > ? > Does anyone has any slution for this? > Or Use another object? Clients can easily go up to 200+. I think an FXListBox is probably a better solution than the FXOptionMenu in this case. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 818 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060202/81421b4e/attachment.bin From brutyn_nick at hotmail.com Thu Feb 2 09:39:48 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 15:39:48 +0100 Subject: [fxruby-users] Option Menu problem (list to long) References: <88f0c4213f699ba881a7a8b0bfb33577@knology.net> Message-ID: Hey, thanks do u ahve some sample code with FXListBox so can replace the loop. Thanks ----- Original Message ----- From: Lyle Johnson To: Brutyn Nick hotmail Cc: fxruby-users at rubyforge.org Sent: Thursday, February 02, 2006 3:36 PM Subject: Re: [fxruby-users] Option Menu problem (list to long) On Feb 2, 2006, at 8:23 AM, Brutyn Nick hotmail wrote: I have a option menu filled with client options. Some user have a lot of clients, so the menu list is ver long, it takes al space on screen and it cant scroll down :s:s, or use the arrows to go down. U dont see the rest of list. Does anyone has any slution for this? Or Use another object? Clients can easily go up to 200+. I think an FXListBox is probably a better solution than the FXOptionMenu in this case. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060202/5c646abf/attachment.htm From brutyn_nick at hotmail.com Thu Feb 2 09:58:24 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 15:58:24 +0100 Subject: [fxruby-users] Option Menu problem (list to long) References: <88f0c4213f699ba881a7a8b0bfb33577@knology.net> Message-ID: How can i know when the client list is select, when it is select the geotag list must be filled. # Second row FXLabel.new(matrix, "Client") # ListBox @clientListBox = FXListBox.new(matrix,nil, 0,(FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) @clientListBox.numVisible = 15 #Connect to webservice (FetchClients) @clients = @driver.FetchClients(@@twa, @user.id) #Creating a listBox with all the clients (when selecting a option getGeotagsByClient() will be executed) for client in @clients @clientListBox.appendItem(client.name) #<<<<< .connect doesnt work end # Third row FXLabel.new(matrix, "Geotag") # ListBox @geotagListBox = FXListBox.new(matrix, nil, 0,(FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) @geotagListBox.numVisible = 15 #Connect to webservice (FetchGeotagsByClient) #First time the geotags of the first client will be loaded @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, @clients[0].id) #Creating a listBox with all the geotags for geotag in @geotags @geotagListBox.appendItem(geotag.address1 + ", " + geotag.address2 + ", " + geotag.floor) end need to execute this method when client list is selected #Getting the geotags of the selected client def self.getGeotagsByClient() #Showing a wait cursor while getting the records through the webservices getApp().beginWaitCursor() do #Getting the selected client option menu number current_option = @clientMenu.getCurrentNo() #Getting the client object (id) from the array based on the optionmenu number (order array = order optionmenu) current_client_id = @clients[current_option].id # Popup menu pane = FXPopup.new(self, (FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) #Connect to webservice (FetchGeotagsByClient) @geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, current_client_id) #test = "" #Creating a optionmenu with all the geotags for geotag in @geotags geotag_text = geotag.address1 if !geotag.address2.empty? && geotag.address2 != "" geotag_text += ", " + geotag.address2 end if !geotag.floor.empty? && geotag.floor != "" geotag_text += ", " + geotag.floor end FXOption.new(pane, geotag_text , nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT) #test += geotag.address1 + "\n " end #Create the pane pane.create #@user_text.text = test #Add the pane to the menu @geotagMenu.menu = pane end end ----- Original Message ----- From: Lyle Johnson To: Brutyn Nick hotmail Cc: fxruby-users at rubyforge.org Sent: Thursday, February 02, 2006 3:36 PM Subject: Re: [fxruby-users] Option Menu problem (list to long) On Feb 2, 2006, at 8:23 AM, Brutyn Nick hotmail wrote: I have a option menu filled with client options. Some user have a lot of clients, so the menu list is ver long, it takes al space on screen and it cant scroll down :s:s, or use the arrows to go down. U dont see the rest of list. Does anyone has any slution for this? Or Use another object? Clients can easily go up to 200+. I think an FXListBox is probably a better solution than the FXOptionMenu in this case. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060202/6d780265/attachment-0001.htm From lyle at knology.net Thu Feb 2 10:12:39 2006 From: lyle at knology.net (lyle@knology.net) Date: 2 Feb 2006 15:12:39 -0000 Subject: [fxruby-users] Option Menu problem (list to long) In-Reply-To: <> References: <> Message-ID: <20060202151239.6634.qmail@webmail2.knology.net> On Thu, 2 Feb 2006 15:58:24 +0100, "Brutyn Nick hotmail" wrote : > How can i know when the client list is select, when it is select the geotag list must be filled. Here is what you should do to figure out the answer to this question. First, take a look at the API documentation for the FXListBox class. You can do this by visiting the FXRuby home page (at http://www.fxruby.org/) and clicking on the "API Reference Docs" links that appears on the left sidebar. Next, navigate to the documentation page for the FXListBox class. Read about the FXListBox class, paying close attention to the section labelled "Events". It will tell you which kinds of messages an FXListBox sends to its target, and what kind of data it sends along with that message. Using that information, you should be able to determine which client the user has selected from the client list. From lyle at knology.net Thu Feb 2 10:34:14 2006 From: lyle at knology.net (lyle@knology.net) Date: 2 Feb 2006 15:34:14 -0000 Subject: [fxruby-users] Option Menu problem (list to long) In-Reply-To: <> References: <> Message-ID: <20060202153414.15466.qmail@webmail2.knology.net> On Thu, 2 Feb 2006 16:28:13 +0100, "Brutyn Nick hotmail" wrote : > ..but i cant seem to get the method getGeotagsByClient() activated > > Must the target be another listbox? > > and if i try > @clientListBox = FXListBox.new(matrix, getGeotagsByClient(), > 0,(FRAME_RAISED|FRAME_THICK| > JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) > > He says the method doesnt exist. Who is "he"? And why are you passing the return value of "getGeotagsByClient()" as the second argument of FXListBox.new? That should probably be nil: @clientListBox = FXListBox.new(matrix, nil, 0, ...) Since FXListBox sends SEL_COMMAND when one its items is selected, you need to catch that message: @clientListBox.connect(SEL_COMMAND) do |sender, sel, data| # put message handling code here end and since the documentation told you that the message data is an integer indicating the selected item's index: @clientListBox.connect(SEL_COMMAND) do |sender, sel, data| puts "item #{data} was selected" end Hope this helps, Lyle From brutyn_nick at hotmail.com Thu Feb 2 10:48:03 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Thu, 2 Feb 2006 16:48:03 +0100 Subject: [fxruby-users] Option Menu problem (list to long) References: <> <20060202153414.15466.qmail@webmail2.knology.net> Message-ID: Hey, thanks that worked great. i tried @clientListBox = FXListBox.new(matrix, nil, 0,(FRAME_RAISED|FRAME_THICK| JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)).connect (...) that didnt work. U R the best. Nick ----- Original Message ----- From: To: "Brutyn Nick hotmail" Cc: Sent: Thursday, February 02, 2006 4:34 PM Subject: Re: [fxruby-users] Option Menu problem (list to long) > > On Thu, 2 Feb 2006 16:28:13 +0100, "Brutyn Nick hotmail" > wrote : > >> ..but i cant seem to get the method getGeotagsByClient() activated >> >> Must the target be another listbox? >> >> and if i try >> @clientListBox = FXListBox.new(matrix, getGeotagsByClient(), >> 0,(FRAME_RAISED|FRAME_THICK| >> JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)) >> >> He says the method doesnt exist. > > Who is "he"? And why are you passing the return value of > "getGeotagsByClient()" as the second argument of FXListBox.new? That > should > probably be nil: > > @clientListBox = FXListBox.new(matrix, nil, 0, ...) > > Since FXListBox sends SEL_COMMAND when one its items is selected, you need > to catch that message: > > @clientListBox.connect(SEL_COMMAND) do |sender, sel, data| > # put message handling code here > end > > and since the documentation told you that the message data is an integer > indicating the selected item's index: > > @clientListBox.connect(SEL_COMMAND) do |sender, sel, data| > puts "item #{data} was selected" > end > > Hope this helps, > > Lyle > From jeroen at fox-toolkit.org Thu Feb 2 20:56:58 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 2 Feb 2006 19:56:58 -0600 Subject: [fxruby-users] create issue In-Reply-To: <43d756720602020345h6e4aceecu619f148b0b697033@mail.gmail.com> References: <43d756720602020345h6e4aceecu619f148b0b697033@mail.gmail.com> Message-ID: <200602021956.58131.jeroen@fox-toolkit.org> On Thursday 02 February 2006 05:45, Meinrad Recheis wrote: > dear lyle, > i want to propose a solution to an unecessary complication in fxruby: > calling create on widgets whose parents are not created yet! > > in previous versions it caused a segfault in the latest versions it > results in application halt and this message: "trying to create window > before creating parent window." > > i think it complicates code too much. now i often code something like that: > > wdg.create if App.instance.created? > > therefore i had to wrap Fox::FXApp into a singleton class App which > remembers if it has been created yet. that's a convenient workaround > for me but it is unnecessary. > > but how about fxruby putting out a warning "warning: trying to create > window before creating parent window." (a linenumber would be > confortable) and simply ignore that call if the application is not yet > created? > it would allow to reuse code without needing to worry about the > create-order-issue. > > kind regards, Just to explain a bit more about the create() issue:- in C++, objects are not "complete" until the constructor has finished running. Thus, an object can not be fully realized inside its constructor since what we think of as a complete constructor may actually be only a part of the object, since the developer could have subclassed the class. Take e.g. FXButton. There's no way for me to tell if you have subclassed it or not, and thus I can not consider the FXButton to be fully constructed at the end of FXButton's constructor. Indeed, all the vtable entries at that time still refer to FXButton's vtable entries, and not the developer's subclass thereof. This explains the dichotomy between construction and creation. We can do the latter only if the former is known to be completed. There are also other reasons why it is needed; for example, we can construct a widget tree [e.g. programmatically or by serialization] and not realize it until its complete. Hope this helps, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 19:40 02/ 2/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From brutyn_nick at hotmail.com Fri Feb 3 04:44:57 2006 From: brutyn_nick at hotmail.com (Brutyn Nick hotmail) Date: Fri, 3 Feb 2006 10:44:57 +0100 Subject: [fxruby-users] Fxruby small details problems Message-ID: Hey, I have made my application, but there are some little details i want to see changed. Can anyone help me with these. -The icon in the exe file needs to be costumized. -The application loads slowly (nedd some sort of loading message): will probably use the p "Loading...", anyone got any other ideas -When i connect to the webservices to get the records, that takes some time, anything to speed things up? -I use 1 mainwindow, 2 popupdialog, i would like to use 3 main windows because then i can set the icon in each window. -In the ListBox, is there anyway to to a key press of somesort (press "K", goes to first K value) -Can program be put in systemtray? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060203/b5eda31d/attachment.htm From rrferreira at inf.ufrgs.br Fri Feb 3 14:31:18 2006 From: rrferreira at inf.ufrgs.br (Ronaldo Rodrigues Ferreira) Date: Fri, 03 Feb 2006 17:31:18 -0200 Subject: [fxruby-users] How can I color? Message-ID: <20060203173118.dd23e5tcaosckok4@webmail.inf.ufrgs.br> Hi everyone, I have a text on the FXText widget. I'd like to color different characters with different colors. By example, I want that an A be painted with green, a B with blue, etc. How can I do this? And I have a FXTable widget. I'd like to color the cells with different colors, depending of its content.. The method setCellColor of this class just let me color following the specified rules. Waiting for help, My very thanks! ----------------------------------------- Ronaldo Rodrigues Ferreira rrferreira at inf.ufrgs.br Universidade Federal do Rio Grande do Sul Instituto de Inform?tica ----------------------------------------- ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From meinrad.recheis at gmail.com Sun Feb 5 07:48:52 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Sun, 5 Feb 2006 13:48:52 +0100 Subject: [fxruby-users] MenuCaption#getText bug Message-ID: <43d756720602050448p4afc5d16qc3de2d892ecce7c5@mail.gmail.com> lyle, i think there is a bug in FXMenuCaption#text which is an alias for getText. it allways returns an empty string! the text= method works and the widget displays the text correctly. all widgets derived from FXMenuCaption (FXMenuTitle, FXMenuCommand, FXMenuCascade) also don't return their text. it seems to have the same cause like the "enabled?-bug" you fixed in 1.4.3. remember? i found a workaraound for foxguib, so you need not hurry to fix it. best wishes, -- henon From meinrad.recheis at gmail.com Sun Feb 5 08:01:12 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Sun, 5 Feb 2006 14:01:12 +0100 Subject: [fxruby-users] MenuCaption#getText bug In-Reply-To: <43d756720602050448p4afc5d16qc3de2d892ecce7c5@mail.gmail.com> References: <43d756720602050448p4afc5d16qc3de2d892ecce7c5@mail.gmail.com> Message-ID: <43d756720602050501j16df0176raac322a688758e5d@mail.gmail.com> On 2/5/06, Meinrad Recheis wrote: > lyle, > > i think there is a bug in FXMenuCaption#text which is an alias for > getText. it allways returns an empty string! the text= method works > and the widget displays the text correctly. > all widgets derived from FXMenuCaption (FXMenuTitle, FXMenuCommand, > FXMenuCascade) also don't return their text. > it seems to have the same cause like the "enabled?-bug" you fixed in > 1.4.3. remember? sorry i mean CheckButton#checked? > i found a workaraound for foxguib, so you need not hurry to fix it. > > best wishes, > -- henon > From lyle at knology.net Sun Feb 5 19:17:42 2006 From: lyle at knology.net (Lyle Johnson) Date: Sun, 5 Feb 2006 18:17:42 -0600 Subject: [fxruby-users] MenuCaption#getText bug In-Reply-To: <43d756720602050448p4afc5d16qc3de2d892ecce7c5@mail.gmail.com> References: <43d756720602050448p4afc5d16qc3de2d892ecce7c5@mail.gmail.com> Message-ID: <015621c3752125519cfba041ca0e4c5f@knology.net> On Feb 5, 2006, at 6:48 AM, Meinrad Recheis wrote: > i think there is a bug in FXMenuCaption#text which is an alias for > getText. it allways returns an empty string! the text= method works > and the widget displays the text correctly. > all widgets derived from FXMenuCaption (FXMenuTitle, FXMenuCommand, > FXMenuCascade) also don't return their text. Thanks, I think I see what's wrong. I've just added a bug report for this one and it should be fixed in the next release. From jeroen at fox-toolkit.org Sun Feb 5 22:09:48 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Sun, 5 Feb 2006 21:09:48 -0600 Subject: [fxruby-users] How can I color? In-Reply-To: <20060203173118.dd23e5tcaosckok4@webmail.inf.ufrgs.br> References: <20060203173118.dd23e5tcaosckok4@webmail.inf.ufrgs.br> Message-ID: <200602052109.48814.jeroen@fox-toolkit.org> On Friday 03 February 2006 13:31, Ronaldo Rodrigues Ferreira wrote: > Hi everyone, > > I have a text on the FXText widget. I'd like to color different > characters with different colors. By example, I want that an A be > painted with green, a B with blue, etc. How can I do this? > > And I have a FXTable widget. I'd like to color the cells with > different colors, depending of its content.. The method setCellColor of > this class just let me color following the specified rules. > > > > Waiting for help, Take a look at Adie. It uses FXText's style buffer and style table. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 21:00 02/ 5/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From d.cano.lagneaux at gmail.com Mon Feb 6 09:34:39 2006 From: d.cano.lagneaux at gmail.com (elKano) Date: Mon, 06 Feb 2006 14:34:39 -0000 Subject: [fxruby-users] Message Popup In-Reply-To: <200602052109.48814.jeroen@fox-toolkit.org> References: <20060203173118.dd23e5tcaosckok4@webmail.inf.ufrgs.br> <200602052109.48814.jeroen@fox-toolkit.org> Message-ID: Hello, I am writing an interface to a database. While the code is loading the initial data, the program freezes for some 4 or 5 seconds. I would like to inform the user that we are loading the data, so I use a little popup (the code follows). My problem is that the popup does not show as it should; the little rectangle comes up, but instead of being filled with a label, it is filled with the desktop background. Any idea of how should I do? class LoadingPopup # Helper class showing a little popup with the given text def initialize(app, text) @text=text @app= app end def show @popup=FXPopup.new(@app.mainWindow) do |thePopup| w=@app.mainWindow frame=FXHorizontalFrame.new(thePopup) FXLabel.new(frame, @text) thePopup.create thePopup.show thePopup.popup(nil, w.x+w.width/2, w.y+w.height/2) end end def hide @popup.destroy end end From Antti.Karanta at iki.fi Mon Feb 6 13:56:04 2006 From: Antti.Karanta at iki.fi (Antti Karanta) Date: Mon, 6 Feb 2006 20:56:04 +0200 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602020125qcc8342dteb4e2abb0196e21e@mail.gmail.com> References: <43d756720601311325x2d8c8494r568ab12689386e26@mail.gmail.com> <200602012258.55422.Antti.Karanta@iki.fi> <43d756720602020125qcc8342dteb4e2abb0196e21e@mail.gmail.com> Message-ID: <200602062056.04668.Antti.Karanta@iki.fi> On Thursday 02 February 2006 11:25, Meinrad Recheis wrote: > on linux it runs if you completely comment the following lines in FX.rb:626 > out: Ok, thanks, that got it up and running. However, none of the widgets in the middle are showing, instead they all have the text PNG, which I think means the program can not find the images? When I make a dialog and add widgets, it comes out ok. I may be a bit thick w/ this, but some examples would be great - I know enough fxruby to build some sort of gui (it's a huge library - still learning), but I find it hard to construct a gui using the builder. For some reason I can e.g. get (some) widgets shown in the created dialog when building a dialog but none when building a main window. = / If there are people using the foxguib, here would be a great place to contribute: step by step examples/guides, possibly w/ pictures showing how you proceed, would help a newbie like me along nicely! > > Maybe it could be mentioned in the documentation what version > > combination of ruby-fox-fxruby the builder has been verified to work on, > > and of course on what os(es), too? > > ok. > the current download works with fxruby 1.2.6 on win32 (and linux if > you manually fix the previously mentioned problem). i am currently > working on the release for fxruby 1.4.4 which broke the replacement of > widgets. I think this would be useful to have on the web-page. -Antti- From lyle at knology.net Mon Feb 6 15:02:32 2006 From: lyle at knology.net (lyle@knology.net) Date: 6 Feb 2006 20:02:32 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060206200232.9041.qmail@webmail3.knology.net> On Mon, 6 Feb 2006 20:56:04 +0200, Antti Karanta wrote : > Ok, thanks, that got it up and running. However, none of the widgets in the > middle are showing, instead they all have the text PNG, which I think means > the program can not find the images? It doesn't mean that the program can't find the images; it means that your FOX library (the C++ library) was built without PNG support. From meinrad.recheis at gmail.com Mon Feb 6 15:19:08 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 6 Feb 2006 21:19:08 +0100 Subject: [fxruby-users] foxguib In-Reply-To: <20060206200232.9041.qmail@webmail3.knology.net> References: <20060206200232.9041.qmail@webmail3.knology.net> Message-ID: <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> On 6 Feb 2006 20:02:32 -0000, lyle at knology.net wrote: > > On Mon, 6 Feb 2006 20:56:04 +0200, Antti Karanta wrote : > > > Ok, thanks, that got it up and running. However, none of the widgets in the > > middle are showing, instead they all have the text PNG, which I think means > > the program can not find the images? > > It doesn't mean that the program can't find the images; it means that your > FOX library (the C++ library) was built without PNG support. is there an image format that is supported by the FOX library for sure? how about TGA? From r.fulton at auckland.ac.nz Mon Feb 6 15:26:23 2006 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Tue, 07 Feb 2006 09:26:23 +1300 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> References: <20060206200232.9041.qmail@webmail3.knology.net> <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> Message-ID: <43E7B0EF.8030907@auckland.ac.nz> when you build the fox library you need to have the compile headers for the various graphic libraries somewhere where the configure script can find them. I ended up installing them all by hand, but that was on Mac OS X. What platform are you on and how did you install fox? R Meinrad Recheis wrote: > On 6 Feb 2006 20:02:32 -0000, lyle at knology.net wrote: >> On Mon, 6 Feb 2006 20:56:04 +0200, Antti Karanta wrote : >> >>> Ok, thanks, that got it up and running. However, none of the widgets in the >>> middle are showing, instead they all have the text PNG, which I think means >>> the program can not find the images? >> It doesn't mean that the program can't find the images; it means that your >> FOX library (the C++ library) was built without PNG support. > > is there an image format that is supported by the FOX library for > sure? how about TGA? > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users From meinrad.recheis at gmail.com Mon Feb 6 15:26:18 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 6 Feb 2006 21:26:18 +0100 Subject: [fxruby-users] Message Popup In-Reply-To: References: <20060203173118.dd23e5tcaosckok4@webmail.inf.ufrgs.br> <200602052109.48814.jeroen@fox-toolkit.org> Message-ID: <43d756720602061226m5220f073m7e6e2d583f307552@mail.gmail.com> On 2/6/06, elKano wrote: > Hello, > I am writing an interface to a database. While the code is loading the > initial data, the program freezes for some 4 or 5 seconds. I would like to > inform the user that we are loading the data, so I use a little popup (the > code follows). > My problem is that the popup does not show as it should; the little > rectangle comes up, but instead of being filled with a label, it is filled > with the desktop background. > > Any idea of how should I do? loading the data in a different thread is a good idea. it gives the fox mainloop a chance to proceed with screenupdate. i had a similar problem and have done it this way, but fox still may need some time to update the screen. maybe calling thepopup.update after popping it may also help. others will correct me if i am wrong ;) hth, -- henon [snipped] From lyle at knology.net Mon Feb 6 15:50:44 2006 From: lyle at knology.net (lyle@knology.net) Date: 6 Feb 2006 20:50:44 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060206205044.20378.qmail@webmail4.knology.net> On Mon, 6 Feb 2006 21:19:08 +0100, Meinrad Recheis wrote : > is there an image format that is supported by the FOX library for > sure? how about TGA? Oh, sure. I think that the only image file formats that are *not* currently built-in are JPEG, PNG and TIFF. GIF and TGA are built-in, and several others that I can't call to mind at the moment... From meinrad.recheis at gmail.com Mon Feb 6 15:55:38 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Mon, 6 Feb 2006 21:55:38 +0100 Subject: [fxruby-users] foxguib In-Reply-To: <43E7B0EF.8030907@auckland.ac.nz> References: <20060206200232.9041.qmail@webmail3.knology.net> <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> <43E7B0EF.8030907@auckland.ac.nz> Message-ID: <43d756720602061255oa1782bfrab840701a41e32ef@mail.gmail.com> On 2/6/06, Russell Fulton wrote: > when you build the fox library you need to have the compile headers for > the various graphic libraries somewhere where the configure script can > find them. I ended up installing them all by hand, but that was on Mac > OS X. > > What platform are you on and how did you install fox? i am currently on a debian linux. but that doesn't matter. i was only curious wether there was a fallback imageformat which works on any platform in the case that there are no image libraries. -- henon [...] From jeroen at fox-toolkit.org Mon Feb 6 19:52:17 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 6 Feb 2006 18:52:17 -0600 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> References: <20060206200232.9041.qmail@webmail3.knology.net> <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> Message-ID: <200602061852.18044.jeroen@fox-toolkit.org> On Monday 06 February 2006 14:19, Meinrad Recheis wrote: > On 6 Feb 2006 20:02:32 -0000, lyle at knology.net wrote: > > > > On Mon, 6 Feb 2006 20:56:04 +0200, Antti Karanta wrote : > > > > > Ok, thanks, that got it up and running. However, none of the widgets in the > > > middle are showing, instead they all have the text PNG, which I think means > > > the program can not find the images? > > > > It doesn't mean that the program can't find the images; it means that your > > FOX library (the C++ library) was built without PNG support. > > is there an image format that is supported by the FOX library for > sure? how about TGA? The image formats which are "built-in" are GIF, BMP, TGA, RGB, RAS, XPM, XBM, PPM, ICO, PCX; the other three JPEG, PNG, and TIFF require external libraries. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 18:50 02/ 6/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From Antti.Karanta at iki.fi Tue Feb 7 12:16:13 2006 From: Antti.Karanta at iki.fi (Antti Karanta) Date: Tue, 7 Feb 2006 19:16:13 +0200 Subject: [fxruby-users] foxguib In-Reply-To: <43E7B0EF.8030907@auckland.ac.nz> References: <20060206200232.9041.qmail@webmail3.knology.net> <43d756720602061219l6eccc745x45d1d13f96d870de@mail.gmail.com> <43E7B0EF.8030907@auckland.ac.nz> Message-ID: <200602071916.13746.Antti.Karanta@iki.fi> On Monday 06 February 2006 22:26, Russell Fulton wrote: > when you build the fox library you need to have the compile headers for > the various graphic libraries somewhere where the configure script can > find them. I ended up installing them all by hand, but that was on Mac > OS X. > > What platform are you on and how did you install fox? Suse Linux 9.1 on a Dell Latitude c600 laptop. I installed fox by building from source. I believe it was the standard spell: ./configure make sudo make install What magic do I need to perform to get support for the optional image formats on linux? -Antti- From lyle at knology.net Tue Feb 7 12:42:20 2006 From: lyle at knology.net (lyle@knology.net) Date: 7 Feb 2006 17:42:20 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060207174220.12090.qmail@webmail2.knology.net> On Tue, 7 Feb 2006 19:16:13 +0200, Antti Karanta wrote : > What magic do I need to perform to get support for the optional image > formats on linux? I've never used SuSE Linux and so I'm unfamiliar with their package naming conventions, etc. but you'll want to install the "developer" packages for PNG, JPEG and TIFF -- the ones that have the include files (and not just the shared runtime libraries) in them. Once you've installed those packages, you will need to wipe out your previous FOX build and do the "configure; make; make install" dance again. Pay attention during the "configure" step to confirm that it finds the PNG/JPEG/TIFF stuff when it checks for it (it should say something like "checking for PNG.... yes". Hope this helps, Lyle From uwe.hartl at gmx.net Tue Feb 7 15:44:34 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Tue, 7 Feb 2006 21:44:34 +0100 Subject: [fxruby-users] FXHeader - FXMatrix Message-ID: <200602072144.35232.uwe.hartl@gmx.net> Hello, I want to put a FXMatrix underneath a FXHeader. The contents of the Matrix should be sizable in Width for each column. Therefore I think I need to put FILL_X in the layout of the members of the matrix. How do I finally adjust the width of the columns of the matrix (as chosen from the user by dragging the divisions of the Header)? It works, if I use VerticalFrames for the columns and put the childs in there, the problem here is, that the childs have slightly different heights and therefore the impression of the table gets disturbed. For some of the fields I have button in there and a Text and for some I just have the text. For some I just have a checkbox and therefore they all differ a little but I want to maintain the Table - Look. Can someone help me here? Thanks Uwe From meinrad.recheis at gmail.com Tue Feb 7 15:33:23 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 7 Feb 2006 21:33:23 +0100 Subject: [fxruby-users] FXHeader - FXMatrix In-Reply-To: <200602072144.35232.uwe.hartl@gmx.net> References: <200602072144.35232.uwe.hartl@gmx.net> Message-ID: <43d756720602071233q3b5ca10at7cd31a6c885367eb@mail.gmail.com> On 2/7/06, Uwe Hartl wrote: > Hello, > > I want to put a FXMatrix underneath a FXHeader. The contents of the Matrix > should be sizable in Width for each column. Therefore I think I need to put > FILL_X in the layout of the members of the matrix. How do I finally adjust > the width of the columns of the matrix (as chosen from the user by dragging > the divisions of the Header)? > > It works, if I use VerticalFrames for the columns and put the childs in there, > the problem here is, that the childs have slightly different heights and > therefore the impression of the table gets disturbed. For some of the fields > I have button in there and a Text and for some I just have the text. For some > I just have a checkbox and therefore they all differ a little but I want to > maintain the Table - Look. > > Can someone help me here? i think you cannot set the columnwidth of the matrix explicitly. use LAYOUT_FIX_WIDTH for the children instead. then adjust the children's width according to the header. hth, -- henon From meinrad.recheis at gmail.com Tue Feb 7 15:36:35 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 7 Feb 2006 21:36:35 +0100 Subject: [fxruby-users] cannot resize header on linux Message-ID: <43d756720602071236u6f77db48k636372911f780031@mail.gmail.com> hi, i cannot resize the items of a FXHeader on linux. the same program running on windows allows to resize the header items - so i can exclude a programming error as cause. are there any ideas as to why this is? -- henon From bjorn.bergqvist at gmail.com Wed Feb 8 02:51:35 2006 From: bjorn.bergqvist at gmail.com (=?ISO-8859-1?Q?Bj=F6rn_Bergqvist?=) Date: Wed, 8 Feb 2006 08:51:35 +0100 Subject: [fxruby-users] FXTable pane Message-ID: <44936e730602072351u57207ef6w5d430324f9274c6@mail.gmail.com> Hello, I would like a menu pane to pop up when I right-click in a FXTable. Tried to FXMAPFUNC(SEL_COMMAND, FXTable::ID_QUERY_MENU, :onQueryMenu) but it doesn't work. Any suggestions? Bj?rn Bergqvist From lyle at knology.net Wed Feb 8 08:04:39 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 8 Feb 2006 07:04:39 -0600 Subject: [fxruby-users] cannot resize header on linux In-Reply-To: <43d756720602071236u6f77db48k636372911f780031@mail.gmail.com> References: <43d756720602071236u6f77db48k636372911f780031@mail.gmail.com> Message-ID: <3137973f1099685221cbf444249ba335@knology.net> On Feb 7, 2006, at 2:36 PM, Meinrad Recheis wrote: > i cannot resize the items of a FXHeader on linux. the same program > running on windows allows to resize the header items - so i can > exclude a programming error as cause. are there any ideas as to why > this is? No idea right offhand. Does the header.rb example program (from the FXRuby examples directory) work properly on your machine? From lyle at knology.net Wed Feb 8 08:07:37 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 8 Feb 2006 07:07:37 -0600 Subject: [fxruby-users] FXTable pane In-Reply-To: <44936e730602072351u57207ef6w5d430324f9274c6@mail.gmail.com> References: <44936e730602072351u57207ef6w5d430324f9274c6@mail.gmail.com> Message-ID: On Feb 8, 2006, at 1:51 AM, Bj?rn Bergqvist wrote: > I would like a menu pane to pop up when I right-click in a FXTable. > Tried to > FXMAPFUNC(SEL_COMMAND, FXTable::ID_QUERY_MENU, :onQueryMenu) > but it doesn't work. > Any suggestions? See: http://fox-toolkit.net/cgi-bin/wiki.pl?Cookbook/ Right_Mouse_Context_Menu Hope this helps, Lyle From Antti.Karanta at iki.fi Wed Feb 8 15:15:02 2006 From: Antti.Karanta at iki.fi (Antti Karanta) Date: Wed, 8 Feb 2006 22:15:02 +0200 Subject: [fxruby-users] foxguib In-Reply-To: <20060207174220.12090.qmail@webmail2.knology.net> References: <> <20060207174220.12090.qmail@webmail2.knology.net> Message-ID: <200602082215.02640.Antti.Karanta@iki.fi> On Tuesday 07 February 2006 19:42, lyle at knology.net wrote: > On Tue, 7 Feb 2006 19:16:13 +0200, Antti Karanta wrote : > > What magic do I need to perform to get support for the optional image > > formats on linux? > > I've never used SuSE Linux and so I'm unfamiliar with their package naming > conventions, etc. but you'll want to install the "developer" packages for > PNG, JPEG and TIFF -- the ones that have the include files (and not just > the shared runtime libraries) in them. > > Once you've installed those packages, you will need to wipe out your > previous FOX build and do the "configure; make; make install" dance again. > Pay attention during the "configure" step to confirm that it finds the > PNG/JPEG/TIFF stuff when it checks for it (it should say something like > "checking for PNG.... yes". Ok, I installed the dev packages for the image libraries and when running ./configure I got checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes checking png.h usability... yes checking png.h presence... yes checking for png.h... yes checking tiff.h usability... yes checking tiff.h presence... yes checking for tiff.h... yes So I guess that means I should be getting the pics... but no. The one thing I did not do is wipe out the old fox before I went through the compilation/installation dance. I figured that the old stuff will get overwritten. Besides, I have to admit I'm not quite sure how to remove a lib that is not under rpm - just delete the related files? That is, if you know what the files are and where they are... Should I have done a make clean before proceeding? Now I just went for the ./configure -> make -> sudo make install thinking that make will notice the differences. Judging by the time the compile took at least most stuff was recompiled. I also recompiled and reinstalled FXRuby. Among other things, ruby install.rb config let me know that checking for png_create_read_struct() in -lpng... yes checking for deflate() in -lz... yes checking for jpeg_mem_init() in -ljpeg... yes checking for TIFFSetErrorHandler() in -ltiff... yes Any ideas? BTW, I just tried again the FXRuby examples and the pics on those (at least the ones I looked at) are shown fine. What is not working are the png:s in foxguib. -Antti- From r.fulton at auckland.ac.nz Wed Feb 8 15:36:33 2006 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Thu, 09 Feb 2006 09:36:33 +1300 Subject: [fxruby-users] foxguib In-Reply-To: <200602082215.02640.Antti.Karanta@iki.fi> References: <> <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> Message-ID: <43EA5651.3000901@auckland.ac.nz> Antti Karanta wrote: >> The one thing I did not do is wipe out the old fox before I went through the > compilation/installation dance. I figured that the old stuff will get > overwritten. Besides, I have to admit I'm not quite sure how to remove a lib > that is not under rpm - just delete the related files? That is, if you know > what the files are and where they are... > > Should I have done a > make clean > before proceeding? This is always a good idea. check by looking at the time stamps on the .o and the library files to see if they were in fact recompiled. Whether or not you need to do a make clean depends of if the developer made everything dependent on the make file which is all the configure changes. Now I just went for the ./configure -> make -> sudo make > install thinking that make will notice the differences. Judging by the time > the compile took at least most stuff was recompiled. > > I also recompiled and reinstalled FXRuby. Among other things, > ruby install.rb config > let me know that > > checking for png_create_read_struct() in -lpng... yes > checking for deflate() in -lz... yes > checking for jpeg_mem_init() in -ljpeg... yes > checking for TIFFSetErrorHandler() in -ltiff... yes > > Any ideas? > > BTW, I just tried again the FXRuby examples and the pics on those (at least > the ones I looked at) are shown fine. What is not working are the png:s in > foxguib. > this certainly seems to suggest that things were recompiled and that the library picked up the new libraries. R From uwe.hartl at gmx.net Wed Feb 8 16:31:01 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Wed, 8 Feb 2006 22:31:01 +0100 Subject: [fxruby-users] FXHeader - FXMatrix In-Reply-To: <43d756720602071233q3b5ca10at7cd31a6c885367eb@mail.gmail.com> References: <200602072144.35232.uwe.hartl@gmx.net> <43d756720602071233q3b5ca10at7cd31a6c885367eb@mail.gmail.com> Message-ID: <200602082231.01958.uwe.hartl@gmx.net> Thanks henon, this seems to work. I do a Horizontal frame where I put my FIX_WIDTH frames in there and when changing the Header I cycle through all my regords and through all my items in the record to resize them. Hopefully this does not get out of hand with the response time once I have a lot of records. Thanks Uwe From Antti.Karanta at iki.fi Thu Feb 9 12:38:01 2006 From: Antti.Karanta at iki.fi (Antti Karanta) Date: Thu, 9 Feb 2006 19:38:01 +0200 Subject: [fxruby-users] foxguib In-Reply-To: <43EA5651.3000901@auckland.ac.nz> References: <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> <43EA5651.3000901@auckland.ac.nz> Message-ID: <200602091938.01345.Antti.Karanta@iki.fi> On Wednesday 08 February 2006 22:36, you wrote: > this certainly seems to suggest that things were recompiled and that the > library picked up the new libraries. What a dumb mistake from me - foxguib uses fxruby 1.2 (and fox 1.2) whereas I compiled a new version of fox 1.4 and run the examples against fxruby 1.4. So I compiled fox 1.2 and now the images look fine. It baffles me a little, though, that I did not recompile fxruby 1.2, so I guess it does not require the info about the availability of the image libraries at compile time? Even though it seemed to look them up? Anyhow, now it's working, thanks for your help! -Antti- From lyle at knology.net Thu Feb 9 14:05:10 2006 From: lyle at knology.net (lyle@knology.net) Date: 9 Feb 2006 19:05:10 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060209190510.31418.qmail@webmail1.knology.net> On Thu, 9 Feb 2006 19:38:01 +0200, Antti Karanta wrote : > So I compiled fox 1.2 and now the images look fine. It baffles me a little, > though, that I did not recompile fxruby 1.2, so I guess it does not require > the info about the availability of the image libraries at compile time? Even > though it seemed to look them up? When you compile FOX (the C++ library) it checks for the presence of (for example) the PNG library and header file(s). If it finds them, then there is PNG-specific code in the FOX source code that explicitly depends on the declarations in the PNG header file(s). That's why it's so critical to make sure that your FOX library was configured and built properly. When you configure FXRuby, it also checks for the availability of the PNG library so that it will be sure to link the FXRuby extension with that library. It doesn't, however, contain any PNG-specific code. FXRuby depends on FOX, which depends on PNG, so libpng still needs to show up in FXRuby's link line. I know it may be a little confusing. But I am glad to hear that things are working properly for you now! From uwe.hartl at gmx.net Thu Feb 9 14:57:38 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 9 Feb 2006 20:57:38 +0100 Subject: [fxruby-users] Inheritance Message-ID: <200602092057.39780.uwe.hartl@gmx.net> Hi, I want to create an object from data I have no idea which type it is. Assuming I have the possibilities to have an date and an int. Now I want to create from both an object that has the the same capabilities (e.g. show itself in a parent FXFrame). But there should be specific things for the different data types to be modified (the textfield for the int should just allow numbers and the textfield of the date should allow numbers and ":" and there should be a button beside it which pops up a FXCalendar Dialog). what I want is basically to create a class (lets call it Data), which has a constructor which figures out from which class (DateVis or IntVis) itself should inherit. Something like this: class Data def initialize(d) if d.class == "Fixnum" inherit from IntVis elsif d.class == "Date" inherit from DateVis end end end I don't get it done. Does anybody have a clue if this is possible? Kind of inheritance after the fact of creation? Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From r.fulton at auckland.ac.nz Thu Feb 9 14:49:08 2006 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Fri, 10 Feb 2006 08:49:08 +1300 Subject: [fxruby-users] foxguib In-Reply-To: <200602091938.01345.Antti.Karanta@iki.fi> References: <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> <43EA5651.3000901@auckland.ac.nz> <200602091938.01345.Antti.Karanta@iki.fi> Message-ID: <43EB9CB4.9090907@auckland.ac.nz> Antti Karanta wrote: >> > So I compiled fox 1.2 and now the images look fine. I notice that there are several important apps that only work with fox1.2 (including freeride). What is the issue that prevents these apps being moved to 1.4? Russell From vjoel at path.berkeley.edu Thu Feb 9 14:58:31 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 09 Feb 2006 11:58:31 -0800 Subject: [fxruby-users] Inheritance In-Reply-To: <200602092057.39780.uwe.hartl@gmx.net> References: <200602092057.39780.uwe.hartl@gmx.net> Message-ID: <43EB9EE7.1060909@path.berkeley.edu> Uwe Hartl wrote: > Hi, > I want to create an object from data I have no idea which type it is. Assuming > I have the possibilities to have an date and an int. Now I want to create > from both an object that has the the same capabilities (e.g. show itself in a > parent FXFrame). But there should be specific things for the different data > types to be modified (the textfield for the int should just allow numbers and > the textfield of the date should allow numbers and ":" and there should be a > button beside it which pops up a FXCalendar Dialog). what I want is basically > to create a class (lets call it Data), which has a constructor which figures > out from which class (DateVis or IntVis) itself should inherit. Something > like this: > > class Data > def initialize(d) > if d.class == "Fixnum" > inherit from IntVis > elsif d.class == "Date" > inherit from DateVis > end > end > end > > I don't get it done. Does anybody have a clue if this is possible? Kind of > inheritance after the fact of creation? > > Thanks > Uwe > Two suggestions: 1) use modules and extend. Replace "inherit from IntVis" with d.extend IntVis 2) use a "factory" class and some subclasses: class Data def self.new_from_value(d) case value when Fixnum; DataFixNum.new when Date; .... end end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From meinrad.recheis at gmail.com Thu Feb 9 15:26:07 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 9 Feb 2006 21:26:07 +0100 Subject: [fxruby-users] foxguib In-Reply-To: <43EB9CB4.9090907@auckland.ac.nz> References: <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> <43EA5651.3000901@auckland.ac.nz> <200602091938.01345.Antti.Karanta@iki.fi> <43EB9CB4.9090907@auckland.ac.nz> Message-ID: <43d756720602091226m3721194aqcd014c7804601d56@mail.gmail.com> i *guess* it's due to the massive changes of the fxruby api. please dont take it as an offence, lyle ;) every time a new version of fox is released, the fxruby api changes a lot. a big gui application can become totally broken and it may require days to port it to the new fxruby version. i know it from my own experience @ work ;) until now we stayed with fxruby 1.0.28 at work because nobody wanted to pay the porting time. i am working for 2 days now on it and its still not completed. On 2/9/06, Russell Fulton wrote: > > > Antti Karanta wrote: > >> > > So I compiled fox 1.2 and now the images look fine. > > I notice that there are several important apps that only work with > fox1.2 (including freeride). What is the issue that prevents these apps > being moved to 1.4? > > Russell > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From meinrad.recheis at gmail.com Thu Feb 9 15:34:02 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 9 Feb 2006 21:34:02 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: <200602092057.39780.uwe.hartl@gmx.net> References: <200602092057.39780.uwe.hartl@gmx.net> Message-ID: <43d756720602091234tfa0450bx3e35a1a18e503aa9@mail.gmail.com> On 2/9/06, Uwe Hartl wrote: > Hi, > I want to create an object from data I have no idea which type it is. Assuming > I have the possibilities to have an date and an int. Now I want to create > from both an object that has the the same capabilities (e.g. show itself in a > parent FXFrame). But there should be specific things for the different data > types to be modified (the textfield for the int should just allow numbers and > the textfield of the date should allow numbers and ":" and there should be a > button beside it which pops up a FXCalendar Dialog). what I want is basically > to create a class (lets call it Data), which has a constructor which figures > out from which class (DateVis or IntVis) itself should inherit. Something > like this: > > class Data > def initialize(d) > if d.class == "Fixnum" > inherit from IntVis > elsif d.class == "Date" > inherit from DateVis > end > end > end > > I don't get it done. Does anybody have a clue if this is possible? Kind of > inheritance after the fact of creation? > use the MVC pattern! don't mix data and view classes (allthough fox did it) when you want to display your data instantiate the apropriate view to display it. you may have a FixnumView class and a DateView class which listen to changes in the data and display it. just my 2 cents, -- henon From r.fulton at auckland.ac.nz Thu Feb 9 15:37:29 2006 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Fri, 10 Feb 2006 09:37:29 +1300 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602091226m3721194aqcd014c7804601d56@mail.gmail.com> References: <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> <43EA5651.3000901@auckland.ac.nz> <200602091938.01345.Antti.Karanta@iki.fi> <43EB9CB4.9090907@auckland.ac.nz> <43d756720602091226m3721194aqcd014c7804601d56@mail.gmail.com> Message-ID: <43EBA809.2010407@auckland.ac.nz> Meinrad Recheis wrote: > i *guess* it's due to the massive changes of the fxruby api. please > dont take it as an offence, lyle ;) > > every time a new version of fox is released, the fxruby api changes a > lot. Thanks, I'm new to both Ruby and fox so this is useful background. So what you are saying is that major improvement to FXRuby have been released to coincide with the fox releases. I can see why Lyle did this, I firmly believe that backward compatibility is often overrated even if it does cause short term pain. I seem to remember seeing that fox 1.6 is nearing release. Lyle are you planning any more major changes to the api? Just curious ;) Russell From uwe.hartl at gmx.net Thu Feb 9 16:01:31 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 9 Feb 2006 22:01:31 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: <43EB9EE7.1060909@path.berkeley.edu> References: <200602092057.39780.uwe.hartl@gmx.net> <43EB9EE7.1060909@path.berkeley.edu> Message-ID: <200602092201.32412.uwe.hartl@gmx.net> Hi Joel, Thank you very much. It works like a charm! I have chosen the "factory" approach, because there I can inherit my DataFixNum from other classes: class DataFixNum def print puts "I am a DataFixNum! " + self.to_s end end class DataTime def print puts "I am a DataTime! " + self.to_s end end class Data def self.new(value) case value when Fixnum; DataFixNum.new when Time; DataTime.new end end end Data.new(23).print Data.new(Time.now).print Is there a particular reason why I should not use "new" here instead of "self.new_from_value(d)" as you suggested? Thanks again Uwe On Thursday 09 February 2006 20:58, Joel VanderWerf wrote: > ? ? ?class Data > ? ? ? ?def self.new_from_value(d) > ? ? ? ? ?case value > ? ? ? ? ?when Fixnum; DataFixNum.new > ? ? ? ? ?when Date; .... > ? ? ? ?end > ? ? ?end -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From uwe.hartl at gmx.net Thu Feb 9 16:17:33 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 9 Feb 2006 22:17:33 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: <43d756720602091234tfa0450bx3e35a1a18e503aa9@mail.gmail.com> References: <200602092057.39780.uwe.hartl@gmx.net> <43d756720602091234tfa0450bx3e35a1a18e503aa9@mail.gmail.com> Message-ID: <200602092217.34029.uwe.hartl@gmx.net> Hi henon, I derived my idea to do it this way from this article: http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox_p.html http://www.javaworld.com/javaworld/jw-09-1999/jw-09-toolbox.html I like the ideas of this guy and try to follow it through. How do you think about it after all? I managed (until now) that each layer of my application does not know anything of the data in another object. Interaction always takes place within the same object. The one layer which needs to show some informations does have an "information object" and asks it to show itself at a thertain space ("Like take this frame and display yourself"). How the information object does this: don't care. This means complete encasulation. My question came from the point, the database deliveres an object from a query and this is the smallest atom of data I want to handle. These should look from the outside just like data-objects. But internal it needs to know, what it can do. Since I started with Ruby to be honest a couple weeks ago (three or four) I am not really fluent (yet). Thanks for the hint anyways, I would like to hear what you think about the articles mentioned above. I did not bounce this off anybody jet, I just started to try it. Thanks Uwe > use the MVC pattern! don't mix data and view classes (allthough fox did it) > when you want to display your data instantiate the apropriate view to > display it. > you may have a FixnumView class and a DateView class which listen to > changes in the data and display it. > > just my 2 cents, > -- henon From vjoel at path.berkeley.edu Thu Feb 9 15:54:55 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 09 Feb 2006 12:54:55 -0800 Subject: [fxruby-users] Inheritance In-Reply-To: <200602092201.32412.uwe.hartl@gmx.net> References: <200602092057.39780.uwe.hartl@gmx.net> <43EB9EE7.1060909@path.berkeley.edu> <200602092201.32412.uwe.hartl@gmx.net> Message-ID: <43EBAC1F.7090902@path.berkeley.edu> (I don't think Uwe's message showed up here because he cc-ed the list.) Uwe Hartl wrote: > Hi Joel, > Thank you very much. It works like a charm! > I have chosen the "factory" approach, because there I can inherit my > DataFixNum from other classes: > > class DataFixNum > def print > puts "I am a DataFixNum! " + self.to_s > end > end > class DataTime > def print > puts "I am a DataTime! " + self.to_s > end > end > class Data > def self.new(value) > case value > when Fixnum; DataFixNum.new > when Time; DataTime.new > end > end > end > Data.new(23).print > Data.new(Time.now).print > > > Is there a particular reason why I should not use "new" here instead of > "self.new_from_value(d)" as you suggested? You could do that too. I guess it would prevent actually instantiating the base class, Data, but that may be ok. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Thu Feb 9 15:57:17 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 09 Feb 2006 12:57:17 -0800 Subject: [fxruby-users] foxguib In-Reply-To: <43d756720602091226m3721194aqcd014c7804601d56@mail.gmail.com> References: <20060207174220.12090.qmail@webmail2.knology.net> <200602082215.02640.Antti.Karanta@iki.fi> <43EA5651.3000901@auckland.ac.nz> <200602091938.01345.Antti.Karanta@iki.fi> <43EB9CB4.9090907@auckland.ac.nz> <43d756720602091226m3721194aqcd014c7804601d56@mail.gmail.com> Message-ID: <43EBACAD.70601@path.berkeley.edu> Hm, I remember 1.0->1.2 was a bit painful, but 1.2->1.4 was almost no effort, so the API seems to have settled down. Meinrad Recheis wrote: > i *guess* it's due to the massive changes of the fxruby api. please > dont take it as an offence, lyle ;) > > every time a new version of fox is released, the fxruby api changes a > lot. a big gui application can become totally broken and it may > require days to port it to the new fxruby version. i know it from my > own experience @ work ;) until now we stayed with fxruby 1.0.28 at > work because nobody wanted to pay the porting time. i am working for 2 > days now on it and its still not completed. > > > On 2/9/06, Russell Fulton wrote: >> >> Antti Karanta wrote: >>> So I compiled fox 1.2 and now the images look fine. >> I notice that there are several important apps that only work with >> fox1.2 (including freeride). What is the issue that prevents these apps >> being moved to 1.4? >> >> Russell >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users >> > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From uwe.hartl at gmx.net Thu Feb 9 16:21:57 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 9 Feb 2006 22:21:57 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: <43EBAC1F.7090902@path.berkeley.edu> References: <200602092057.39780.uwe.hartl@gmx.net> <200602092201.32412.uwe.hartl@gmx.net> <43EBAC1F.7090902@path.berkeley.edu> Message-ID: <200602092221.57344.uwe.hartl@gmx.net> Thank you very much and sorry for forgetting the cc. Understood. I think I don't care about the Data instantiation, since the classes (DataFixNum, DataTime) inherit from a common base class which provides a common "interface" for both. So lets be the Data class of temporary nature. Uwe > > Is there a particular reason why I should not use "new" here instead of > > "self.new_from_value(d)" as you suggested? > > You could do that too. I guess it would prevent actually instantiating > the base class, Data, but that may be ok. From lyle at knology.net Thu Feb 9 16:27:55 2006 From: lyle at knology.net (lyle@knology.net) Date: 9 Feb 2006 21:27:55 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060209212755.23780.qmail@webmail4.knology.net> On Fri, 10 Feb 2006 09:37:29 +1300, Russell Fulton wrote : > Thanks, I'm new to both Ruby and fox so this is useful background. > > So what you are saying is that major improvement to FXRuby have been > released to coincide with the fox releases. I can see why Lyle did > this, I firmly believe that backward compatibility is often overrated > even if it does cause short term pain. > > I seem to remember seeing that fox 1.6 is nearing release. Lyle are you > planning any more major changes to the api? Just curious ;) Let's be clear that I have no control over changes to the FOX API -- that's Jeroen's call. And he *is* fond of making sweeping API changes when he goes to a new major release of FOX. Most of the time, those changes are for good reasons (e.g. to make things less confusing, or to make APIs consistent with each other). Joel is correct that there were a number of major changes between FOX versions 1.0 and 1.2, but that it wasn't as bad going from 1.2 to 1.4. In my opinion, you shouldn't experience much pain in going from 1.4 to 1.6, either. When it's possible, I'll add some APIs to maintain backwards compatibility. For example, when Jeroen removed the linkBefore() and linkAfter() member functions from the FXWindow class in FOX 1.4, I added "pure Ruby" versions of these methods (in FXRuby 1.4) so that old code wouldn't break. Sometimes it's not that simple, though, and things get broken as a result. ;) From lyle at knology.net Thu Feb 9 16:31:32 2006 From: lyle at knology.net (lyle@knology.net) Date: 9 Feb 2006 21:31:32 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060209213132.25280.qmail@webmail4.knology.net> On Thu, 9 Feb 2006 21:26:07 +0100, Meinrad Recheis wrote : > i *guess* it's due to the massive changes of the fxruby api. please > dont take it as an offence, lyle ;) No offense taken. Yes, there were definitely significant API changes between FOX (and FXRuby) versions 1.0 and 1.2. It's more difficult to catch those changes since we don't have a compiler that is checking each and every line of code against the class declarations (as is the case with C++ code). That shouldn't necessarily be construed as a vote in favor of C++, though. ;) From lyle at knology.net Thu Feb 9 16:55:41 2006 From: lyle at knology.net (lyle@knology.net) Date: 9 Feb 2006 21:55:41 -0000 Subject: [fxruby-users] foxguib In-Reply-To: <> References: <> Message-ID: <20060209215541.2758.qmail@webmail4.knology.net> On Fri, 10 Feb 2006 10:40:31 +1300, Russell Fulton wrote : > Thanks for the clarification -- you were responding to changes in Fox > this makes more sense. Meinrad's email did not explain this and > definitely left the impression that the changes were just in FXRuby. Well, a lot of people (and I'm not suggesting that Henon is in this group) don't make a distinction between FOX and FXRuby. They assume that I have the power to fix bugs in FOX, to make decisions about its look and feel, etc. I don't get the impression that people have that same confusion about other GUI toolkits, like GTK and wxRuby, but what can you say or do? > Hmmm... interesting since most of the apps I have come across that > require older fox versions require 1.2. I really don't want to install > two versions (three when 1.6 comes out ?). FXRuby 1.4 was released last August, but for whatever reasons, a lot of projects never upgraded their applications from FXRuby 1.2. It would probably have helped to provide some kind of porting guide, pointing out every thing that changed between versions 1.2 and 1.4, but I was already running late as it was and so that never materialized. Perhaps I will be able to provide some better guidance for upgrading from 1.4 to 1.6, since I seem to be *ahead* of the game with FXRuby 1.6 this time. ;) From sdruby at onlinehome.de Sat Feb 11 07:22:32 2006 From: sdruby at onlinehome.de (=?us-ascii?Q?Sascha_Dordelmann?=) Date: Sat, 11 Feb 2006 13:22:32 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: <200602092217.34029.uwe.hartl@gmx.net> Message-ID: Hi Uwe, you wrote: > I derived my idea to do it this way from this article: > http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox_p.html > http://www.javaworld.com/javaworld/jw-09-1999/jw-09-toolbox.html > > I like the ideas of this guy and try to follow it through. How do you think > about it after all? I don't agree in seveal points. Two examples: > get and set functions are evil In UML you have something called "stereotype" of a class. How much sense getters and setters make depends of the main purpose of an object. A minimal entity object has no interface but getters and setters. The common mistake of OO beginners is to think that the instance variables of a class define the attributes of the class. This is not true. The getters and setters describe the attributes. Instance variables are a means to store the data which is needed to implement the getters and setters and the rest of an objects interface. > MVC is okay for implementing little things like buttons, > but it fails miserably as an application-level architecture. The model of an application window models the behavour of the window. You will of course need need a domain-model in addition to the application-model. This is not a problem with MVC but a problem with people misunderstanding MVC. Be suspicious if someone with a C++ and Java background trys to explain OO to you. In addition to this the author tells you that everybody else is wrong and he himself has got it right. Cheers Sascha From meinrad.recheis at gmail.com Sat Feb 11 15:16:42 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Sat, 11 Feb 2006 21:16:42 +0100 Subject: [fxruby-users] Inheritance In-Reply-To: References: <200602092217.34029.uwe.hartl@gmx.net> Message-ID: <43d756720602111216p516e732dr23e546fb08373cd3@mail.gmail.com> On 2/11/06, Sascha Dordelmann wrote: > Hi Uwe, [...] > > > MVC is okay for implementing little things like buttons, > > but it fails miserably as an application-level architecture. > > The model of an application window models the behavour of the window. You > will of course need need a domain-model in addition to the > application-model. This is not a problem with MVC but a problem with people > misunderstanding MVC. i agree to that. MVC scales well to the application level when applied recursively. > > Be suspicious if someone with a C++ and Java background trys to explain OO > to you. In addition to this the author tells you that everybody else is > wrong and he himself has got it right. yes. the motivation for his approach (encapsulating functionality that deals with the data into the data object) is maintainability. the concept works only for his example (changing the type of data) but it doesn't scale well on large systems. imagine adding new functionality to the system. every concerned object would have to be extended and the functionality would be scattered over all data objects which may result in a maintainance horror. I don't think that there is one right way to do the object decomposition of a system. there are several alternatives each of them with their specific tradeoffs. -- henon From rrferreira at inf.ufrgs.br Mon Feb 13 10:56:52 2006 From: rrferreira at inf.ufrgs.br (Ronaldo Rodrigues Ferreira) Date: Mon, 13 Feb 2006 13:56:52 -0200 Subject: [fxruby-users] FXDialogBox and the destroy and close methods Message-ID: <20060213135652.20pge5zldcswsw0s@webmail.inf.ufrgs.br> Hi everyone! I constructed a FXDialogBox instance. When I call the TXTopWindow?s close() method or the FXWindow?s destroy() method, the FXMainWindow becomes unavailable for use. It becomes inoperative. What can I do to solve this problem? Very thanks, Waiting for answer. ----------------------------------------- Ronaldo Rodrigues Ferreira rrferreira at inf.ufrgs.br Universidade Federal do Rio Grande do Sul Instituto de Inform?tica Porto Alegre, Brazil ----------------------------------------- ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jeroen at fox-toolkit.org Mon Feb 13 21:06:26 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Mon, 13 Feb 2006 20:06:26 -0600 Subject: [fxruby-users] FXDialogBox and the destroy and close methods In-Reply-To: <20060213135652.20pge5zldcswsw0s@webmail.inf.ufrgs.br> References: <20060213135652.20pge5zldcswsw0s@webmail.inf.ufrgs.br> Message-ID: <200602132006.26631.jeroen@fox-toolkit.org> On Monday 13 February 2006 09:56, Ronaldo Rodrigues Ferreira wrote: > Hi everyone! > > > I constructed a FXDialogBox instance. When I call the > TXTopWindow?s close() method or the FXWindow?s destroy() method, the > FXMainWindow becomes unavailable for use. It becomes inoperative. What > can I do to solve this problem? Don't call FXTopWindow::close() since the window will be deleted if the close succeeds [it first asks a question to e.g. prompt the user to save any data, etc.]. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 20:00 02/13/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060213/28130473/attachment.bin From meinrad.recheis at gmail.com Wed Feb 15 12:39:13 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 15 Feb 2006 18:39:13 +0100 Subject: [fxruby-users] require_gem "fxruby" Message-ID: <43d756720602150939l2d26db16n7ac9d6eda7abfcf9@mail.gmail.com> hi lyle, a unique way of initializing fxruby would be great. afaik currently there are 2 methods of require-ing fxruby depending on how it has been installed. this is quite inconvenient for application developers who want their app to run with any fxruby installation type (gem / installer / built from source) would it be possible to install a "fox14.rb" with fxruby1.4.4 gem that does the require "rubygems"; require_gem "fxruby"; or something like that. (i don't know nothing about how rubygems works) provided that it should be possible to require fxruby144 by calling require "fox14" also if it was installed as a gem. best wishes, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060215/afa184aa/attachment.htm From lyle at knology.net Wed Feb 15 13:44:41 2006 From: lyle at knology.net (lyle@knology.net) Date: 15 Feb 2006 18:44:41 -0000 Subject: [fxruby-users] require_gem "fxruby" In-Reply-To: <> References: <> Message-ID: <20060215184441.7786.qmail@webmail4.knology.net> On Wed, 15 Feb 2006 18:39:13 +0100, Meinrad Recheis wrote : > a unique way of initializing fxruby would be great... I am confused about what the difficulty is, exactly. I'm sitting at my machine at work where I'm running Ruby 1.8.2 for Windows from the one-click installer. I have FXRuby 1.4.4 installed as a gem here: C:\>gem list fxruby *** LOCAL GEMS *** fxruby (1.4.4, 1.4.3, 1.2.6) FXRuby is the Ruby binding to the FOX GUI toolkit. and if I just do "require 'fox14'", it works fine: C:\>ruby -e "require 'fox14'; p Fox.fxrubyversion" "1.4.4" So what's the problem? From lyle at knology.net Wed Feb 15 13:55:18 2006 From: lyle at knology.net (lyle@knology.net) Date: 15 Feb 2006 18:55:18 -0000 Subject: [fxruby-users] require_gem "fxruby" In-Reply-To: <> References: <> Message-ID: <20060215185518.13193.qmail@webmail4.knology.net> On Wed, 15 Feb 2006 19:52:12 +0100, Meinrad Recheis wrote : > i don't know. this is what i get on linux: > > henon at golem:~$ ruby -v > ruby 1.8.3 (2005-06-23) [i486-linux] > henon at golem:~$ gem list fxruby > > *** LOCAL GEMS *** > > fxruby (1.4.4, 1.4.3) > FXRuby is the Ruby binding to the FOX GUI toolkit. > henon at golem:~$ irb > irb(main):001:0> require 'fox14' > LoadError: no such file to load -- fox14 > from (irb):1:in `require' > from (irb):1 > irb(main):002:0> > > seems to work for me on windows too. I think that you probably don't have the RUBYOPT environment variable set to automatically require the "rubygems" library. This is a RubyGems installation issue that's discussed here: http://docs.rubygems.org/read/chapter/3 See the section titled "Using RUBYOPT". Hope this helps, Lyle From thom01 at laposte.net Wed Feb 15 17:10:35 2006 From: thom01 at laposte.net (thom01) Date: Wed, 15 Feb 2006 23:10:35 +0100 Subject: [fxruby-users] Hide/show list items Message-ID: Hi, [1] Is there a way of hiding/showing list/table/whatever elements without rebuilding a new list ? [2] How to initialize the height of a frame whose parent is a splitter ? My main window is splitted vertically, the bottom pane contains a FXText only, I'd like to display 3 lines (or a given height) only when I create the main window. [3] I'm still using FXRuby 1.0, is the API available somewhere ? Thanks Thomas Acc?dez au courrier ?lectronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 ?/mn) ; t?l : 08 92 68 13 50 (0,34?/mn) From lyle at knology.net Wed Feb 15 17:14:36 2006 From: lyle at knology.net (lyle@knology.net) Date: 15 Feb 2006 22:14:36 -0000 Subject: [fxruby-users] RFC on Proposed API Change for FXRuby 1.6 Message-ID: <20060215221436.9706.qmail@webmail3.knology.net> All, If you have a few spare moments, please spend them to read this post about an API change I'm considering for FXRuby 1.6: http://lylejohnson.name/blog/?p=133 Please address comments wherever you feel most comfortable (on the blog, or the mailing list). Thanks, Lyle From lyle at knology.net Wed Feb 15 17:19:37 2006 From: lyle at knology.net (lyle@knology.net) Date: 15 Feb 2006 22:19:37 -0000 Subject: [fxruby-users] Hide/show list items In-Reply-To: <> References: <> Message-ID: <20060215221937.12333.qmail@webmail3.knology.net> On Wed, 15 Feb 2006 23:10:35 +0100, "thom01" wrote : > [1] > Is there a way of hiding/showing list/table/whatever elements > without rebuilding a new list ? Obviously, you can add or remove list items without "rebuilding" the list from scratch. But no, there's no way to temporarily hide a list item. > [2] > How to initialize the height of a frame whose parent is a > splitter ? > My main window is splitted vertically, the bottom pane > contains a FXText only, I'd like to display 3 lines (or a > given height) only when I create the main window. Please see if this topic from the FOX Community Wiki site addresses your question: http://fox-toolkit.net/cgi-bin/wiki.pl?Cookbook/Setting_The_Relative_Sizes_Of_Panes_In_An_FXSplitter > [3] > I'm still using FXRuby 1.0, is the API available somewhere ? Yes, here: http://www.fxruby.org/1.0/doc/api/ Hope this helps, Lyle From jeroen at fox-toolkit.org Wed Feb 15 17:54:42 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Wed, 15 Feb 2006 16:54:42 -0600 Subject: [fxruby-users] Hide/show list items In-Reply-To: References: Message-ID: <200602151654.42980.jeroen@fox-toolkit.org> On Wednesday 15 February 2006 16:10, thom01 wrote: > Hi, > > [1] > Is there a way of hiding/showing list/table/whatever elements > without rebuilding a new list ? You can delete and re-insert a single item at any arbitrary place in the list. > [2] > How to initialize the height of a frame whose parent is a > splitter ? splitterchild->setHeight() ought to do it. > My main window is splitted vertically, the bottom pane > contains a FXText only, I'd like to display 3 lines (or a > given height) only when I create the main window. The best way [what I'd do] is to call setVisibleRows() on the FXText, then call splitterchild->setHeight(text->getDefaultHeight()+FUDGE) where FUDGE depends on the selected padding and border styles you've defined for the intervening widgets between your text widget and it's splitterchild ancestor. Regards, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 16:50 02/15/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060215/08e532a3/attachment.bin From meinrad.recheis at gmail.com Thu Feb 16 09:06:07 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 16 Feb 2006 15:06:07 +0100 Subject: [fxruby-users] table item suggestions Message-ID: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> hi lyle, TableItem cannot do some things the table can do on it's items: the row and column index spanning? <=> table.itemSpanning? color(=) <=> table.s/getCellColor maybe also these two methods: startInput makePositionVisible would it make sense to add these methods to the interface of tableItem? since tableitem surely knows its table it should be no problem of forwarding the according method calls to the table instance. -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/f33d5dd8/attachment-0001.htm From lyle at knology.net Thu Feb 16 10:09:43 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 16 Feb 2006 09:09:43 -0600 Subject: [fxruby-users] table item suggestions In-Reply-To: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> References: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> Message-ID: <1ebc0dcba00d67f3d5439338baedbdaa@knology.net> On Feb 16, 2006, at 8:06 AM, Meinrad Recheis wrote: > TableItem cannot do some things the table can do on it's items: > > the row and column index > spanning? <=> table.itemSpanning? > color(=)? <=> table.s/getCellColor > > maybe also these two methods: > startInput > makePositionVisible > > would it make sense to add these methods to the interface of > tableItem? > since tableitem surely knows its table it should be no problem of > forwarding the according method calls to the table instance. Currently, the table items do not hold back pointers to the table that owns them. In order to use any of these functions from an FXTableItem instance, we'd need to add that additional data (or require it as an input argument). I have added this as a feature request, and we'll see if it's something we can do in 1.6. From uwe.hartl at gmx.net Thu Feb 16 16:28:11 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 16 Feb 2006 22:28:11 +0100 Subject: [fxruby-users] Delete a button Message-ID: <200602162228.11769.uwe.hartl@gmx.net> Hello, if I delete a button, which was connected to some methods what happens to these connections? Are they deleted automaticaly? Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From lyle at knology.net Thu Feb 16 16:32:27 2006 From: lyle at knology.net (lyle@knology.net) Date: 16 Feb 2006 21:32:27 -0000 Subject: [fxruby-users] Delete a button In-Reply-To: <> References: <> Message-ID: <20060216213227.28867.qmail@webmail4.knology.net> On Thu, 16 Feb 2006 22:28:11 +0100, Uwe Hartl wrote : > if I delete a button, which was connected to some methods what happens to > these connections? Are they deleted automaticaly? Yes. From uwe.hartl at gmx.net Thu Feb 16 16:56:15 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Thu, 16 Feb 2006 22:56:15 +0100 Subject: [fxruby-users] Show the Button Message-ID: <200602162256.15827.uwe.hartl@gmx.net> Hi, thanks for the help. I have one more question for today. $created containt the information if the App is created already. I took the toolbar code from the imageviewer-example to initialize the toolbar. If I add another button after the app is created, it does not show up. I have to resize the MainWindow to change the size of the toolbar, then it is shown. But the button.shown? prints "true". update and show do not show it. What do I do wrong? Here is the code: def addToolBarButton(icon = nil, text = "Button", &command) if (!@toolBarButtons.has_key?(text)) button = FXButton.new(@toolbar, text, icon) @toolBarButtons[text] = button button.connect(SEL_COMMAND) do yield end button.create if $created button.update p button.shown?.to_s else p "This Toolbar Button did exists already!" end end Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From jeroen at fox-toolkit.org Thu Feb 16 17:46:56 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 16 Feb 2006 16:46:56 -0600 Subject: [fxruby-users] table item suggestions In-Reply-To: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> References: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> Message-ID: <200602161647.02663.jeroen@fox-toolkit.org> On Thursday 16 February 2006 08:06, Meinrad Recheis wrote: > hi lyle, > TableItem cannot do some things the table can do on it's items: > > the row and column index > spanning? <=> table.itemSpanning? > color(=) <=> table.s/getCellColor > > maybe also these two methods: > startInput > makePositionVisible > > would it make sense to add these methods to the interface of tableItem? > since tableitem surely knows its table it should be no problem of forwarding > the according method calls to the table instance. The FXTableItem's interface is intended for FXTable, and the FXTable interface is meant for your programs. Thus, FXTableItem doesn't know about FXTable except insofar as when FXTable is passed as a parameter sometimes. Certainly, it is the case that FXTableItem doesn't know which cell it's in, and so doesn't know if it's a spanning item either. I suggest strongly to manipulate items through FXTable and not via FXTableItem directly; manipulating via FXTableItem means FXTable isn't aware anything has changed and thus doesn't know it needs to update or recompute.... - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 16:40 02/16/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/c55e5fb6/attachment.bin From meinrad.recheis at gmail.com Thu Feb 16 17:47:11 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 16 Feb 2006 23:47:11 +0100 Subject: [fxruby-users] Show the Button In-Reply-To: <200602162256.15827.uwe.hartl@gmx.net> References: <200602162256.15827.uwe.hartl@gmx.net> Message-ID: <43d756720602161447o378c5f0ay11f4a034d93c752a@mail.gmail.com> tried recalc or forceRefresh on the toolbar? On 2/16/06, Uwe Hartl wrote: > > Hi, > > thanks for the help. I have one more question for today. > $created containt the information if the App is created already. I took > the > toolbar code from the imageviewer-example to initialize the toolbar. > > If I add another button after the app is created, it does not show up. I > have > to resize the MainWindow to change the size of the toolbar, then it is > shown. > But the button.shown? prints "true". update and show do not show it. What > do > I do wrong? Here is the code: > > > def addToolBarButton(icon = nil, text = "Button", &command) > if (!@toolBarButtons.has_key?(text)) > button = FXButton.new(@toolbar, text, icon) > @toolBarButtons[text] = button > button.connect(SEL_COMMAND) do yield end > button.create if $created > button.update > p button.shown?.to_s > else > p "This Toolbar Button did exists already!" > end > end > > Thanks > Uwe > > -- > *********************************************************************** > Uwe Hartl e-mail: Uwe.Hartl at gmx.net > 91522 Ansbach Telephone: (0981) 9724526 > Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 > Germany > *********************************************************************** > > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/ac0677c1/attachment.htm From jeroen at fox-toolkit.org Thu Feb 16 18:05:30 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 16 Feb 2006 17:05:30 -0600 Subject: [fxruby-users] table item suggestions In-Reply-To: <43d756720602161458p52d87c28v689ed528cb4b825d@mail.gmail.com> References: <43d756720602160606x4f27ab35ge98f27ed9e367b44@mail.gmail.com> <200602161647.02663.jeroen@fox-toolkit.org> <43d756720602161458p52d87c28v689ed528cb4b825d@mail.gmail.com> Message-ID: <200602161705.30819.jeroen@fox-toolkit.org> On Thursday 16 February 2006 16:58, you wrote: > On 2/16/06, Jeroen van der Zijp wrote: > > > > On Thursday 16 February 2006 08:06, Meinrad Recheis wrote: > > > hi lyle, > > > TableItem cannot do some things the table can do on it's items: > > > > > > the row and column index > > > spanning? <=> table.itemSpanning? > > > color(=) <=> table.s/getCellColor > > > > > > maybe also these two methods: > > > startInput > > > makePositionVisible > > > > > > would it make sense to add these methods to the interface of tableItem? > > > since tableitem surely knows its table it should be no problem of > > forwarding > > > the according method calls to the table instance. > > > > The FXTableItem's interface is intended for FXTable, and the FXTable > > interface > > is meant for your programs. > > > > Thus, FXTableItem doesn't know about FXTable except insofar as when > > FXTable is > > passed as a parameter sometimes. > > > > Certainly, it is the case that FXTableItem doesn't know which cell it's > > in, and > > so doesn't know if it's a spanning item either. > > > > I suggest strongly to manipulate items through FXTable and not via > > FXTableItem > > directly; manipulating via FXTableItem means FXTable isn't aware anything > > has > > changed and thus doesn't know it needs to update or recompute.... > > > pity. i was hoping that i did not need to use the fxtable interface to > manipulate items, because lyle > included methods each_row{|tableItemArray| } and > each_column{|tableItemArray| } in FXRuby. > the ruby way of manipulating complex structures is iterating over the > structure instead of loops and indexaccess. > > so i suggest for fxruby a complete rework of the tableitem in fxruby which > forwards its attribute manipulators to the > table interface. i did even implement this allready but then thought it was > not necessary because i thought that tableItem > had almost all attributes the table also provides in its interface. Sorry, this is how its done in C++; Lyle can clue you in on Ruby particulars... - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 17:00 02/16/2006 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060216/d6cfc075/attachment.bin From uwe.hartl at gmx.net Fri Feb 17 14:21:50 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Fri, 17 Feb 2006 20:21:50 +0100 Subject: [fxruby-users] Show the Button In-Reply-To: <43d756720602161447o378c5f0ay11f4a034d93c752a@mail.gmail.com> References: <200602162256.15827.uwe.hartl@gmx.net> <43d756720602161447o378c5f0ay11f4a034d93c752a@mail.gmail.com> Message-ID: <200602172021.51033.uwe.hartl@gmx.net> Thank you, recalc does the trick... Uwe On Thursday 16 February 2006 23:47, Meinrad Recheis wrote: > forceRefresh -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From bjorn.bergqvist at gmail.com Mon Feb 20 02:57:32 2006 From: bjorn.bergqvist at gmail.com (=?ISO-8859-1?Q?Bj=F6rn_Bergqvist?=) Date: Mon, 20 Feb 2006 08:57:32 +0100 Subject: [fxruby-users] FXGLObject canDrag Message-ID: <44936e730602192357s79c10d28p5f04a2d63c92aebe@mail.gmail.com> Hello, I've noticed that when I have a FXGLObject in a GLViewer it's possible to drag it (the FXGLObject). How do I prevent the FXGLObject from being draggable? Regards Bj?rn Bergqvist From lyle at knology.net Mon Feb 20 09:58:20 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 20 Feb 2006 08:58:20 -0600 Subject: [fxruby-users] FXGLObject canDrag In-Reply-To: <44936e730602192357s79c10d28p5f04a2d63c92aebe@mail.gmail.com> References: <44936e730602192357s79c10d28p5f04a2d63c92aebe@mail.gmail.com> Message-ID: <792e9626b0640d4b3be47d63fe39bf69@knology.net> On Feb 20, 2006, at 1:57 AM, Bj?rn Bergqvist wrote: > I've noticed that when I have a FXGLObject in a GLViewer it's possible > to drag it (the FXGLObject). How do I prevent the FXGLObject from > being draggable? You need to override the object's canDrag() method, and have it return false. If you want all objects of that class to be undraggable, you'd want to subclass, e.g. class Cone < Fox::FXGLCone def canDrag false end end or if it's just one particular object that you don't want to be draggable: cone = FXGLCone.new(...) def cone.canDrag; false; end Hope this helps, Lyle From bjorn.bergqvist at gmail.com Mon Feb 20 15:50:05 2006 From: bjorn.bergqvist at gmail.com (=?ISO-8859-1?Q?Bj=F6rn_Bergqvist?=) Date: Mon, 20 Feb 2006 21:50:05 +0100 Subject: [fxruby-users] FXGLObject canDrag In-Reply-To: <792e9626b0640d4b3be47d63fe39bf69@knology.net> References: <44936e730602192357s79c10d28p5f04a2d63c92aebe@mail.gmail.com> <792e9626b0640d4b3be47d63fe39bf69@knology.net> Message-ID: <44936e730602201250q6b86e947y743eb1e3b5d338cc@mail.gmail.com> It did help. Thank you! On 2/20/06, Lyle Johnson wrote: > > On Feb 20, 2006, at 1:57 AM, Bj?rn Bergqvist wrote: > > > I've noticed that when I have a FXGLObject in a GLViewer it's possible > > to drag it (the FXGLObject). How do I prevent the FXGLObject from > > being draggable? > > You need to override the object's canDrag() method, and have it return > false. If you want all objects of that class to be undraggable, you'd > want to subclass, e.g. > > class Cone < Fox::FXGLCone > def canDrag > false > end > end > > or if it's just one particular object that you don't want to be > draggable: > > cone = FXGLCone.new(...) > def cone.canDrag; false; end > > Hope this helps, > > Lyle > > From thom01 at laposte.net Fri Feb 24 11:36:44 2006 From: thom01 at laposte.net (thom01) Date: Fri, 24 Feb 2006 17:36:44 +0100 Subject: [fxruby-users] Advanced frame Message-ID: Hi, My main window is a vertical frame, it contains an "advanced button" to display advanced parameters when clicked. I tried something like that (see below) but it seems the main window is never resized ? Thanks Thomas --------------------------------- class MyMainWindow < FXMainWindow attr :advancedFrame def initialize(app) super(app, "MyMainWindow") contents = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) advancedButton = FXButton.new(contents, "Advanced >>", nil, self, 0, FRAME_RAISED|FRAME_THICK) advancedButton.connect(SEL_COMMAND) do if @advancedFrame.shown? self.height -= @advancedFrame.height @advancedFrame.hide advancedButton.text = "Advanced >>" else self.height += @advancedFrame.height @advancedFrame.show advancedButton.text = "<< Basic" end self.recalc end end end #--------------------------- app = FXApp.new mainWindow = MyMainWindow.new(app) app.create mainWindow.advancedFrame.hide mainWindow.height -= mainWindow.advancedFrame.height mainWindow.show(PLACEMENT_SCREEN) app.run Acc?dez au courrier ?lectronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 ?/mn) ; t?l : 08 92 68 13 50 (0,34?/mn) From lyle at knology.net Fri Feb 24 13:10:33 2006 From: lyle at knology.net (lyle@knology.net) Date: 24 Feb 2006 18:10:33 -0000 Subject: [fxruby-users] Advanced frame In-Reply-To: <> References: <> Message-ID: <20060224181033.546.qmail@webmail4.knology.net> On Fri, 24 Feb 2006 17:36:44 +0100, "thom01" wrote : > My main window is a vertical frame, it contains an "advanced > button" to display advanced parameters when clicked. > > I tried something like that (see below) but it seems the main > window is never resized ? Try calling resize(w, h) instead of setting the window's width and height directly. From uwe.hartl at gmx.net Sat Feb 25 16:54:00 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Sat, 25 Feb 2006 22:54:00 +0100 Subject: [fxruby-users] Selection within a TextField Message-ID: <200602252254.01005.uwe.hartl@gmx.net> Hello Patrick Fernie, did you ever get the problem you asked for (back in June 2005: http://rubyforge.org/pipermail/fxruby-users/2005-June/000377.html)resolved? I would be interested in a solution to this. Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From uwe.hartl at gmx.net Mon Feb 27 17:24:53 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Mon, 27 Feb 2006 23:24:53 +0100 Subject: [fxruby-users] FXChoiceBox Message-ID: <200602272324.53767.uwe.hartl@gmx.net> Hello, can somebody give me an example of an FXChoiceBox? f = File.open("icons/bigpenguin.png", "rb") icon = FXPNGIcon.new(getApp(), f.read) choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) self.text = "" if choice == 1 This just does not work. What do I do wrong and where do I get such easy example code? Is there somewhere a database of code snippets for FXRuby? Thanks Uwe -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From lyle at knology.net Mon Feb 27 19:21:35 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 27 Feb 2006 18:21:35 -0600 Subject: [fxruby-users] FXChoiceBox In-Reply-To: <200602272324.53767.uwe.hartl@gmx.net> References: <200602272324.53767.uwe.hartl@gmx.net> Message-ID: <40e99d3d8c47d61637cd8e55f194df30@knology.net> On Feb 27, 2006, at 4:24 PM, Uwe Hartl wrote: > can somebody give me an example of an FXChoiceBox? > f = File.open("icons/bigpenguin.png", "rb") > icon = FXPNGIcon.new(getApp(), f.read) > choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter > Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) > self.text = "" if choice == 1 > > This just does not work. What do I do wrong and where do I get such > easy > example code? Your code looks fine; there appears to be a bug in the wrappers for this function. I've added a bug report and this should get fixed in the next release. From meinrad.recheis at gmail.com Tue Feb 28 10:39:38 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 28 Feb 2006 16:39:38 +0100 Subject: [fxruby-users] howto escape & Message-ID: <43d756720602280739geb403abwa0903bd886f71500@mail.gmail.com> hi all, how to escape & that it is shown as & and not as _ in FOX? thx in advance, -- henon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060228/8e913571/attachment.htm From lyle at knology.net Tue Feb 28 10:40:07 2006 From: lyle at knology.net (lyle@knology.net) Date: 28 Feb 2006 15:40:07 -0000 Subject: [fxruby-users] howto escape & In-Reply-To: <> References: <> Message-ID: <20060228154007.31026.qmail@webmail2.knology.net> On Tue, 28 Feb 2006 16:39:38 +0100, "Meinrad Recheis" wrote : > how to escape & that it is shown as & and not as _ in FOX? > thx in advance, Henon, I'm pretty sure that you just double the ampersand, i.e. FXMenuCommand.new(p, "Beans && Franks", ...) is displayed as "Beans & Franks". If that's not the case, I can find out tonight when I get home (source code isn't handy here at work). From uwe.hartl at gmx.net Tue Feb 28 16:25:09 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Tue, 28 Feb 2006 22:25:09 +0100 Subject: [fxruby-users] FXChoiceBox In-Reply-To: <40e99d3d8c47d61637cd8e55f194df30@knology.net> References: <200602272324.53767.uwe.hartl@gmx.net> <40e99d3d8c47d61637cd8e55f194df30@knology.net> Message-ID: <200602282225.10528.uwe.hartl@gmx.net> Thank youvery much. I just wait until it happens. See you Uwe On Tuesday 28 February 2006 01:21, Lyle Johnson wrote: > On Feb 27, 2006, at 4:24 PM, Uwe Hartl wrote: > > can somebody give me an example of an FXChoiceBox? > > f = File.open("icons/bigpenguin.png", "rb") > > icon = FXPNGIcon.new(getApp(), f.read) > > choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter > > Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) > > self.text = "" if choice == 1 > > > > This just does not work. What do I do wrong and where do I get such > > easy > > example code? > > Your code looks fine; there appears to be a bug in the wrappers for > this function. I've added a bug report and this should get fixed in the > next release. -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From uwe.hartl at gmx.net Tue Feb 28 16:31:37 2006 From: uwe.hartl at gmx.net (Uwe Hartl) Date: Tue, 28 Feb 2006 22:31:37 +0100 Subject: [fxruby-users] ProgressiveSelectTextField Message-ID: <200602282231.37981.uwe.hartl@gmx.net> Hello, is somebody interested on something like this? There is a little problem with the FXChoiceBox.ask which I just replaced by a p "Warning" and I have some difficulties how to quote a "\" and "(" in a regular expression but everything else seems to work in here. Can somebody help me out here? Is there a database of code snippets, where I would put something like this, or do you guys think, people should write this kind of stuff (extensions of widgets) themselves? See you, Uwe by the way, "*" is a wildcard in here... require 'fox14' include Fox class ProgressiveSelectTextField < FXTextField include Responder def initialize(parent, new_entries_allowed = true, confirm_new_entries = true, nc = 3, tgt=nil, sel=0, opts=TEXTFIELD_NORMAL, x=0, y=0, w=0, h=0, pl=DEFAULT_PAD, pr=DEFAULT_PAD, pt=DEFAULT_PAD, pb=DEFAULT_PAD) super(parent, nc, tgt=nil, sel=0, opts = LAYOUT_FILL_X) @new_entries_allowed = new_entries_allowed @confirm_new_entries = confirm_new_entries @fields = [] @items = [] @selected = 0 @old_text = "" connect(SEL_CHANGED, method(:on_changed)) connect(SEL_KEYPRESS, method(:on_key)) connect(SEL_FOCUSIN, method(:on_focus_in)) connect(SEL_FOCUSOUT, method(:on_focus_out)) connect(SEL_LEFTBUTTONPRESS, method(:on_clicked)) enable @sp = FXMenuPane.new(self, POPUP_VERTICAL|FRAME_RAISED|FRAME_THICK) @list = FXList.new(@sp, nil, 0, LIST_SINGLESELECT|LAYOUT_FILL_X| LAYOUT_FILL_Y) @list.connect(SEL_DOUBLECLICKED) { |sender, sel, data| self.text = @items[data] self. selectAll @sp.popdown } @list.connect(SEL_KEYPRESS) { |sender, sel, event| self.text = event.to_s @sp.popdown } end def appendItem(text) @fields << text end def append_array(txt) txt.each do |tt| appendItem(tt) end end def set_default_text(def_text = "*") self.text = def_text @old_text = def_text end def on_clicked(sender, sel, event) on_focus_in(sender, sel, event) end def on_focus_in(sender, sel, event) if !@sp.shown?() populateList(self.text) ret = true @selected = 0 else ret = false end ret end def on_focus_out(sender, sel, data) if (@new_entries_allowed && @confirm_new_entries && !@fields.include? (self.text)) f = File.open("icons/bigpenguin.png", "rb") icon = FXPNGIcon.new(getApp(), f.read) p "here there is the need for asking if the user wants to get a new text string in the field (not existent in the Array. Not implemented" #choice = FXChoiceBox.ask(getApp(), opts = 0, caption = "Unbekannter Eintrag", text = "Wirklich neuen Wert anlegen?", icon, ["Ja", "Nein"]) #self.text = "" if choice == 1 end end def on_changed(sender, sel, data) new = !populateList(data) if !@new_entries_allowed && new self.text = @old_text end @old_text = self.text @selected = 0 end def sel if @selected < @list.numItems @list.makeItemVisible(@selected) @list.selectItem(@selected) end end def on_key(sender, sel, event) if populateList(self.text) if ((@selected < ((@list.numItems) - 1)) && event.code == 65364) #arrow down @selected += 1 self.sel elsif ((@selected > 0) && event.code == 65362) #arrow up @selected -= 1 self.sel elsif event.code == 65293 # Enter key self.text = @list.getItem(@selected).text self.cursorPos = self.text.length self.selectAll @sp.popdown end end false end def popup xy = translateCoordinatesTo(getRoot(), x, y) @sp.popup(nil, xy[0], xy[1]+height, self.width, 100) @sp.recalc @sp.create end def populateList(searchString = "") ss = searchString.gsub("(", ".") ss.gsub!(")", ".") p ss re = Regexp.new(ss.gsub("*", "(\\D*|\\d*)")) p re @items = @fields.collect { |val| val if val.match(re).to_s != ""} @items.delete(nil) @list.clearItems if @items.length > 0 @items.each do |it| @list.appendItem(it) end popup sel ret = true else @sp.popdown() ret = false end return ret end end class Welcome < FXMainWindow def initialize() super($theApp, 'ComboBox', icon=nil, miniIcon=nil, opts=DECOR_ALL, x=0, y=0, width=300, height=300) ta = ProgressiveSelectTextField.new(self) txt = ["able", "apartment", "apple", "Appolinaris", "andruide", "berta", "aparent", "aple", "Apinaris", "anduide", "beta", "Zeta"] ta.append_array(txt) ta.set_default_text(txt[2]) end end if $0 == __FILE__ $theApp = FXApp.new $wn = Welcome.new $wn.show $theApp.create $theApp.run end -- *********************************************************************** Uwe Hartl e-mail: Uwe.Hartl at gmx.net 91522 Ansbach Telephone: (0981) 9724526 Am M?hlfeld 8 Notfall-Mobil: (0160)90418680 Germany *********************************************************************** From r.fulton at auckland.ac.nz Tue Feb 28 16:58:30 2006 From: r.fulton at auckland.ac.nz (Russell Fulton) Date: Wed, 01 Mar 2006 10:58:30 +1300 Subject: [fxruby-users] ProgressiveSelectTextField In-Reply-To: <200602282231.37981.uwe.hartl@gmx.net> References: <200602282231.37981.uwe.hartl@gmx.net> Message-ID: <4404C786.7050106@auckland.ac.nz> Uwe Hartl wrote: > Hello, > > is somebody interested on something like this? There is a little problem with > the FXChoiceBox.ask which I just replaced by a > > p "Warning" > > and I have some difficulties how to quote a "\" and "(" in a regular > expression but everything else seems to work in here. Can somebody help me > out here? "special chars in REs are quoted by prefixing them with a '\' eg /\w+\\\w+\([^)]*\)/ would match \jadahjasg\fghjagfkj(jgsdfjksdghjkf) Russell From scott at butlerpress.com Tue Feb 28 16:58:32 2006 From: scott at butlerpress.com (Scott Willson) Date: Tue, 28 Feb 2006 13:58:32 -0800 Subject: [fxruby-users] ProgressiveSelectTextField In-Reply-To: <200602282231.37981.uwe.hartl@gmx.net> References: <200602282231.37981.uwe.hartl@gmx.net> Message-ID: <1141163912.4404c788591f0@www.cheryljwillson.com> Quoting Uwe Hartl : > Hello, > > is somebody interested on something like this? There is a little problem with > > the FXChoiceBox.ask which I just replaced by a > > p "Warning" > > and I have some difficulties how to quote a "\" and "(" in a regular > expression but everything else seems to work in here. Can somebody help me > out here? > > Is there a database of code snippets, where I would put something like this, > > or do you guys think, people should write this kind of stuff (extensions of > widgets) themselves? > > See you, > > Uwe > > by the way, "*" is a wildcard in here... > Uwe, This is great! I tried something similar and it doesn't work nearly as nice as this. What do you need help on? Scott