From me at soumya.name Tue Sep 1 08:32:12 2009 From: me at soumya.name (Soumyanath Chatterjee) Date: Tue, 1 Sep 2009 18:02:12 +0530 Subject: [fxruby-users] Is it possible to create a pane dynamically In-Reply-To: <57cf8f720908311512m660e87e3v65b31927266bbb78@mail.gmail.com> References: <573065.36660.qm@web30001.mail.mud.yahoo.com> <4A97C5A3.3060905@gmail.com> <57cf8f720908311512m660e87e3v65b31927266bbb78@mail.gmail.com> Message-ID: Hi Lyle, Thank you for the excellent observation! Adding a create did the trick. Now the code is working fine. On Tue, Sep 1, 2009 at 3:42 AM, Lyle Johnson wrote: > On Fri, Aug 28, 2009 at 6:55 AM, Soumyanath wrote: > >> I am new to FXRuby so excuse me for this stupid question. > > It is not a stupid question. > >> I need to enter many different data and trying to create a vertical pane >> dynamically using response from a SQL query. >> >> I want these input form to appear in my main window. Created a class >> based on FXMainWindow. >> >> --------------- Code snippet ------------ >> class DbFace < FXMainWindow >> ? ?attr_writer \ >> ? ?:title, >> >> ?def addNew >> ? ?vPane = FXVerticalFrame.new(@hWnd) >> ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) >> ?end >> >> ?def initialize(app, pane) >> ? ?@hWnd = pane >> ? ?@hApp ?= app >> ?end >> end >> ----------- End ----------------- >> >> I use this class from inside my program. As: >> >> ? ? ? ?book = DbFace.new(app, @frame) >> ? ? ? ?book.title = "Add new record" >> ? ? ? ?book.addNew >> >> >> The new dialog fields do not show up with this. Please tell me if I am >> doing something wrong. Any example will be great. > > I think you're just leaving out a call to create() for the > newly-constructed widgets. What happens if you add a call to > vPane.create() at the end of your addNew() method? > > ? ?def addNew > ? ? ?vPane = FXVerticalFrame.new(@hWnd) > ? ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) > ? ? ?vPane.create > ? ?end > > Let me know if that does the trick. For more background on this, see: > > ? ?http://www.fox-toolkit.org/faq.html#CREATELATER > > Or, even better, buy the FXRuby book and read Chapter 7. ;) > > Hope this helps, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- -- Regards Soumyanath Chatterjee http://www.soumya.name Let's map the world, use http://www.wikimap.biz From me at soumya.name Tue Sep 1 10:10:22 2009 From: me at soumya.name (Soumyanath Chatterjee) Date: Tue, 1 Sep 2009 19:40:22 +0530 Subject: [fxruby-users] Is it possible to create a pane dynamically In-Reply-To: <57cf8f720908311512m660e87e3v65b31927266bbb78@mail.gmail.com> References: <573065.36660.qm@web30001.mail.mud.yahoo.com> <4A97C5A3.3060905@gmail.com> <57cf8f720908311512m660e87e3v65b31927266bbb78@mail.gmail.com> Message-ID: Hi! Thanks to Lyle's pointer - .create method has solved the pane creation problem. But there are other problem - how do I get rid of the pane. Multiple calls to this class keeps stacking the pane over the old one. In C++, I would have destroyed the old object - what do I do in FXRuby? vPane.hide - looks to be a work around; but I think this will keep the old objects in memory. Please suggest a good way to close the screen. On Tue, Sep 1, 2009 at 3:42 AM, Lyle Johnson wrote: > On Fri, Aug 28, 2009 at 6:55 AM, Soumyanath wrote: > >> I am new to FXRuby so excuse me for this stupid question. > > It is not a stupid question. > >> I need to enter many different data and trying to create a vertical pane >> dynamically using response from a SQL query. >> >> I want these input form to appear in my main window. Created a class >> based on FXMainWindow. >> >> --------------- Code snippet ------------ >> class DbFace < FXMainWindow >> ? ?attr_writer \ >> ? ?:title, >> >> ?def addNew >> ? ?vPane = FXVerticalFrame.new(@hWnd) >> ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) >> ?end >> >> ?def initialize(app, pane) >> ? ?@hWnd = pane >> ? ?@hApp ?= app >> ?end >> end >> ----------- End ----------------- >> >> I use this class from inside my program. As: >> >> ? ? ? ?book = DbFace.new(app, @frame) >> ? ? ? ?book.title = "Add new record" >> ? ? ? ?book.addNew >> >> >> The new dialog fields do not show up with this. Please tell me if I am >> doing something wrong. Any example will be great. > > I think you're just leaving out a call to create() for the > newly-constructed widgets. What happens if you add a call to > vPane.create() at the end of your addNew() method? > > ? ?def addNew > ? ? ?vPane = FXVerticalFrame.new(@hWnd) > ? ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) > ? ? ?vPane.create > ? ?end > > Let me know if that does the trick. For more background on this, see: > > ? ?http://www.fox-toolkit.org/faq.html#CREATELATER > > Or, even better, buy the FXRuby book and read Chapter 7. ;) > > Hope this helps, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- -- Regards Soumyanath Chatterjee http://www.soumya.name Let's map the world, use http://www.wikimap.biz From rmelton at ball.com Tue Sep 1 10:17:09 2009 From: rmelton at ball.com (Melton, Ryan) Date: Tue, 1 Sep 2009 08:17:09 -0600 Subject: [fxruby-users] Is it possible to create a pane dynamically In-Reply-To: References: <573065.36660.qm@web30001.mail.mud.yahoo.com><4A97C5A3.3060905@gmail.com><57cf8f720908311512m660e87e3v65b31927266bbb78@mail.gmail.com> Message-ID: <2EC28B773AF39E47850AC45765483C2C0DB7F113@AEROMSG2.AERO.BALL.COM> Try using removeChild with the pane's parent. -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Soumyanath Chatterjee Sent: Tuesday, September 01, 2009 8:10 AM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] Is it possible to create a pane dynamically Hi! Thanks to Lyle's pointer - .create method has solved the pane creation problem. But there are other problem - how do I get rid of the pane. Multiple calls to this class keeps stacking the pane over the old one. In C++, I would have destroyed the old object - what do I do in FXRuby? vPane.hide - looks to be a work around; but I think this will keep the old objects in memory. Please suggest a good way to close the screen. On Tue, Sep 1, 2009 at 3:42 AM, Lyle Johnson wrote: > On Fri, Aug 28, 2009 at 6:55 AM, Soumyanath wrote: > >> I am new to FXRuby so excuse me for this stupid question. > > It is not a stupid question. > >> I need to enter many different data and trying to create a vertical >> pane dynamically using response from a SQL query. >> >> I want these input form to appear in my main window. Created a class >> based on FXMainWindow. >> >> --------------- Code snippet ------------ class DbFace < FXMainWindow >> ? ?attr_writer \ >> ? ?:title, >> >> ?def addNew >> ? ?vPane = FXVerticalFrame.new(@hWnd) >> ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) >> ?end >> >> ?def initialize(app, pane) >> ? ?@hWnd = pane >> ? ?@hApp ?= app >> ?end >> end >> ----------- End ----------------- >> >> I use this class from inside my program. As: >> >> ? ? ? ?book = DbFace.new(app, @frame) >> ? ? ? ?book.title = "Add new record" >> ? ? ? ?book.addNew >> >> >> The new dialog fields do not show up with this. Please tell me if I >> am doing something wrong. Any example will be great. > > I think you're just leaving out a call to create() for the > newly-constructed widgets. What happens if you add a call to > vPane.create() at the end of your addNew() method? > > ? ?def addNew > ? ? ?vPane = FXVerticalFrame.new(@hWnd) > ? ? ?dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW) > ? ? ?vPane.create > ? ?end > > Let me know if that does the trick. For more background on this, see: > > ? ?http://www.fox-toolkit.org/faq.html#CREATELATER > > Or, even better, buy the FXRuby book and read Chapter 7. ;) > > Hope this helps, > > Lyle > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- -- Regards Soumyanath Chatterjee http://www.soumya.name Let's map the world, use http://www.wikimap.biz _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From jeroen at fox-toolkit.org Tue Sep 15 17:34:19 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Tue, 15 Sep 2009 16:34:19 -0500 Subject: [fxruby-users] dynamically resizing a window In-Reply-To: <2626f2640909151337nd80275cif1c7cacefdbff8b3@mail.gmail.com> References: <2626f2640909151337nd80275cif1c7cacefdbff8b3@mail.gmail.com> Message-ID: <200909151634.19142.jeroen@fox-toolkit.org> On Tuesday 15 September 2009, Eric Hutton wrote: > Is there a way to dynamically resize a window in response to dynamically > added content? > > Take the "dynamic.rb" example from Lyle's Create Lean and Mean GUIs book, > after hitting the add row button a number of times, the added rows extend > beyond the bottom of the window. Is there a way to get the window to try > and resize itself according to the dynamically added content? I messed > around with .layout and .repaint, but to no effect. The steps should be roughly as follows: 1) change the contents of the window (dialog box or toplevel window). 2) compute the new size, based on layout parameters and sizes of the widgets; use the topwindow's getDefaultWidth() and getDefaultHeight() See footnote. 3) Change the toplevel window's size according to the values computed in step 2, calling resize() on the topwindow. Note, the borders will be added by the interface between FOX and your windowmanager. The resize() will lead to a new call to layout(), since the window will have changed size. This will also result in a bunch of repaint messages which your program must be allowed to handle before the window will be properly drawn to the screen. Hope this helps, - Jeroen Footnote: the size computed by getDefaultWidth() and getDefaultHeight() will be the minimum fit of the window around its contents. From jeroen at fox-toolkit.org Fri Sep 18 15:14:08 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 18 Sep 2009 14:14:08 -0500 Subject: [fxruby-users] Delayed widget creation In-Reply-To: <2626f2640909181137w1b70f050y96a776ab42e856a@mail.gmail.com> References: <2626f2640909181137w1b70f050y96a776ab42e856a@mail.gmail.com> Message-ID: <200909181414.08466.jeroen@fox-toolkit.org> On Friday 18 September 2009, Eric Hutton wrote: > Hi all, > > Almost have my data import code doing what I want it to, but I seem to be > having an issue with delays in the creation of some widgets. > > What I'm trying to do is have a dialog box that pops up to let the user know > that the data import is occurring, and what stage the process is at. The > problem is that the while the dialog box gets drawn, none of the widgets get > drawn until after all the data import tasks have been done. I have tried to > force the creation using recalc, repaint, layout, but nothing seems to be > doing the trick. > > My code looks like this: > if find_customs_file.execute != 0 # get the result from the users > selection from a FXFileDialog Box > customs_import_dialog = File_Import_Dialog.new(self) # a > sublcass of FXDialogBox > customs_import_dialog.create > customs_import_dialog.show(PLACEMENT_SCREEN) > print "working" > customs_data = File.readlines(find_customs_file.filename) > print "done" > end > > So I tried inserting customs_import_dialog.update, or layout, or repaint in > there before the call to File.readlines, but nothing helped. > > The print statements help me track what is going on. Right now the > File_Import_Dialog window will get drawn, but with no widgets.. "working" > shows up, still no widgets... big pause while the file is imported, then > "done" shows up, and finally the full File_Import_Dialog box shows up... > which kind of defeats the purpose (that of telling the user something along > the lines of "hi there, hold on while I import this file, it's a big one and > could take awhile"). I can't tell for certain, but I think the widgets are > actually drawn after the "print "done" " statement, and only occurs at the > time the "if" statement ends. That is correct. Drawing will get done only when the system gets to an event loop, and processes out-standing redraw events. To get it to do this BEFORE your callback returns, you must recursively enter the event loop (presumably, block further user input while in that subloop and only process non-input type events). The good news is that this is possible: runModalWhileEvents() is what you want to call; I suggest calling it during a long-winded file I/O operation as well, so the screen has a chance to refresh. The idea is to handle a bunch of events until the event queue is empty, and then return to the the file import code. You can invoke runModalWhileEvents() repeatedly, if there is a reason to assume more events have arrived that need to be handled. When you first popup a dialog, there is a lot of back-and-forth between X11 server and the application, to resize and redraw items just put on the screen; after that bunch of events has been handled, things kind of come to a rest and the window is ready for business. Note, it works better in FOX 1.7 because this function now as a parameter to block for a little while, prior to returning with an empty event queue. The suggestion from Meinrad Recheis is good too, but this is definitely more complex; but multi-threading may be overkill for this particular situation. - Jeroen From jeroen at fox-toolkit.org Fri Sep 18 17:24:01 2009 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 18 Sep 2009 16:24:01 -0500 Subject: [fxruby-users] Delayed widget creation In-Reply-To: <2626f2640909181341p2dae90aaha28d0bd676ac4f24@mail.gmail.com> References: <2626f2640909181137w1b70f050y96a776ab42e856a@mail.gmail.com> <2626f2640909181231q7645364fg471084d0044ac609@mail.gmail.com> <2626f2640909181341p2dae90aaha28d0bd676ac4f24@mail.gmail.com> Message-ID: <200909181624.01403.jeroen@fox-toolkit.org> On Friday 18 September 2009, Eric Hutton wrote: > OK, very bizarre. So I tried app.runModalWhileEvents instead of > [window].repaint but my label displying the value for time.now is still only > showing a little squiggle in the upperleft corner until the next screen > repaint (after the file IO operation). > > The time.now label, when it does show up, is showing the time was calculated > at the instance of the call to create the label. The flaw in the original runModalWhileEvents() was to return when the event queue was empty. The newer version in FOX 1.7 has a timeout parameter, which allows it to wait a little while before giving on an empty event queue. This is better since event queue being empty on the client side doesn't mean the event queue on the server-side is empty yet... - Jeroen From bjorn.bergqvist at gmail.com Fri Sep 25 14:00:09 2009 From: bjorn.bergqvist at gmail.com (=?ISO-8859-1?Q?Bj=F6rn_Bergqvist?=) Date: Fri, 25 Sep 2009 20:00:09 +0200 Subject: [fxruby-users] no clean exit Message-ID: <44936e730909251100j67c5c7ebmebe63d6a28932031@mail.gmail.com> Hello, when I quit the application I'm currently developing there is a lot of messages popping up (see below). I've not discovered any problems when running the application, but have I done something wrong? Since ruby 1.9 is much faster I don't think 1.8 is an option for me anymore. Bj?rn Bergqvist - http://www.discretizer.org 0xb7e91070 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(rb_vm_bugreport+0x60) [0xb7e91070] 0xb7daea81 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7daea81] 0xb7daeb1a /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(rb_bug+0x3a) [0xb7daeb1a] 0xb7e390fc /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7e390fc] 0xb7f1240c [0xb7f1240c] 0xb7e3ee72 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(st_lookup+0x22) [0xb7e3ee72] 0xb7e7d9c6 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7e7d9c6] 0xb7e7da31 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(rb_get_method_body+0x31) [0xb7e7da31] 0xb7e81f0d /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(rb_funcall+0xcd) [0xb7e81f0d] 0xb7720102 /opt/discretizer/ruby/1.9.1-p243/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/ext/fox16/fox16.so(_Z18FXRbCallVoidMethodPN2FX8FXObjectEm+0x70) [0xb7720102] 0xb762f3eb /opt/discretizer/ruby/1.9.1-p243/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/ext/fox16/fox16.so(_ZN10FXRbMatrix6recalcEv+0x4d) [0xb762f3eb] 0xb700fe38 /opt/discretizer/fox/1.6.36/lib/libFOX-1.6.so.0(_ZN2FX8FXWindowD2Ev+0x108) [0xb700fe38] 0xb6f3b6cc /opt/discretizer/fox/1.6.36/lib/libFOX-1.6.so.0(_ZN2FX7FXLabelD2Ev+0x8c) [0xb6f3b6cc] 0xb772df1f /opt/discretizer/ruby/1.9.1-p243/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/ext/fox16/fox16.so(_ZN2FX13FXRadioButtonD2Ev+0x2b) [0xb772df1f] 0xb772e016 /opt/discretizer/ruby/1.9.1-p243/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/ext/fox16/fox16.so(_ZN15FXRbRadioButtonD0Ev+0x38) [0xb772e016] 0xb76eb6fa /opt/discretizer/ruby/1.9.1-p243/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/ext/fox16/fox16.so(_ZN10FXRbObject8freefuncEPN2FX8FXObjectE+0xe8) [0xb76eb6fa] 0xb7dbf1aa /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7dbf1aa] 0xb7dbf334 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7dbf334] 0xb7dbf52c /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(rb_gc_call_finalizer_at_exit+0x17c) [0xb7dbf52c] 0xb7db0d2e /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9 [0xb7db0d2e] 0xb7db2076 /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(ruby_cleanup+0x116) [0xb7db2076] 0xb7db222e /opt/discretizer/ruby/1.9.1-p243/lib/libruby.so.1.9(ruby_run_node+0x5e) [0xb7db222e] 0x80487c8 /opt/discretizer/ruby/1.9.1-p243/bin/ruby(main+0x68) [0x80487c8] 0xb7b91a36 /lib/libc.so.6(__libc_start_main+0xe6) [0xb7b91a36] 0x80486c1 /opt/discretizer/ruby/1.9.1-p243/bin/ruby [0x80486c1] From lyle at lylejohnson.name Fri Sep 25 14:51:54 2009 From: lyle at lylejohnson.name (James Johnson) Date: Fri, 25 Sep 2009 13:51:54 -0500 Subject: [fxruby-users] no clean exit In-Reply-To: <44936e730909251100j67c5c7ebmebe63d6a28932031@mail.gmail.com> References: <44936e730909251100j67c5c7ebmebe63d6a28932031@mail.gmail.com> Message-ID: <4DE43FA5-CA69-403D-98C3-D96E8D70B068@lylejohnson.name> On Sep 25, 2009, at 1:00 PM, Bj?rn Bergqvist wrote: > when I quit the application I'm currently developing there is a lot of > messages popping up (see below). I've not discovered any problems when > running the application, but have I done something wrong? I don't think you're doing anything wrong. It doesn't seem to happen on every FXRuby app, but I too have seen it crash on exit (from Ruby 1.9.1) in several cases, e.g. http://rubyforge.org/tracker/index.php?func=detail&aid=24073&group_id=300&atid=1223 It's been awhile since I've had time to look into this (or much else FXRuby related), but IIRC the problem boils down to the more or less random way that garbage collection occurs during finalization on exit. While your program's running, if you (for example) destroy a parent object, FOX will subsequently destroy the child object(s), and the Ruby objects associated with them get cleaned up in an orderly fashion. When the Ruby interpreter is exiting, however, it is possible that the child object will be GC'd before the parent, leaving dangling pointers lying around. I'm not really sure how to fix it at this point. From rmelton at ball.com Fri Sep 25 16:28:59 2009 From: rmelton at ball.com (Melton, Ryan) Date: Fri, 25 Sep 2009 14:28:59 -0600 Subject: [fxruby-users] no clean exit In-Reply-To: <4DE43FA5-CA69-403D-98C3-D96E8D70B068@lylejohnson.name> References: <44936e730909251100j67c5c7ebmebe63d6a28932031@mail.gmail.com> <4DE43FA5-CA69-403D-98C3-D96E8D70B068@lylejohnson.name> Message-ID: <2EC28B773AF39E47850AC45765483C2C0DB7F1A4@AEROMSG2.AERO.BALL.COM> Fox doesn't handle accelerators correctly at shutdown and it causes lots of crashes: Try calling this function in a SEL_CLOSE handler for your main window: def initialize ... self.connect(SEL_CLOSE, method(:cleanup_menu_panes)) end def cleanup_menu_panes |sender, sel, data| ObjectSpace.each_object(FXMenuPane) do |object| children = [] object.each_child do |child| children << child end children.each do |child| object.removeChild(child) end end 0 end -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of James Johnson Sent: Friday, September 25, 2009 12:52 PM To: fxruby-users at rubyforge.org Subject: Re: [fxruby-users] no clean exit On Sep 25, 2009, at 1:00 PM, Bj?rn Bergqvist wrote: > when I quit the application I'm currently developing there is a lot of > messages popping up (see below). I've not discovered any problems when > running the application, but have I done something wrong? I don't think you're doing anything wrong. It doesn't seem to happen on every FXRuby app, but I too have seen it crash on exit (from Ruby 1.9.1) in several cases, e.g. http://rubyforge.org/tracker/index.php?func=detail&aid=24073&group_id=300&atid=1223 It's been awhile since I've had time to look into this (or much else FXRuby related), but IIRC the problem boils down to the more or less random way that garbage collection occurs during finalization on exit. While your program's running, if you (for example) destroy a parent object, FOX will subsequently destroy the child object(s), and the Ruby objects associated with them get cleaned up in an orderly fashion. When the Ruby interpreter is exiting, however, it is possible that the child object will be GC'd before the parent, leaving dangling pointers lying around. I'm not really sure how to fix it at this point. _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users This message and any enclosures are intended only for the addressee. Please notify the sender by email if you are not the intended recipient. If you are not the intended recipient, you may not use, copy, disclose, or distribute this message or its contents or enclosures to any other person and any such actions may be unlawful. Ball reserves the right to monitor and review all messages and enclosures sent to or from this email address. From CCdrom at web.de Sun Sep 27 20:40:56 2009 From: CCdrom at web.de (CCdrom at web.de) Date: Mon, 28 Sep 2009 02:40:56 +0200 Subject: [fxruby-users] FxRuby 1.9 Binary Gem? Message-ID: <744437777@web.de> Hello! I am a beginner to Ruby but i like it very much. After installing the One-Click-Installer Version 1.8.6 i was very happy- everything worked finde. But i had update to version ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] because of Look-Behinds in Regular Expressions. But now the FxRuby Gem installed just fine but doesn't work anymore- I got an error, that msvcrt-ruby18.dll is missing (the old one from ruby 1.86 doesn't work). After searching the Internet i know why: FxRuby's Source is compatible to 1.9 but the binaries are for the one-click-installer Version. So the howto mean's i have to compile Ruby and FxRuby ... As a beginner this is a lot of confusing- I get some errors and i don't know which version of visual c++ i should use and so on. On the other side I shouldn't use the mswin32 version of ruby, because it's changing to mingw32. Here i also get a lot of errors installing and try compiling with MSYS, MGWIN. For WxRuby there is a special 1.9 gem available- works fine. But i want to use FxRuby. Is there a way to get a FxRuby 1.9 Binary Gem for Windows? Don't get me wrong, but i spend hours of searching informations about these problems- that's not the Ruby Way, especially for a beginner it's very confusing and time intensive. A FxRuby 1.9 binary gem would be perfect. Thanks in advance, Dirk From dglnz at yahoo.com Tue Sep 29 03:29:47 2009 From: dglnz at yahoo.com (dave L) Date: Tue, 29 Sep 2009 00:29:47 -0700 (PDT) Subject: [fxruby-users] Finish Button disappears on last panel of FXWizard In-Reply-To: <20090928160011.9d4a267131df6e4a92b6aeecc938746d.7f0324726b.wbe@email03.secureserver.net> Message-ID: <933925.21232.qm@web30008.mail.mud.yahoo.com> Hi still very new but... this line here one = FXText.new(wiz.container, :opts => LAYOUT_FILL) to me says fill the window so wouldn't your button disappear? I do stand to be corrected by my betters (ps i use foxGUIb for the GUI placement so maybe ignore my posting here. dave. --- On Tue, 29/9/09, patrick at patrickjones.ca wrote: From: patrick at patrickjones.ca Subject: [fxruby-users] Finish Button disappears on last panel of FXWizard To: fxruby-users at rubyforge.org Received: Tuesday, 29 September, 2009, 12:00 PM Thanks Lyle for helping me with my other question. Now I have a new one because it runs counter to what I think the docs are telling me. Here is the code... require 'rubygems' require 'fox16' include Fox app = FXApp.new wiz = FXWizard.new(app, 'wiz', nil, :width => 640, :height => 480) wiz.cancelButton.connect(SEL_COMMAND) { exit } one = FXText.new(wiz.container, :opts => LAYOUT_FILL) one.text = "Some useful information here" two = FXButton.new(wiz.container, 'a big ole button', :opts => FRAME_RAISED|LAYOUT_FILL) wiz.finishButton.connect(SEL_COMMAND) { exit } app.create wiz.show(PLACEMENT_SCREEN) app.run It seems that when I add attach a command to the wiz.finishButton, when the time comes for it to appear (on the last panel) it disappears... -----Inline Attachment Follows----- _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: