From philippe.lang at attiksystem.ch Fri Dec 1 18:26:55 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Sat, 2 Dec 2006 00:26:55 +0100 Subject: [fxruby-users] runModalWhileShown Message-ID: <6C0CF58A187DA5479245E0830AF84F421D1571@poweredge.attiksystem.ch> Hi, I have a problem with an application that uses popups in TreeLists: this test code shows a TreeList that you can expand recursively with a right click on the base node. It runs fine, you will see, but afterwards the applications starts behaving strangely: if you use the scroller to look at nodes at the bottom, and go back with the cursor in the TreeList pane, you will see you go back to the first node. This DOES NOT happen when you expand nodes "by hand", without showing the popup menu. I could find that the problems apparently starts with the line: self.getApp().runModalWhileShown(menu) Apparently this call breaks something in the event management. As far as I know, this is how to code popups in Fox? Am I doing anything wrong? Thanks to anyone that can help! Philippe My config: FXRuby 1.6.3 / Ruby 1.8.4 / Windows XP ----------------------------------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 200, 200) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) FXMenuTitle.new(menubar, "&File", nil, filemenu) # Frame treelistframe = FXVerticalFrame.new(self, FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0) # Tree tree = FXTreeList.new(treelistframe, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_RIGHT|TREELIST_SHOWS_LINES| TREELIST_SHOWS_BOXES|TREELIST_ROOT_BOXES|TREELIST_EXTENDEDSELECT) # Test data tb = tree.appendItem(nil, "Base") (0..20).each do t1 = tree.appendItem(tb, "ok") t2 = tree.appendItem(t1, "ok") end # Contextual menu when right-clicking in tree tree.connect(SEL_RIGHTBUTTONPRESS) do |sender, selector, data| menu = FXMenuPane.new(self) FXMenuCommand.new(menu, "expand all").connect(SEL_COMMAND) do |sender, selector, data| # Expanding all nodes, recursively def expandAllTree(tree, item) item.each do |e| expandAllTree(tree, e) end tree.expandTree(item) end expandAllTree(tree, tb) end menu.create() menu.popup(nil, data.root_x, data.root_y) menu.grabKeyboard self.getApp().runModalWhileShown(menu) end end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run end -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061202/8f1a3839/attachment.bin From philippe.lang at attiksystem.ch Sat Dec 2 03:26:59 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Sat, 2 Dec 2006 09:26:59 +0100 Subject: [fxruby-users] FXFoldingList & FXFoldingItem missing iterators Message-ID: <6C0CF58A187DA5479245E0830AF84F421D1572@poweredge.attiksystem.ch> Hi, I have noticed the FXFoldingList and FXFoldingItem classes do not have the same "each" iterator as their FXTree... counterpart, making them not 100% compatible. Here is something for file iterators.rb, for the next release of FXRuby. ------------- class FXFoldingList include Enumerable # # Calls block once for each root-level folding list item, passing a # reference to that item as a parameter. # def each # :yields: aFoldingItem current = firstItem while current != nil yield current current = current.next end self end end class FXFoldingItem include Enumerable # # Calls block once for each child of this folding list item, passing a # reference to that child item as a parameter. # def each # :yields: aFoldingItem current = first while current != nil yield current current = current.next end self end end ----------------- Cheers, --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061202/58f80441/attachment.bin From philippe.lang at attiksystem.ch Sun Dec 3 02:58:23 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Sun, 3 Dec 2006 08:58:23 +0100 Subject: [fxruby-users] runModalWhileShown Message-ID: <6C0CF58A187DA5479245E0830AF84F421D1574@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Hi, > > I have a problem with an application that uses popups in > TreeLists: this test code shows a TreeList that you can > expand recursively with a right click on the base node. It > runs fine, you will see, but afterwards the applications > starts behaving strangely: if you use the scroller to look at > nodes at the bottom, and go back with the cursor in the > TreeList pane, you will see you go back to the first node. > This DOES NOT happen when you expand nodes "by hand", without showing > the popup menu. > > I could find that the problems apparently starts with the line: > > self.getApp().runModalWhileShown(menu) > > Apparently this call breaks something in the event management. > As far as I know, this is how to code popups in Fox? Am I > doing anything wrong? > > Thanks to anyone that can help! Apparently, reacting on RIGHTBUTTONRELEASE instead of RIGHTBUTTONPRESS and the problem disappears, as explained here: http://fox-toolkit.net/cgi-bin/wiki.pl?action=browse&diff=1&id=Cookbook/Right_Mouse_Context_Menu Lyle, what exactly is the reason behind that? Is there a way to react on RIGHTBUTTONPRESS anyway? This is quite strange to have a popup that appears when you release your mouse button... --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061203/beb858d5/attachment.bin From lyle at knology.net Tue Dec 5 08:43:54 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 5 Dec 2006 07:43:54 -0600 Subject: [fxruby-users] FXFoldingList & FXFoldingItem missing iterators In-Reply-To: <6C0CF58A187DA5479245E0830AF84F421D1572@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F421D1572@poweredge.attiksystem.ch> Message-ID: On Dec 2, 2006, at 2:26 AM, Philippe Lang wrote: > Hi, > > I have noticed the FXFoldingList and FXFoldingItem classes do not > have the same "each" iterator as their FXTree... counterpart, > making them not 100% compatible. > > Here is something for file iterators.rb, for the next release of > FXRuby. Thanks, Philippe! From ardhazes at yahoo.com Sat Dec 9 12:50:11 2006 From: ardhazes at yahoo.com (e aldaz) Date: Sat, 9 Dec 2006 17:50:11 +0000 (GMT) Subject: [fxruby-users] Exiting a DialogBox created with FoxGUIb Message-ID: <475989.99726.qm@web51802.mail.yahoo.com> Dear All I am new to FOX and FoxGUIb. I have found FoxGUIb very useful and I have created an application with menus, one of which calls a DialogBox for the user to enter some values. After finishing the user will press OK to save data. Unfortunately I don’t know how to let the DialogBox know tha tonce the OK button is pressed it should exit. It seems I need to send message ID_ACCEPT to some recipient (not sure which) when the button OK is clicked? But no idea how to do that with the code that is generated by FoxGUIb as the button is created in a different way to what I have seen in the examples in the web, and I have no idea how to relate them ( I'm afraid I haven't really understood the FXButton API) The dialog box examples I have seen do something like the following: # Accept accept = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) However the FoxGUIb creates a button doing: FX::Button.new(@verticalframe7){|w| @button_ok=w w.wdg_name='button_ok' w.text="Ok" w.width=21 w.y=4 w.height=21 w.layoutHints=40 w.x=26 w.selector=FX::DialogBox::ID_QUIT @button_ok.connect(Fox::SEL_COMMAND){ lat = textfield_lat.text lon = textfield_lon.text heading =textfield_heading.text #How do I indicate that I want to accept and exit?:? } } So in this last example, how do I exit the dialog when button is clicked? Thanks very much for your help Eduardo ___________________________________________________________ The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html From erne at powernav.com Sat Dec 9 16:51:20 2006 From: erne at powernav.com (Ernest Ellingson) Date: Sat, 09 Dec 2006 16:51:20 -0500 Subject: [fxruby-users] Exiting a DialogBox created with FoxGUIb In-Reply-To: <475989.99726.qm@web51802.mail.yahoo.com> References: <475989.99726.qm@web51802.mail.yahoo.com> Message-ID: <457B2FD8.7080409@powernav.com> e aldaz wrote: > Dear All > > I am new to FOX and FoxGUIb. I have found FoxGUIb very > useful and I have created an application with menus, > one of which calls a DialogBox for the user to enter > some values. After finishing the user will press OK to > save data. > > Unfortunately I don’t know how to let the > DialogBox know tha tonce the OK button is pressed it > should exit. It seems I need to send message ID_ACCEPT > to some recipient (not sure which) when the button OK > is clicked? But no idea how to do that with the code > that is generated by FoxGUIb as the button is created > in a different way to what I have seen in the examples > in the web, and I have no idea how to relate them ( > I'm afraid I haven't really understood the FXButton > API) > > The dialog box examples I have seen do something like > the following: > > # Accept > accept = FXButton.new(buttons, "&Accept", nil, > self, ID_ACCEPT, > FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y) > > > However the FoxGUIb creates a button doing: > > FX::Button.new(@verticalframe7){|w| > @button_ok=w > w.wdg_name='button_ok' > w.text="Ok" > w.width=21 > w.y=4 > w.height=21 > w.layoutHints=40 > w.x=26 > w.selector=FX::DialogBox::ID_QUIT > > @button_ok.connect(Fox::SEL_COMMAND){ > lat = textfield_lat.text > lon = textfield_lon.text > heading > =textfield_heading.text > #How > do I indicate that I want to accept and exit?:? > > } > } > > So in this last example, how do I exit the dialog when > button is clicked? > > Thanks very much for your help > Eduardo > > > Hi Eduardo: Take a look at the example dialog.rb in the examples dir that came with FXRuby. There they have a function def onCmdShowDialogModal(sender, sel, ptr) That example should solve your problem. If you don't have the examples file look here http://www.fxruby.org/ In the documentation, there are examples. The dialog.rb example is there along with the code. Ernie From lyle at knology.net Tue Dec 12 10:01:22 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 12 Dec 2006 09:01:22 -0600 Subject: [fxruby-users] about a raddio-button in fxruby In-Reply-To: <200612122333.26769.ruby.freeman@gmail.com> References: <200612122333.26769.ruby.freeman@gmail.com> Message-ID: On Dec 12, 2006, at 7:33 AM, freeman wrote: > Good day, Lyle! > Thanks a lot for your job!!! > I have one question - when I click on a radio-button, it switches > so slowly.. > is it bug? or it should be so? (I've tried different version under > different > operation systems) It shouldn't be especially slow, but it depends on how long it takes for the GUI to get time scheduled to it. If your application isn't using threads, you might try turning off FXRuby support for Ruby threads: app.threadsEnabled = false Another option would be to look at Joel VanDerWerf's FoxTails library (see RAA for this). Hope this helps, Lyle From philippe.lang at attiksystem.ch Tue Dec 12 10:37:41 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Tue, 12 Dec 2006 16:37:41 +0100 Subject: [fxruby-users] about a raddio-button in fxruby Message-ID: <6C0CF58A187DA5479245E0830AF84F421D15D9@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > On Dec 12, 2006, at 7:33 AM, freeman wrote: > >> Good day, Lyle! >> Thanks a lot for your job!!! >> I have one question - when I click on a radio-button, it switches so >> slowly.. is it bug? or it should be so? (I've tried different >> version under different operation systems) > > It shouldn't be especially slow, but it depends on how long > it takes for the GUI to get time scheduled to it. If your > application isn't using threads, you might try turning off FXRuby > support for Ruby threads: > > app.threadsEnabled = false > > Another option would be to look at Joel VanDerWerf's FoxTails library > (see RAA for this). > > Hope this helps, Maybe another option is to use: app.forceRefresh This works fine for me. By the way, Lyle, I think Fox 1.7 has got a new event-dispatch structure being put in place, based on a new FXReactor class, right? This is supposed to speed-up the refresh? --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061212/f55f53be/attachment.bin From philippe.lang at attiksystem.ch Fri Dec 15 16:42:57 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 15 Dec 2006 22:42:57 +0100 Subject: [fxruby-users] Iterators Message-ID: <6C0CF58A187DA5479245E0830AF84F421D1603@poweredge.attiksystem.ch> Hi, Attached to this message is an improved version of the FXRuby 1.6.3 iterators for FXTreeItem, FXTreeList, FXFoldingList, FXFoldingItem and FXTreeListBox. The old version of the iterators was: def each current = first while current != nil yield current current = current.next end self end If your decide to delete a node in the yield, your iterator fails when current.next is called, since current does not exist anymore... The new version is: def each current = first while current != nil next_current = current.next yield current current = next_current end self end Cheers, --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: iterators.rb Type: application/octet-stream Size: 8688 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061215/be7691a7/attachment-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061215/be7691a7/attachment-0001.bin From AEtzold at gmx.de Sun Dec 17 17:15:09 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Sun, 17 Dec 2006 23:15:09 +0100 Subject: [fxruby-users] [fxruby] howto show a warning message that disappears again? In-Reply-To: <475989.99726.qm@web51802.mail.yahoo.com> References: <475989.99726.qm@web51802.mail.yahoo.com> Message-ID: <20061217221509.188310@gmx.net> Dear all, I have an application in which I want to show a warning message "this will take some time..." if somebody presses a button. I have tried to do this with FXSplashWindow, but without much success so far: --- btn.connect(SEL_COMMAND) { msg=FXSplashWindow.new(self,'warn.gif', opts=SPLASH_DESTROY, ms=5000,text='this will take some time') system(...) } --- Now, I get: 306:in `initialize': No matching function for overloaded 'new_FXSplashWindow' (ArgumentError) from f57.rb:306:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.1/lib/fox16/responder2.rb:57:in `onHandleMsg' from f57.rb:1073:in `runme' from f57.rb:1087 ------------------------------- What am I doing wrong ? Thanks in advance, Axel -- "Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! From philippe.lang at attiksystem.ch Mon Dec 18 02:17:19 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 18 Dec 2006 08:17:19 +0100 Subject: [fxruby-users] [fxruby] howto show a warning message thatdisappears again? Message-ID: <6C0CF58A187DA5479245E0830AF84F421D160C@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Dear all, > > I have an application in which I want to show a warning > message "this will take some time..." if somebody presses a button. > I have tried to do this with FXSplashWindow, but without much success > so far: I'm sorry I cannot help, but is a Spash Screen the best widget to use in your case? This is normally used during startup. What about using an FXMessageBox instead? --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061218/165833fb/attachment.bin From AEtzold at gmx.de Mon Dec 18 11:16:05 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Mon, 18 Dec 2006 17:16:05 +0100 Subject: [fxruby-users] [fxruby] howto show a warning message thatdisappears again? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F421D160C@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F421D160C@poweredge.attiksystem.ch> Message-ID: <20061218161605.288780@gmx.net> Dear Philippe, thank you for responding. I think I normally would have used FXMessageBox, but here, I want to tell an impatient user to wait a while while an external application is started. I want the MessageBox to be shown, say 3 to 5 seconds, and then disappear again, without further user action, like clicking a button. I don't think that's possible with FXMessageBox, is it ? Thank you, Best regards, Axel -------- Original-Nachricht -------- Datum: Mon, 18 Dec 2006 08:17:19 +0100 Von: "Philippe Lang" An: fxruby-users at rubyforge.org Betreff: Re: [fxruby-users] [fxruby] howto show a warning message thatdisappears again? > fxruby-users-bounces at rubyforge.org wrote: > > > Dear all, > > > > I have an application in which I want to show a warning > > message "this will take some time..." if somebody presses a button. > > I have tried to do this with FXSplashWindow, but without much success > > so far: > > I'm sorry I cannot help, but is a Spash Screen the best widget to use in > your case? This is normally used during startup. What about using an > FXMessageBox instead? > > --------------- > Philippe Lang > Attik System > -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer From philippe.lang at attiksystem.ch Mon Dec 18 12:33:53 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 18 Dec 2006 18:33:53 +0100 Subject: [fxruby-users] [fxruby] howto show a warningmessage thatdisappears again? Message-ID: <6C0CF58A187DA5479245E0830AF84F421D1614@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > Dear Philippe, > > thank you for responding. > I think I normally would have used FXMessageBox, but here, I > want to tell an impatient user to wait a while while an > external application is started. > I want the MessageBox to be shown, say 3 to 5 seconds, and > then disappear again, without further user action, like clicking a > button. I don't think that's possible with FXMessageBox, is it ? > > Thank you, > > Best regards, > Axel > > -------- Original-Nachricht -------- > Datum: Mon, 18 Dec 2006 08:17:19 +0100 > Von: "Philippe Lang" > An: fxruby-users at rubyforge.org > Betreff: Re: [fxruby-users] [fxruby] howto show a warning > message thatdisappears again? > >> fxruby-users-bounces at rubyforge.org wrote: >> >>> Dear all, >>> >>> I have an application in which I want to show a warning message >>> "this will take some time..." if somebody presses a button. >>> I have tried to do this with FXSplashWindow, but without much >>> success so far: >> >> I'm sorry I cannot help, but is a Spash Screen the best widget to use >> in your case? This is normally used during startup. What about using >> an FXMessageBox instead? Hum, then have you tried the FXProgressDialog class maybe? Seems to be exactly what you are searching for? --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061218/c46fca9e/attachment.bin From erne at powernav.com Mon Dec 18 12:34:07 2006 From: erne at powernav.com (Ernest Ellingson) Date: Mon, 18 Dec 2006 12:34:07 -0500 Subject: [fxruby-users] [fxruby] howto show a warning message thatdisappears again? In-Reply-To: <20061218161605.288780@gmx.net> References: <6C0CF58A187DA5479245E0830AF84F421D160C@poweredge.attiksystem.ch> <20061218161605.288780@gmx.net> Message-ID: <4586D10F.3000808@powernav.com> Why not try a modal dialog. When it shows start a thread with a timer to close the modal dialog after x number of seconds. Ernie Axel Etzold wrote: > Dear Philippe, > > thank you for responding. > I think I normally would have used FXMessageBox, but > here, I want to tell an impatient user to wait a > while while an external application is started. > I want the MessageBox to be shown, say 3 to 5 seconds, > and then disappear again, without further user action, > like clicking a button. > I don't think that's possible with FXMessageBox, is it ? > > Thank you, > > Best regards, > Axel > > -------- Original-Nachricht -------- > Datum: Mon, 18 Dec 2006 08:17:19 +0100 > Von: "Philippe Lang" > An: fxruby-users at rubyforge.org > Betreff: Re: [fxruby-users] [fxruby] howto show a warning message thatdisappears again? > > >> fxruby-users-bounces at rubyforge.org wrote: >> >> >>> Dear all, >>> >>> I have an application in which I want to show a warning >>> message "this will take some time..." if somebody presses a button. >>> I have tried to do this with FXSplashWindow, but without much success >>> so far: >>> >> I'm sorry I cannot help, but is a Spash Screen the best widget to use in >> your case? This is normally used during startup. What about using an >> FXMessageBox instead? >> >> --------------- >> Philippe Lang >> Attik System >> >> > > From ggarra at advancedsl.com.ar Mon Dec 18 23:15:08 2006 From: ggarra at advancedsl.com.ar (gga) Date: Tue, 19 Dec 2006 01:15:08 -0300 Subject: [fxruby-users] FXRuby - Fox versions Message-ID: <4587674C.9040108@advancedsl.com.ar> Hi, Lyle. I am now trying to get fxruby working on a brand new Kubuntu distro. I've downloaded fox1.4 (using Debian's standard apt-get) and got fxruby1.4.7 (using rubygems). However, when the gem is compiled, it creates a bunch of errors, like: fx3d_wrap.cpp:808: error: no matching function for call to ?plane(const FX::FXVec3d&, const FX::FXVec3d&)? fx3d_wrap.cpp:743: error: no matching function for call to ?normal(const FX::FXVec3d&, const FX::FXVec3d&, const FX::FXVec3d&, const FX::FXVec3d&)? I'm guessing it is a versioning problem between the fxruby swig wrapper and the actual fox library. Is there any web page listing which fxruby corresponds to each fxruby? -- Gonzalo Garramu?o ggarra at advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy From lyle at knology.net Tue Dec 19 08:59:00 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 19 Dec 2006 07:59:00 -0600 Subject: [fxruby-users] FXRuby - Fox versions In-Reply-To: <4587674C.9040108@advancedsl.com.ar> References: <4587674C.9040108@advancedsl.com.ar> Message-ID: <3F1F2AC9-19A4-40DC-BAD5-8DEB91E8F0AA@knology.net> On Dec 18, 2006, at 10:15 PM, gga wrote: > I am now trying to get fxruby working on a brand new Kubuntu distro. > I've downloaded fox1.4 (using Debian's standard apt-get) and got > fxruby1.4.7 (using rubygems). > > However, when the gem is compiled, it creates a bunch of errors, like: > fx3d_wrap.cpp:808: error: no matching function for call to ?plane > (const > FX::FXVec3d&, const FX::FXVec3d&)? > fx3d_wrap.cpp:743: error: no matching function for call to ?normal > (const > FX::FXVec3d&, const FX::FXVec3d&, const FX::FXVec3d&, const > FX::FXVec3d&)? > > I'm guessing it is a versioning problem between the fxruby swig > wrapper > and the actual fox library. > Is there any web page listing which fxruby corresponds to each fxruby? Well, generally speaking, FXRuby version 1.4 corresponds to FOX version 1.4, and FXRuby version 1.6 corresponds to FOX version 1.6. I suspect that the errors that you're seeing indicate some more fundamental configuration problem, like the FOX 1.4 include files aren't installed, or something along those lines. Can you send a more complete record of the compiler output? From ggarra at advancedsl.com.ar Tue Dec 19 15:22:58 2006 From: ggarra at advancedsl.com.ar (gga) Date: Tue, 19 Dec 2006 17:22:58 -0300 Subject: [fxruby-users] FXRuby - Fox versions In-Reply-To: <3F1F2AC9-19A4-40DC-BAD5-8DEB91E8F0AA@knology.net> References: <4587674C.9040108@advancedsl.com.ar> <3F1F2AC9-19A4-40DC-BAD5-8DEB91E8F0AA@knology.net> Message-ID: <45884A22.6000600@advancedsl.com.ar> Lyle Johnson wrote: > Well, generally speaking, FXRuby version 1.4 corresponds to FOX > version 1.4, and FXRuby version 1.6 corresponds to FOX version 1.6. I > suspect that the errors that you're seeing indicate some more > fundamental configuration problem, like the FOX 1.4 include files > aren't installed, or something along those lines. Can you send a more > complete record of the compiler output? > The includes are there, in /usr/include/fox-1.4. The rubygems log is attached. It seems to me a bug in the FOX includes. The scope resolution of the friend functions is determined by their previous appearance according to the C++ spec, not by its friend definition, if I understand correctly. The swig wrappers look for FX::plane() and FX::normal(), which are never defined in my 1.4 includes (only their friend declaration appears). > g++ -v gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) The bug in the fox includes is similar to this: namespace FX { // int f( int, int, int ); // int f( float, float ); struct A { friend int f( int, int, int ); friend int f( float, float ); }; } int func() { return FX::f(1,2,3); } This will not compile unless the two define lines are commented out. -- Gonzalo Garramu?o ggarra at advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fxruby.txt Url: http://rubyforge.org/pipermail/fxruby-users/attachments/20061219/03b12cb9/attachment-0001.txt From philippe.lang at attiksystem.ch Fri Dec 22 07:13:28 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 22 Dec 2006 13:13:28 +0100 Subject: [fxruby-users] Empty FXTable click workaround Message-ID: <6C0CF58A187DA5479245E0830AF84F421D163C@poweredge.attiksystem.ch> Hi, There is a small bug for quite a long time in FXRuby (At least FXRuby, but this might be related to Fox, I don't know...) where a click inside an empty FXTable crashes the application. I have just found a workaround, simply by overloading a few functions in FXTable. def startInput(row, col) super unless (row < 0 or col < 0) end def setCurrentItem(row, column, notify=false) super unless (row < 0 or column < 0) end def makePositionVisible(row, column) super unless (row < 0 or column < 0) end This works just fine for me. I hope it can help track the problem. Merry Christmas to everyone, Regards from Switzerland, --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061222/01fcaec6/attachment.bin