From rmelton at ball.com Wed Apr 4 18:31:21 2007 From: rmelton at ball.com (Melton, Ryan) Date: Wed, 4 Apr 2007 16:31:21 -0600 Subject: [fxruby-users] Issue with FXGLViewer Message-ID: <2EC28B773AF39E47850AC45765483C2C07155C93@AEROMSG2.AERO.BALL.COM> Hi, I'm experiencing a problem with the FXGLViewer class and FXRuby 1.6.7 on Windows (and all earlier versions of FXRuby 1.6.x). I have an application that creates two different FXGLViewers but crashes with a segfault on the creation of the second FXGLViewer. The same application works just fine with FXRuby 1.2.6. I was able to recreate the problem using the supplied glviewer.rb example program by selecting Window->New Viewer several times. It then crashes with a segfault at: glviewer.rb:441: [BUG] Segmentation fault. I've tried the same test with the C++ version of FOX 1.6.25 and their glviewer demo does not crash so I believe the issue must be somewhere in FXRuby. Also tried this with FXRuby 1.6.4 on Solaris and the glviewer.rb doesn't crash but the following message is printed: FXRuby.cpp:145:FXASSERT (result==0) failed. Can anyone else recreate this issue and do you have any hints on debugging seg faults in ruby? Thanks, Ryan 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20070404/3091bff1/attachment-0001.html From vjoel at path.berkeley.edu Wed Apr 4 19:20:08 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Wed, 04 Apr 2007 16:20:08 -0700 Subject: [fxruby-users] Issue with FXGLViewer In-Reply-To: <2EC28B773AF39E47850AC45765483C2C07155C93@AEROMSG2.AERO.BALL.COM> References: <2EC28B773AF39E47850AC45765483C2C07155C93@AEROMSG2.AERO.BALL.COM> Message-ID: <461432A8.5050309@path.berkeley.edu> Melton, Ryan wrote: > FXRuby.cpp:145:FXASSERT (result==0) failed. I can confirm the same assertion failure on linux, ruby-1.8.6, fxruby-1.6.7. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Wed Apr 4 19:41:16 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Wed, 4 Apr 2007 18:41:16 -0500 Subject: [fxruby-users] Issue with FXGLViewer In-Reply-To: <461432A8.5050309@path.berkeley.edu> References: <2EC28B773AF39E47850AC45765483C2C07155C93@AEROMSG2.AERO.BALL.COM> <461432A8.5050309@path.berkeley.edu> Message-ID: On 4/4/07, Joel VanderWerf wrote: > I can confirm the same assertion failure on linux, ruby-1.8.6, fxruby-1.6.7. Someone filed a bug report about this the other day: http://rubyforge.org/tracker/index.php?func=detail&aid=9775&group_id=300&atid=1223 I'm looking into it and hope to have a fix soon. From lyle.johnson at gmail.com Thu Apr 5 09:41:41 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 5 Apr 2007 08:41:41 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.8 Now Available Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby version 1.6.8 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=10911 Note that if you're building FXRuby from source, you should be using FOX 1.6.16 or later due to some important changes made in that release of FOX. For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby), as a source gem, and as a source tarball. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGFPyVFXV/hD6oMd0RAmPuAJ0Sm0Cf41VMIhjePawEf4eqFtSLJwCeKSCN UpZzyfq0XtksE7N5qyNYK5g= =wewB -----END PGP SIGNATURE----- From vjoel at path.berkeley.edu Fri Apr 6 22:15:00 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 06 Apr 2007 19:15:00 -0700 Subject: [fxruby-users] 1.8.6 and kwargs Message-ID: <4616FEA4.3090709@path.berkeley.edu> It looks like we still have to require 'fox16/kwargs' or else: $ ruby dirlist.rb dirlist.rb:12:in `initialize': wrong argument type Hash (expected Data) (TypeError) from dirlist.rb:12:in `initialize' from dirlist.rb:55:in `new' from dirlist.rb:55:in `run' from dirlist.rb:64 Or did something go wrong in the gem update? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Fri Apr 6 23:01:10 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 6 Apr 2007 22:01:10 -0500 Subject: [fxruby-users] 1.8.6 and kwargs In-Reply-To: <4616FEA4.3090709@path.berkeley.edu> References: <4616FEA4.3090709@path.berkeley.edu> Message-ID: On 4/6/07, Joel VanderWerf wrote: > It looks like we still have to require 'fox16/kwargs' or else: > > $ ruby dirlist.rb > dirlist.rb:12:in `initialize': wrong argument type Hash (expected Data) > (TypeError) > from dirlist.rb:12:in `initialize' > from dirlist.rb:55:in `new' > from dirlist.rb:55:in `run' > from dirlist.rb:64 > > Or did something go wrong in the gem update? Seems OK here -- what do you get when you type: ruby -e "require 'fox16'; puts Fox.fxrubyversion" ? From vjoel at path.berkeley.edu Sat Apr 7 01:05:46 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 06 Apr 2007 22:05:46 -0700 Subject: [fxruby-users] 1.8.6 and kwargs In-Reply-To: References: <4616FEA4.3090709@path.berkeley.edu> Message-ID: <461726AA.5010704@path.berkeley.edu> Lyle Johnson wrote: > On 4/6/07, Joel VanderWerf wrote: > >> It looks like we still have to require 'fox16/kwargs' or else: >> >> $ ruby dirlist.rb >> dirlist.rb:12:in `initialize': wrong argument type Hash (expected Data) >> (TypeError) >> from dirlist.rb:12:in `initialize' >> from dirlist.rb:55:in `new' >> from dirlist.rb:55:in `run' >> from dirlist.rb:64 >> >> Or did something go wrong in the gem update? > > Seems OK here -- what do you get when you type: > > ruby -e "require 'fox16'; puts Fox.fxrubyversion" Good question. That was _one_ problem: $ ruby -e "require 'fox16'; puts Fox.fxrubyversion" 1.6.2 After cleaning out the old stuff, there's still a problem: installing the gem doesn't install the .so. It looks like something in the makefile. Here's the output of the gem install: $ cat gem_make.out ruby extconf.rb install fxruby checking for sys/time.h... yes checking for signal.h... yes ... ... checking for gluNewQuadric() in -lGLU... yes creating Makefile make gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_SYS_TIME_H -DHAVE_SIGNAL_H -I/usr/local/include/fxscintilla -I/usr/local/include/fox-1.6 -fPIC -g -O2 -O0 -Iinclude -c librb.c ... ... gcc -shared -rdynamic -Wl,-export-dynamic -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o fox16.so librb.o core_wrap.o dc_wrap.o dialogs_wrap.o frames_wrap.o fx3d_wrap.o FXRbApp.o FXRbDataTarget.o FXRbGLViewer.o FXRuby.o iconlist_wrap.o icons_wrap.o image_wrap.o impl.o label_wrap.o layout_wrap.o list_wrap.o markfuncs.o mdi_wrap.o menu_wrap.o table_wrap.o text_wrap.o treelist_wrap.o ui_wrap.o unregisterOwnedObjects.o -lFOX-1.6 -lGLU -lGL -lX11 -lXext -ltiff -ljpeg -lz -lpng -lstdc++ -ldl -lcrypt -lm -lc make install make: Nothing to be done for `install'. make clean So the .so gets built but never installed. Why is this happening? I think it's because the makefile has these lines: RUBYLIBDIR = /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.8/ext/fox16$(target_prefix) RUBYARCHDIR = /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.8/ext/fox16$(target_prefix) and so install is a no-op because the .so is already where it's supposed to be. I don't understand why extconf.rb would be generating things this way. It's not normal for gems. For example, the ncurses gem's extconf.rb generates these lines: RUBYLIBDIR = /usr/local/lib/ruby/gems/1.8/gems/ncurses-0.9.1/lib$(target_prefix) RUBYARCHDIR = /usr/local/lib/ruby/gems/1.8/gems/ncurses-0.9.1/lib$(target_prefix) And so the install succeeds. When I install fxruby from tarball, everything is ok. The Makefile has reasonable settings for RUBYLIBDIR/RUBYARCHDIR. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Sat Apr 7 01:52:58 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 06 Apr 2007 22:52:58 -0700 Subject: [fxruby-users] bug in kwargs.rb Message-ID: <461731BA.7080608@path.berkeley.edu> This seems to be a fix for the following problem: $ ruby textedit.rb /usr/local/lib/ruby/site_ruby/1.8/fox16/kwargs.rb:136:in `initialize': undefined local variable or method `q' for # (NameError) from textedit.rb:216:in `new' from textedit.rb:216:in `initialize' from textedit.rb:1750:in `new' from textedit.rb:1750 here's the patch (I'm just guessing based on analogy with other classes): --- kwargs.rb.bck 2007-04-06 22:50:20.000000000 -0700 +++ kwargs.rb 2007-04-06 22:50:20.000000000 -0700 @@ -126,6 +126,7 @@ params = {} params = args.pop if args.last.is_a? Hash if args.length > 0 && (args[0].nil? || args[0].is_a?(FXComposite)) + q = args[0] args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 } if params.key? :padding value = params.delete(:padding) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Sat Apr 7 10:34:09 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sat, 7 Apr 2007 09:34:09 -0500 Subject: [fxruby-users] 1.8.6 and kwargs In-Reply-To: <461726AA.5010704@path.berkeley.edu> References: <4616FEA4.3090709@path.berkeley.edu> <461726AA.5010704@path.berkeley.edu> Message-ID: On 4/7/07, Joel VanderWerf wrote: > After cleaning out the old stuff, there's still a problem: installing > the gem doesn't install the .so. It looks like something in the > makefile. Here's the output of the gem install: Joel, This was a bug in RubyGems that was fixed in version 0.9.1 or 0.9.2. I'm having a lot of trouble with slowness on my internet connection this morning, or I'd look it up for you. But the short answer is: Upgrade to the latest RubyGems, and then FXRuby should build properly from the gem. Hope this helps, Lyle From lyle.johnson at gmail.com Sat Apr 7 10:42:37 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sat, 7 Apr 2007 09:42:37 -0500 Subject: [fxruby-users] bug in kwargs.rb In-Reply-To: <461731BA.7080608@path.berkeley.edu> References: <461731BA.7080608@path.berkeley.edu> Message-ID: On 4/7/07, Joel VanderWerf wrote: > This seems to be a fix for the following problem: Thanks, Joel. I'll file a bug report on it and get it fixed for the next release. From lyle.johnson at gmail.com Sun Apr 8 15:05:35 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Sun, 8 Apr 2007 14:05:35 -0500 Subject: [fxruby-users] [ANN] fox-1.6.25 and fxscintilla-1.71 now in MacPorts Message-ID: <59C451BF-8125-45FA-96AB-DB0ED0289DB5@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, The ports for FOX and FXScintilla in MacPorts (http:// www.macports.org/) are once again up to date. If you're using FOX on a Mac, MacPorts (formerly DarwinPorts) is a really convenient way to get access to a lot of the free and open source projects that are available for Linux. Enjoy, Lyle -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGGTz/FXV/hD6oMd0RAq6eAJ9CBm8DYq3JsIfrdHtXMeRAUSz/YgCgiyW7 ByQ5tUhP9vC8/kFpPz8gF4M= =z4xq -----END PGP SIGNATURE----- From lyle.johnson at gmail.com Mon Apr 9 12:28:21 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Mon, 9 Apr 2007 11:28:21 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.9 Now Available Message-ID: <4271899A-A772-4E27-B2ED-DD0D2F858FEF@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby version 1.6.9 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=10973 This is a bug fix release and is strongly recommended. Note that if you're building FXRuby from source, you should be using FOX 1.6.16 or later due to some important changes made in that release of FOX. For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby), as a source gem, and as a source tarball. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGGmllFXV/hD6oMd0RAlJGAJ0Zy+vM6uZWtIPgU+61Cbnd/SfWUwCfX3/b WJ5vBZSFrNR5RLMNFm7Lr1Q= =Sx0s - -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGGmmlFXV/hD6oMd0RAtqlAKClwcnLYR2oyDhm3ewaGFMep3uLFACePiGX JZbwaP88VZLiwpuKm2US6hA= =wC1v -----END PGP SIGNATURE----- From vjoel at path.berkeley.edu Mon Apr 9 15:40:51 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 09 Apr 2007 12:40:51 -0700 Subject: [fxruby-users] 1.8.6 and kwargs In-Reply-To: References: <4616FEA4.3090709@path.berkeley.edu> <461726AA.5010704@path.berkeley.edu> Message-ID: <461A96C3.1050705@path.berkeley.edu> Lyle Johnson wrote: > On 4/7/07, Joel VanderWerf wrote: > >> After cleaning out the old stuff, there's still a problem: installing >> the gem doesn't install the .so. It looks like something in the >> makefile. Here's the output of the gem install: > > > > Joel, > > This was a bug in RubyGems that was fixed in version 0.9.1 or 0.9.2. > I'm having a lot of trouble with slowness on my internet connection > this morning, or I'd look it up for you. But the short answer is: > Upgrade to the latest RubyGems, and then FXRuby should build properly > from the gem. That was probably it. Somehow I got behind on "gem update --system"... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Mon Apr 9 15:46:55 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Mon, 09 Apr 2007 12:46:55 -0700 Subject: [fxruby-users] 1.6.9 and kwargs In-Reply-To: References: <4616FEA4.3090709@path.berkeley.edu> <461726AA.5010704@path.berkeley.edu> Message-ID: <461A982F.6050002@path.berkeley.edu> Whoops. I still have a problem, but maybe not related. After updating to gem 0.9.2 and fxruby 1.6.9: $ ruby -e "require 'fox16'; puts Fox.fxrubyversion" /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.9/ext/fox16/fox16.so:0:in `require': no such file to load -- fox16/kwargs (LoadError) And... $ find /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.9 -name '*kwargs*' $ Did kwargs.rb get left out of the lib dir somehow? This is what turned up in lib/fox16: aliases.rb glgroup.rb pseudokeyboard.rb splashscreen.rb calendar.rb glshapes.rb pseudomouse.rb timeout.rb chore.rb input.rb responder2.rb undolist.rb colors.rb irb.rb responder.rb version.rb core.rb iterators.rb scintilla.rb dict.rb keys.rb settings.rb execute_nonmodal.rb missingdep.rb signal.rb After I copy in the kwargs.rb with the patch, the examples seem to run ok. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From rmelton at ball.com Mon Apr 9 15:52:12 2007 From: rmelton at ball.com (Melton, Ryan) Date: Mon, 9 Apr 2007 13:52:12 -0600 Subject: [fxruby-users] kwargs.rb missing from FXRuby 1.6.9? In-Reply-To: <4271899A-A772-4E27-B2ED-DD0D2F858FEF@gmail.com> References: <4271899A-A772-4E27-B2ED-DD0D2F858FEF@gmail.com> Message-ID: <2EC28B773AF39E47850AC45765483C2C072175F7@AEROMSG2.AERO.BALL.COM> The file kwargs.rb seems to be missing from the gem and tar.gz for FXRuby 1.6.9. 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 lyle.johnson at gmail.com Mon Apr 9 16:20:13 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Mon, 9 Apr 2007 15:20:13 -0500 Subject: [fxruby-users] 1.6.9 and kwargs In-Reply-To: <461A982F.6050002@path.berkeley.edu> References: <4616FEA4.3090709@path.berkeley.edu> <461726AA.5010704@path.berkeley.edu> <461A982F.6050002@path.berkeley.edu> Message-ID: On 4/9/07, Joel VanderWerf wrote: > Whoops. I still have a problem, but maybe not related. > > After updating to gem 0.9.2 and fxruby 1.6.9: > > $ ruby -e "require 'fox16'; puts Fox.fxrubyversion" > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.9/ext/fox16/fox16.so:0:in > `require': no such file to load -- fox16/kwargs (LoadError) > > And... > > $ find /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.9 -name '*kwargs*' > $ > > > Did kwargs.rb get left out of the lib dir somehow? Sigh. The moral of this story is: Don't try to rush a release out the door on a Monday morning. ;) FXRuby 1.6.10 is now up in the usual places. Sorry for the inconvenience, everybody. From vjoel at path.berkeley.edu Tue Apr 10 17:20:37 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Tue, 10 Apr 2007 14:20:37 -0700 Subject: [fxruby-users] some extesions to FXRuby classed Message-ID: <461BFFA5.8060603@path.berkeley.edu> Lyle, These are some standard extensions that I usually throw in when I am using FXRuby. (They are in FoxTails actually.) What do you think about adopting them into FXRuby? module Fox class FXTextField # Add #editable as alias for #editable?. # Two reasons for this: # # (1) consistency with #enabled and #enabled? being aliases. # # (2) having a traditional r/w pair (#foo and #foo=) is helpful # with metaprogramming. alias :editable :editable? unless instance_methods(true).include?("editable") end class FXTable # For parallelism with selectRange. unless instance_methods(true).include?("deselectRange") def deselectRange(sr, er, sc, ec, notify = false) changes = false for row in sr..er for col in sc..ec changes |= deselectItem(row, col, notify) end end return changes end end end class FXWindow # Traverse all children, depth first (parent before child). def each_child_recursive each_child do |child| yield child child.each_child_recursive do |subchild| yield subchild end end end end end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Tue Apr 10 17:56:37 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Tue, 10 Apr 2007 16:56:37 -0500 Subject: [fxruby-users] some extesions to FXRuby classed In-Reply-To: <461BFFA5.8060603@path.berkeley.edu> References: <461BFFA5.8060603@path.berkeley.edu> Message-ID: On 4/10/07, Joel VanderWerf wrote: > These are some standard extensions that I usually throw in when I am > using FXRuby. (They are in FoxTails actually.) > > What do you think about adopting them into FXRuby? I think they're all good ideas, and I'll try to get them into the next release. Thanks! From vjoel at path.berkeley.edu Wed Apr 11 14:45:20 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Wed, 11 Apr 2007 11:45:20 -0700 Subject: [fxruby-users] FXRuby docs Message-ID: <461D2CC0.6050907@path.berkeley.edu> Lyle, I've noticed a few small problems when the FXRuby docs are built by ruby gems, rather than by hand. One problem is that the "Parent:" field is not correct. For example, the parent of FXPopup is listed as Object. Also, the "In:" field has some extraneous stuff: lib/fox16/aliases.rb lib/fox16/kwargs.rb rdoc-sources/FXPopup.rb These problems do not happen when I run rdoc in the rdoc-sources dir. I guess it is because rubygems runs rdoc on all .rb files, so it picks up things like aliases.rb, which opens classes but does not declare parentage. Is there any way to tell rubygems to invoke rdoc like this: cd rdoc-sources; rdoc or rdoc rdoc-sources or maybe even rdoc --exclude 'lib/fox16/*' (but I didn't try the last one) ? Are there files in lib/fox16 that would need to be included explicitly? Otherwise, the docs are great. Your work to build up the rdoc-sources seems to have paid off. I don't seem to need to keep the Fox docs open in a browser any more. In fact, the RDoc-generated html is easier to read and navigate than the Doxygen Fox stuff. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Wed Apr 11 15:20:49 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Wed, 11 Apr 2007 14:20:49 -0500 Subject: [fxruby-users] FXRuby docs In-Reply-To: <461D2CC0.6050907@path.berkeley.edu> References: <461D2CC0.6050907@path.berkeley.edu> Message-ID: On 4/11/07, Joel VanderWerf wrote: > I've noticed a few small problems when the FXRuby docs are built by ruby > gems, rather than by hand. > > One problem is that the "Parent:" field is not correct. For example, the > parent of FXPopup is listed as Object. > > Also, the "In:" field has some extraneous stuff: > > lib/fox16/aliases.rb > lib/fox16/kwargs.rb > rdoc-sources/FXPopup.rb > > These problems do not happen when I run rdoc in the rdoc-sources dir. Huh. I had never noticed this before, but you're right. > I guess it is because rubygems runs rdoc on all .rb files, so it picks > up things like aliases.rb, which opens classes but does not declare > parentage. > > Is there any way to tell rubygems to invoke rdoc like this: Yes, I just need to update the gem specification so that it's consistent with the Rakefile's list of files to include (and exclude). I've filed a bug report on this and it should be fixed the next time. > Otherwise, the docs are great. Your work to build up the rdoc-sources > seems to have paid off. I don't seem to need to keep the Fox docs open > in a browser any more. In fact, the RDoc-generated html is easier to > read and navigate than the Doxygen Fox stuff. Thanks! From kevin.burge at systemware.com Tue Apr 17 18:47:08 2007 From: kevin.burge at systemware.com (Kevin Burge) Date: Tue, 17 Apr 2007 17:47:08 -0500 Subject: [fxruby-users] Support for Ruby 1.9? Message-ID: <20070417225523.602CA5240B22@rubyforge.org> I'm trying to compile FXRuby under Ruby 1.9.0. After applying the below patch, I get the error: FXRbApp.cpp: In member function 'long int FXRbApp::onChoreThreads(FX::FXObject*, FX::FXSelector, void*)': FXRbApp.cpp:98: error: 'CHECK_INTS' was not declared in this scope I would fix this, but I'm not familiar with what this code is doing. Any estimate on support for 1.9 in FXRuby? I only ask because I'm trying to add support for 1.9 to my extensions, and I end up building FXRuby in the process. Thanks, Kevin Index: pre-config.rb =================================================================== --- pre-config.rb (revision 921) +++ pre-config.rb (working copy) @@ -20,7 +20,7 @@ def fox_include_files_found? search_directories.each do |path| filename = File.join(path, "fxver.h") - return true if FileTest.exists?(filename) + return true if FileTest.exist?(filename) end false end @@ -44,7 +44,7 @@ def installed_fox_version search_directories.each do |path| filename = File.join(path, "fxver.h") - if FileTest.exists?(filename) + if FileTest.exist?(filename) foxMajor, foxMinor, foxLevel = read_fox_version(filename) return [foxMajor, foxMinor, foxLevel].join('.') end Index: ext/fox16/extconf.rb =================================================================== --- ext/fox16/extconf.rb (revision 921) +++ ext/fox16/extconf.rb (working copy) @@ -20,7 +20,7 @@ incdirs.each do |incdir| filename = File.join(incdir, "fxver.h") - if FileTest.exists?(filename) + if FileTest.exist?(filename) idircflag = "-I" + incdir $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag) return @@ -50,7 +50,7 @@ incdirs.each do |incdir| filename = File.join(incdir, "FXScintilla.h") - if FileTest.exists?(filename) + if FileTest.exist?(filename) $autodetected_fxscintilla = true idircflag = "-I" + incdir $CPPFLAGS += " " + idircflag unless $CPPFLAGS.split.include?(idircflag) @@ -87,11 +87,11 @@ $libs = append_library($libs, "FOX-1.6") $CFLAGS = $CFLAGS + " -fpermissive -DWIN32 -Iinclude" if is_fxscintilla_build? - File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak') + File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak') $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6" $libs = append_library($libs, "fxscintilla") else - File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp') + File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp') end end @@ -113,11 +113,11 @@ $CFLAGS = $CFLAGS + " /DWIN32 /DUNICODE /GR /GX /Iinclude" $LOCAL_LIBS = $LOCAL_LIBS + "FOX-1.6.lib" if is_fxscintilla_build? - File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak') + File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak') $CFLAGS = $CFLAGS + " /DWITH_FXSCINTILLA /DHAVE_FOX_1_6" $libs = append_library($libs, "fxscintilla") else - File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp') + File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp') end end @@ -139,11 +139,11 @@ $libs = append_library($libs, "FOX-1.6") $CFLAGS = $CFLAGS + " -O0 -Iinclude" if is_fxscintilla_build? - File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exists?('scintilla_wrap.cpp.bak') + File.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak') $CFLAGS = $CFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6" $libs = append_library($libs, "fxscintilla") else - File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exists?('scintilla_wrap.cpp') + File.move('scintilla_wrap.cpp', 'scintilla_wrap.cpp.bak') if FileTest.exist?('scintilla_wrap.cpp') end end Index: install.rb =================================================================== --- install.rb (revision 921) +++ install.rb (working copy) @@ -237,7 +237,6 @@ @table[k] = default end end - private :init def save File.open(SAVE_FILE, 'w') {|f| http://www.systemware.com/ From lyle.johnson at gmail.com Tue Apr 17 19:30:44 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Tue, 17 Apr 2007 18:30:44 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: <20070417225523.602CA5240B22@rubyforge.org> References: <20070417225523.602CA5240B22@rubyforge.org> Message-ID: On 4/17/07, Kevin Burge wrote: > Any estimate on support for 1.9 in FXRuby? I only ask because I'm > trying to add support for 1.9 to my extensions, and I end up building > FXRuby in the process. Yikes, Ruby 1.9 wasn't even on my radar screen yet. Since you've actually done some stuff with it -- Is it stable enough to even try out yet? I know the official release won't be until the end of the year (or whatever), but is it kinda working at this point? I will file a bug report about adding Ruby 1.9 support and see what I can do. From ggarra at advancedsl.com.ar Tue Apr 17 20:04:33 2007 From: ggarra at advancedsl.com.ar (gga) Date: Tue, 17 Apr 2007 21:04:33 -0300 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: References: <20070417225523.602CA5240B22@rubyforge.org> Message-ID: <46256091.7020107@advancedsl.com.ar> Lyle Johnson wrote: > On 4/17/07, Kevin Burge wrote: > >> Any estimate on support for 1.9 in FXRuby? I only ask because I'm >> trying to add support for 1.9 to my extensions, and I end up building >> FXRuby in the process. > > Yikes, Ruby 1.9 wasn't even on my radar screen yet. Since you've > actually done some stuff with it -- Is it stable enough to even try > out yet? I know the official release won't be until the end of the > year (or whatever), but is it kinda working at this point? As far as I can tell, ruby1.9 has always been functional. It has remained more or less stable since the YARV merge last December. There are relatively minor changes to the C api, but nothing earth shattering for .so writers. The only big gotcha is that ruby1.9 does away with continuations and that yarv is a little bit more multithread aware (not quite, really, but you need to prepare for it), so some of the internal stuff in eval.c is quite different. SWIG should already be 1.9 aware, as far as I can tell. PS. Talking about SWIG. As a result of me wrapping FLTK and the Maya API library under it, I've submitted 4 patches to the latest SWIG for ruby. Two are for relatively serious bugs in it (that could potentially crash it on some rare ocassions). I'm not sure if Fox could benefit from those (Fox mainly uses its own classes and relatively little of the features swig). -- Gonzalo Garramu?o ggarra at advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy From lyle.johnson at gmail.com Tue Apr 17 20:24:06 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Tue, 17 Apr 2007 19:24:06 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: <46256091.7020107@advancedsl.com.ar> References: <20070417225523.602CA5240B22@rubyforge.org> <46256091.7020107@advancedsl.com.ar> Message-ID: On 4/17/07, gga wrote: > As far as I can tell, ruby1.9 has always been functional. It has > remained more or less stable since the YARV merge last December. > There are relatively minor changes to the C api, but nothing earth > shattering for .so writers. OK. > PS. Talking about SWIG. As a result of me wrapping FLTK and the Maya > API library under it, I've submitted 4 patches to the latest SWIG for > ruby. Two are for relatively serious bugs in it (that could potentially > crash it on some rare ocassions). I'm not sure if Fox could benefit > from those (Fox mainly uses its own classes and relatively little of the > features swig). Yes, the hard parts of FXRuby were completed before SWIG got some of its more recent useful features (like the director classes support), and there was some breakage for multiple modules for several releases. I will probably upgrade to a more recent SWIG at some point, but right now I'm using a modified version of SWIG 1.3.22. From kevin.burge at systemware.com Wed Apr 18 06:56:47 2007 From: kevin.burge at systemware.com (Kevin Burge) Date: Wed, 18 Apr 2007 05:56:47 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: References: <20070417225523.602CA5240B22@rubyforge.org> Message-ID: <20070418105606.929575240A8C@rubyforge.org> As an extension developer myself, I wanted to try to use 1.9 on a day-to-day basis before it's released, to make sure that I don't write any new incompatible code, and to possibly contribute by reporting bugs to various projects that don't seem to be 1.9 compatible sooner rather than later. IMO, it would be nice if, when 1.9 is finally released, there are actually libraries that work with it beyond the standard stuff. :) The main things that have affected me are: in Ruby code: String is not Enumerable (i.e. no each) arity changes for blocks send vs. funcall Thread.critical not supported using "case/when" with a colon, instead of "then" or ";", i.e. "when 7: true" in Extension code: rb_cvar_set takes 1 less arg RB_STRING doesn't allow direct access anymore (I've been converting to RB_STRING_LEN and RB_STRING_PTR (not sure if this is the right thing yet). Also, YARV only supports native threads at this point, as far as I can tell. Lyle Johnson wrote: > On 4/17/07, Kevin Burge wrote: > > >> Any estimate on support for 1.9 in FXRuby? I only ask because I'm >> trying to add support for 1.9 to my extensions, and I end up building >> FXRuby in the process. >> > > Yikes, Ruby 1.9 wasn't even on my radar screen yet. Since you've > actually done some stuff with it -- Is it stable enough to even try > out yet? I know the official release won't be until the end of the > year (or whatever), but is it kinda working at this point? > > I will file a bug report about adding Ruby 1.9 support and see what I can do. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > > http://www.systemware.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20070418/222038c4/attachment.html From lyle.johnson at gmail.com Wed Apr 18 08:05:25 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Wed, 18 Apr 2007 07:05:25 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: <20070418105606.929575240A8C@rubyforge.org> References: <20070417225523.602CA5240B22@rubyforge.org> <20070418105606.929575240A8C@rubyforge.org> Message-ID: On 4/18/07, Kevin Burge wrote: > As an extension developer myself, I wanted to try to use 1.9 on a > day-to-day basis before it's released, to make sure that I don't write any > new incompatible code, and to possibly contribute by reporting bugs to > various projects that don't seem to be 1.9 compatible sooner rather than > later. IMO, it would be nice if, when 1.9 is finally released, there are > actually libraries that work with it beyond the standard stuff. :) > Sure. ;) Also, YARV only supports native threads at this point, as far as I can tell. > Native threads, as in operating system threads? Or just the user-space threads that Ruby 1.8 provides? Just an update: I checked out the trunk for Ruby 1.9 last night and built that, but I'm having trouble getting some critical stuff (namely, RubyGems) to even install. I'm sure this is just a temporary breakage, but it looks like it's going to be awhile before I can say that FXRuby "works" on Ruby 1.9. Nevertheless, I'll go ahead and apply the patches that you sent (for FileText.exists?) and so my best to get other things fixed in due time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20070418/5a822355/attachment.html From kevin.burge at systemware.com Wed Apr 18 08:22:49 2007 From: kevin.burge at systemware.com (Kevin Burge) Date: Wed, 18 Apr 2007 07:22:49 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: References: <20070417225523.602CA5240B22@rubyforge.org> <20070418105606.929575240A8C@rubyforge.org> Message-ID: <20070418122207.BC7875240A8C@rubyforge.org> Thank you. I found a possible error in the patch I sent you: It looks like you can call "funcall", rather than removing "private :init" from install.rb. I have not verified this. And, "funcall" is not in 1.8, so I put in: if RUBY_VERSION < "1.9" module Kernel alias_method :funcall, :send end end Haven't quite figured out the difference between funcall, send, and __send__. Lyle Johnson wrote: > On 4/18/07, *Kevin Burge* > wrote: > > As an extension developer myself, I wanted to try to use 1.9 on a > day-to-day basis before it's released, to make sure that I don't > write any new incompatible code, and to possibly contribute by > reporting bugs to various projects that don't seem to be 1.9 > compatible sooner rather than later. IMO, it would be nice if, > when 1.9 is finally released, there are actually libraries that > work with it beyond the standard stuff. :) > > > Sure. ;) > > Also, YARV only supports native threads at this point, as far as I > can tell. > > > Native threads, as in operating system threads? Or just the user-space > threads that Ruby 1.8 provides? > > Just an update: I checked out the trunk for Ruby 1.9 last night and > built that, but I'm having trouble getting some critical stuff > (namely, RubyGems) to even install. I'm sure this is just a temporary > breakage, but it looks like it's going to be awhile before I can say > that FXRuby "works" on Ruby 1.9. Nevertheless, I'll go ahead and apply > the patches that you sent (for FileText.exists?) and so my best to get > other things fixed in due time. > > ------------------------------------------------------------------------ > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users http://www.systemware.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20070418/82dbb7ef/attachment.html From ggarra at advancedsl.com.ar Wed Apr 18 08:37:42 2007 From: ggarra at advancedsl.com.ar (gga) Date: Wed, 18 Apr 2007 09:37:42 -0300 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: <20070418105606.929575240A8C@rubyforge.org> References: <20070417225523.602CA5240B22@rubyforge.org> <"d4cf71b00704171630i2 4ea4cd5h90dc961fe914e299"@mail.gmail.com> <20070418105606.929575240A8C@rubyforge.org> Message-ID: <46261116.5050508@advancedsl.com.ar> Kevin Burge wrote: > > The main things that have affected me are: > What crazy version of 1.9 are you testing? Half of the stuff you mentioned works fine for me. Latest SVN. Examples: > irb1.9 >> puts RUBY_VERSION 1.9.0 ---- > in Ruby code: > String is not Enumerable (i.e. no each) Huh? >> 'asdsd'.each { |x| puts x } asdsd => "asdsd" >> 'asdsd'.each_byte { |x| puts x } 97 115 100 115 100 No Unicode, yet, thou. > arity changes for blocks Like? > send vs. funcall >> '5'.send(:to_i) => 5 (or do you mean how this resolved in inheritance - a subtle change -- see comp.lang.ruby. Basically send was broken since it could call private methods before) > Thread.critical not supported True. > using "case/when" with a colon, instead of "then" or ";", i.e. "when 7: > true" Huh? Colons? You must have gotten python on your mind. >> a = 20 => 20 >> case a >> when 20 >> puts 'x' >> else >> puts 'y' >> end => 'x' > > in Extension code: > rb_cvar_set takes 1 less arg Yes, that's what it should have been all along. Some crazy guy put a 4th warning argument somewhere in the 1.8 branch and matz removed it. > RB_STRING doesn't allow direct access anymore (I've been converting to > RB_STRING_LEN and RB_STRING_PTR (not sure if this is the right thing yet). AFAIK, they are RSTRING_LEN and RSTRING_PTR. For array you have RARRAY_LEN and RARRAY_PTR. The PTR version of string is hardly ever used due to StringValuePtr() and StringValueCStr() -- pickaxe recommended. > > Also, YARV only supports native threads at this point, as far as I can tell. > Yep. The code for ruby's 1.8 green threads is there but koichi turned it off at some point (some bug, probably). -- Gonzalo Garramu?o ggarra at advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Kubuntu Edgy From kevin.burge at systemware.com Wed Apr 18 09:42:38 2007 From: kevin.burge at systemware.com (Kevin Burge) Date: Wed, 18 Apr 2007 08:42:38 -0500 Subject: [fxruby-users] Support for Ruby 1.9? In-Reply-To: <46261116.5050508@advancedsl.com.ar> References: <20070417225523.602CA5240B22@rubyforge.org> <"d4cf71b00704171630i2 4ea4cd5h90dc961fe914e299"@mail.gmail.com> <20070418105606.929575240A8C@rubyforge.org> <46261116.5050508@advancedsl.com.ar> Message-ID: <20070418134157.911B55240AE2@rubyforge.org> (built this morning from trunk) === String.each % ruby -v ruby 1.9.0 (2007-04-18 patchlevel 0) [i686-linux] % ruby -e '"a\nb\n".each { |l| puts l }' -e:1:in `
': undefined method `each' for "a\nb\n":String (NoMethodError) each_byte works though. === arity: class A def self.meth_with_block(a, &block) puts block.arity end end A.meth_with_block do |arg1| end Ruby 1.9 => -2 Ruby 1.8.6 => 1 (I don't know if this is a bug in 1.9 or not. I don't understand the logic behind -2 - you'd think it'd be 1). From what I've seen on the mailing lists, -2 should be |a,*b|. === From activesupport: def self.included(klass) #:nodoc: klass.funcall(:alias_method, :to_default_s, :to_s) klass.funcall(:alias_method, :to_s, :to_formatted_s) end works, but: def self.included(klass) #:nodoc: klass.send(:alias_method, :to_default_s, :to_s) klass.send(:alias_method, :to_s, :to_formatted_s) end doesn't. === about "when" clause, a couple libraries I use do this: case somevar when 1: true when 2: false end This no longer works in 1.9. You have to do: when 1; true when 2; false or when 1 then true when 2 then false I've never done this in my own code. === You are correct about RB_STRING* also, it is RSTRING*, just misspoke. My quick hack was to replace all with the _PTR and _LEN macros. I'll update my own libraries to use StringValuePtr and StringValueCStr. Thanks! Kevin http://www.systemware.com/ From lyle.johnson at gmail.com Wed Apr 18 10:59:50 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Wed, 18 Apr 2007 09:59:50 -0500 Subject: [fxruby-users] [ANN] FXRuby 1.6.11 Now Available Message-ID: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby version 1.6.11 is now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=11201 This is a bug fix release and is strongly recommended. Note that if you're building FXRuby from source, you should be using FOX 1.6.16 or later due to some important changes made in that release of FOX. For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html As usual, the code is provided as a Win32 installer or a binary Gem (both compatible with the latest One-Click Installer for Ruby), as a source gem, and as a source tarball. For instructions on compiling FXRuby from source, please see: http://www.fxruby.org/doc/build.html And as always, the FXRuby home page is here: http://www.fxruby.org Enjoy, Lyle - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGJjIkFXV/hD6oMd0RAjlNAJwMfNChkS289j2eFj3NjsH9LmmFSACeKjYc Izv7GCI9ke2DJT+9BFwO/sM= =ChLV - -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFGJjJnFXV/hD6oMd0RAofeAKCLr3G3/otVvnWjxXKjTR7pKnc5ewCfVqjf 2gPTMz1a3QGThgaqlcpEXkc= =xq2U -----END PGP SIGNATURE----- From vjoel at path.berkeley.edu Thu Apr 19 01:24:18 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Wed, 18 Apr 2007 22:24:18 -0700 Subject: [fxruby-users] test if a window has been destroyed Message-ID: <4626FD02.20806@path.berkeley.edu> Is there a way to test if a FXWindow has been destroyed? If a window is closed by the user clicking the close box, for example, is there some flag in the FXWindow object that you can test so that you don't try to show or raise the window without creating it again? Or do you have to intercept the close event and maintain that state yourself? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From philippe.lang at attiksystem.ch Thu Apr 19 04:59:49 2007 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Thu, 19 Apr 2007 10:59:49 +0200 Subject: [fxruby-users] FXRuby 1.6.11 problems with Ruby 1.8.5? References: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com> Message-ID: <6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch> > All, > > FXRuby version 1.6.11 is now available for download from this page: > > http://rubyforge.org/frs/?group_id=300&release_id=11201 > > This is a bug fix release and is strongly recommended. Note that if > you're building FXRuby from source, you should be using FOX 1.6.16 or > later due to some important changes made in that release of FOX. For > a summary of the changes in this release of FXRuby, please see this > page: > > http://www.fxruby.org/doc/changes.html > > As usual, the code is provided as a Win32 installer or a binary Gem > (both compatible with the latest One-Click Installer for Ruby), as a > source gem, and as a source tarball. For instructions on compiling > FXRuby from source, please see: > > http://www.fxruby.org/doc/build.html > > And as always, the FXRuby home page is here: > > http://www.fxruby.org > > Enjoy, > > Lyle Hi Lyle, I have just given a try to your new FXRuby release, and I have a few problems when my application starts: -------- c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant TRUE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant FALSE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant MAYBE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant NULL c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_NONE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_KEYPRESS c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_KEYRELEASE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_LEFTBUTTONPRESS c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_LEFTBUTTONRELEASE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_MIDDLEBUTTONPRESS c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_MIDDLEBUTTONRELEASE c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning : already initialized constant SEL_RIGHTBUTTONPRESS c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.6.11-mswin32/ext/fox16/fox16.so: warning -------- I'm using that Ruby version: ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] Until now, I had no single problem with version 1.6.6. With that new version, I get not only warnings at start, but also other weired things later, like Win32OLE that does not work anymore. But I have to invertigate that a little bit further... Do we need Ruby 1.8.6 maybe? You mention "compatible with the latest One-Click Installer for Ruby" in your announce. 1.8.5 is in not the latest version, but close! Regards, Philippe Lang From meinrad.recheis at gmail.com Thu Apr 19 06:29:01 2007 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 19 Apr 2007 12:29:01 +0200 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: <4626FD02.20806@path.berkeley.edu> References: <4626FD02.20806@path.berkeley.edu> Message-ID: <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> AFAIK there is the shown? method On 4/19/07, Joel VanderWerf wrote: > > > Is there a way to test if a FXWindow has been destroyed? > > If a window is closed by the user clicking the close box, for example, > is there some flag in the FXWindow object that you can test so that you > don't try to show or raise the window without creating it again? > > Or do you have to intercept the close event and maintain that state > yourself? > > -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > _______________________________________________ > 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/20070419/0cdf3d11/attachment.html From lyle.johnson at gmail.com Thu Apr 19 09:30:39 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 19 Apr 2007 08:30:39 -0500 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: <4626FD02.20806@path.berkeley.edu> References: <4626FD02.20806@path.berkeley.edu> Message-ID: On 4/19/07, Joel VanderWerf wrote: > Is there a way to test if a FXWindow has been destroyed? If a window has been destroyed, or hasn't been created *yet*, then created? method should answer false: window.create unless window.created? window.show Note, however, that create is supposed to be a no-op if the window is already realized, so you should be able to shorten the above code to: window.create window.show Hope this helps, Lyle From lyle.johnson at gmail.com Thu Apr 19 09:48:26 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 19 Apr 2007 08:48:26 -0500 Subject: [fxruby-users] FXRuby 1.6.11 problems with Ruby 1.8.5? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch> References: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com> <6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch> Message-ID: On 4/19/07, Philippe Lang wrote: > I have just given a try to your new FXRuby release, and I have a few > problems when my application starts: > I'm using that Ruby version: ruby 1.8.5 (2006-12-25 patchlevel 12) > [i386-mswin32] This bug has been fixed and I can't imagine how it could have snuck back in. Can you tell me which version of the Ruby One-Click Installer you're using, specifically? > Do we need Ruby 1.8.6 maybe? You mention "compatible with the latest > One-Click Installer for Ruby" in your announce. 1.8.5 is in not the > latest version, but close! Well, I *am* compiling everything against the Ruby 1.8.6 include files, and linking against that version of the Ruby library, so it's possible that there are some binary incompatibilities with Ruby 1.8.5. I will try to investigate this later today and see if I can reproduce the bug. From philippe.lang at attiksystem.ch Thu Apr 19 09:54:27 2007 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Thu, 19 Apr 2007 15:54:27 +0200 Subject: [fxruby-users] FXRuby 1.6.11 problems with Ruby 1.8.5? References: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com><6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch> Message-ID: <6C0CF58A187DA5479245E0830AF84F423378E1@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > On 4/19/07, Philippe Lang wrote: > >> I have just given a try to your new FXRuby release, and I have a few >> problems when my application starts: > > > >> I'm using that Ruby version: ruby 1.8.5 (2006-12-25 patchlevel 12) >> [i386-mswin32] > > This bug has been fixed and I can't imagine how it could have snuck > back in. Can you tell me which version of the Ruby One-Click > Installer you're using, specifically? Hi, I'm using "ruby185-24.exe". Philippe From lyle.johnson at gmail.com Thu Apr 19 11:49:19 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 19 Apr 2007 10:49:19 -0500 Subject: [fxruby-users] FXRuby 1.6.11 problems with Ruby 1.8.5? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F423378E1@poweredge.attiksystem.ch> References: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com> <6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch> <6C0CF58A187DA5479245E0830AF84F423378E1@poweredge.attiksystem.ch> Message-ID: On 4/19/07, Philippe Lang wrote: > I'm using "ruby185-24.exe". OK. I can confirm that the problem is there for Ruby 1.8.5 as installed from that version of the one-click installer (ruby186-24.exe). I did a clean install of Ruby, and then the 1.6.11 gem for FXRuby, and saw the mess. I can *also* confirm that the problem is corrected in Ruby 1.8.6, from the latest one-click installer. I was testing the same gem (fxruby-1.6.11-mswin32.gem) in both cases, so the difference is definitely in Ruby and not in FXRuby. So my answer is: Time for you to upgrade to 1.8.6. ;) From vjoel at path.berkeley.edu Thu Apr 19 12:15:02 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 19 Apr 2007 09:15:02 -0700 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: References: <4626FD02.20806@path.berkeley.edu> Message-ID: <46279586.4040900@path.berkeley.edu> Lyle Johnson wrote: > On 4/19/07, Joel VanderWerf wrote: > >> Is there a way to test if a FXWindow has been destroyed? > > If a window has been destroyed, or hasn't been created *yet*, then > created? method should answer false: > > window.create unless window.created? > window.show A window that has been destroyed causes created? to fail with "This FXId * already released". To see this, change glviewer.rb as follows: --- glviewer.rb.bck 2007-04-19 09:13:28.000000000 -0700 +++ glviewer.rb 2007-04-19 09:13:28.000000000 -0700 @@ -272,6 +272,10 @@ FXMenuCommand.new(filemenu, "&Dump...\t\tDump widgets.", nil, getApp(), FXApp::ID_DUMP) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application.", nil, getApp(), FXApp::ID_QUIT) + FXMenuCommand.new(filemenu, "Foobar", nil).connect(SEL_COMMAND) do + p mdichild.created? + end + # Edit Menu editmenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&Edit", nil, editmenu) Then, run it, select the File/Foobar menu cmd, close the child window, and then select the File/Foobar menu cmd again. You shout get this: $ ruby glviewer.rb true glviewer.rb:276:in `created?': This FXId * already released (RuntimeError) from glviewer.rb:276:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.11/lib/fox16/responder2.rb:57:in `call' from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.11/lib/fox16/responder2.rb:57:in `onHandleMsg' from glviewer.rb:579:in `run' from glviewer.rb:579 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Thu Apr 19 12:58:52 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 19 Apr 2007 09:58:52 -0700 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> References: <4626FD02.20806@path.berkeley.edu> <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> Message-ID: <46279FCC.80307@path.berkeley.edu> Meinrad Recheis wrote: > AFAIK there is the shown? method If the window has been destroyed, #shown? has the same effect as #created? -- it dies with "This FXId * already released". -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From meinrad.recheis at gmail.com Thu Apr 19 13:14:07 2007 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 19 Apr 2007 19:14:07 +0200 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: <46279FCC.80307@path.berkeley.edu> References: <4626FD02.20806@path.berkeley.edu> <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> <46279FCC.80307@path.berkeley.edu> Message-ID: <43d756720704191014t79c7f1e1wd65a06ced9bb69f7@mail.gmail.com> On 4/19/07, Joel VanderWerf wrote: > > Meinrad Recheis wrote: > > AFAIK there is the shown? method > > If the window has been destroyed, #shown? has the same effect as > #created? -- it dies with "This FXId * already released". jeah, and interestingly a widget comes back to life when you call create again. i found out that calling destroy on widgets does not remove them from the widget tree and they come back to live after calling create on their parent. but this is another story. Lyle, I also think that such a state that can be queried with a method like destroyed? would be very good to have. i had to work around this shortcoming in fxruby for several times. Is it technically possible? regards, -- henon -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > _______________________________________________ > 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/20070419/0890d99c/attachment-0001.html From lyle.johnson at gmail.com Thu Apr 19 14:18:01 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 19 Apr 2007 13:18:01 -0500 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: <43d756720704191014t79c7f1e1wd65a06ced9bb69f7@mail.gmail.com> References: <4626FD02.20806@path.berkeley.edu> <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> <46279FCC.80307@path.berkeley.edu> <43d756720704191014t79c7f1e1wd65a06ced9bb69f7@mail.gmail.com> Message-ID: On 4/19/07, Meinrad Recheis wrote: > jeah, and interestingly a widget comes back to life when you call create > again. i found out that calling destroy on widgets does not remove them from > the widget tree and they come back to live after calling create on their > parent. but this is another story. Yes, this is as designed. Calling destroy() on a widget is (supposed to) only destroy the server-side resource and leave the client-side object (i.e. the Ruby instance) intact -- so that you could, as you noted, call create() on it to "re-realize" it. This is in contrast to, say, removeWidget(), which both destroys the server-side resource and deletes the client-side object. The message that Joel is seeing indicates that the underlying C++ object has been destroyed (deleted) as well, which shouldn't happen if all you're doing is calling destroy on it. So I need to figure out what's going on there. > Lyle, I also think that such a state that can be queried with a method like > destroyed? would be very good to have. i had to work around this shortcoming > in fxruby for several times. Is it technically possible? As I stated in a previous e-mail, created? is supposed to answer true is there is a server-side resource (e.g. a widget, font, cursor, ...) associated with the client-side object (the Ruby instance). From vjoel at path.berkeley.edu Thu Apr 19 15:37:54 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 19 Apr 2007 12:37:54 -0700 Subject: [fxruby-users] test if a window has been destroyed In-Reply-To: References: <4626FD02.20806@path.berkeley.edu> <43d756720704190329m4050cf35k9e488032da9be9ee@mail.gmail.com> <46279FCC.80307@path.berkeley.edu> <43d756720704191014t79c7f1e1wd65a06ced9bb69f7@mail.gmail.com> Message-ID: <4627C512.6030806@path.berkeley.edu> Lyle Johnson wrote: > On 4/19/07, Meinrad Recheis wrote: > >> jeah, and interestingly a widget comes back to life when you call create >> again. i found out that calling destroy on widgets does not remove them from >> the widget tree and they come back to live after calling create on their >> parent. but this is another story. > > Yes, this is as designed. Calling destroy() on a widget is (supposed > to) only destroy the server-side resource and leave the client-side > object (i.e. the Ruby instance) intact -- so that you could, as you > noted, call create() on it to "re-realize" it. This is in contrast to, > say, removeWidget(), which both destroys the server-side resource and > deletes the client-side object. > > The message that Joel is seeing indicates that the underlying C++ > object has been destroyed (deleted) as well, which shouldn't happen if > all you're doing is calling destroy on it. So I need to figure out > what's going on there. I *think* the following is a good workaround, and in some ways a better approach than #destroyed? anyway (better to ask forgiveness than to ask permission, as they say): begin window.show rescue => ex if /already released/ =~ ex.message window = make_window window.show else raise end end I don't like matching the exception text though. I wonder if the "already released" error could be represented by a subclass of RuntimeError? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Thu Apr 19 15:55:28 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 19 Apr 2007 14:55:28 -0500 Subject: [fxruby-users] Help with debugging FXRuby on SPARC Message-ID: I might as well ask. ;) Is anyone out there using FXRuby on a SPARC platform and running Linux? http://rubyforge.org/tracker/?func=detail&atid=1223&aid=10226&group_id=300 From philippe.lang at attiksystem.ch Fri Apr 20 01:01:53 2007 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 20 Apr 2007 07:01:53 +0200 Subject: [fxruby-users] FXRuby 1.6.11 problems with Ruby 1.8.5? References: <4C60A92C-FAA4-4F84-8BCD-F6671E5253BA@gmail.com><6C0CF58A187DA5479245E0830AF84F4218CE29@poweredge.attiksystem.ch><6C0CF58A187DA5479245E0830AF84F423378E1@poweredge.attiksystem.ch> Message-ID: <6C0CF58A187DA5479245E0830AF84F423378E3@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: > So my answer is: Time for you to upgrade to 1.8.6. ;) I'll do it! :) Thanks for your help, Regards, Philippe Lang From dstar at pele.cx Sun Apr 22 00:01:02 2007 From: dstar at pele.cx (Shalon Wood) Date: Sat, 21 Apr 2007 23:01:02 -0500 Subject: [fxruby-users] FXProgressBar messages? Message-ID: <871widxdkx.fsf@pele.pele.cx> I'm trying to subclass FXProgressBar and pervert it into a slider (anyone who remembers the original Master of Orion game will understand what I'm doing). Unfortunately, it doesn't seem to send SEL_LEFTBUTTONPRESS or SEL_LEFTBUTTONRELEASE messages, despite being derived from FXWindow via FXFrame. Am I mistaken in thinking that it should send those messages? I assumed that that sort of behaviour would be inherited... Shalon Wood -- From jeroen at fox-toolkit.org Sun Apr 22 11:50:52 2007 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Sun, 22 Apr 2007 10:50:52 -0500 Subject: [fxruby-users] FXProgressBar messages? In-Reply-To: <871widxdkx.fsf@pele.pele.cx> References: <871widxdkx.fsf@pele.pele.cx> Message-ID: <200704221050.53265.jeroen@fox-toolkit.org> On Saturday 21 April 2007 23:01, Shalon Wood wrote: > > I'm trying to subclass FXProgressBar and pervert it into a slider > (anyone who remembers the original Master of Orion game will > understand what I'm doing). Unfortunately, it doesn't seem to send > SEL_LEFTBUTTONPRESS or SEL_LEFTBUTTONRELEASE messages, despite being > derived from FXWindow via FXFrame. Am I mistaken in thinking that it > should send those messages? I assumed that that sort of behaviour > would be inherited... Enable the widget so that it'll pass mouse messages on to its target! - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 10:50 04/22/2007 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ From dstar at pele.cx Sun Apr 22 12:41:14 2007 From: dstar at pele.cx (Shalon Wood) Date: Sun, 22 Apr 2007 11:41:14 -0500 Subject: [fxruby-users] FXProgressBar messages? In-Reply-To: <200704221050.53265.jeroen@fox-toolkit.org> (Jeroen van der Zijp's message of "Sun, 22 Apr 2007 10:50:52 -0500") References: <871widxdkx.fsf@pele.pele.cx> <200704221050.53265.jeroen@fox-toolkit.org> Message-ID: <878xckwedx.fsf@pele.pele.cx> Jeroen van der Zijp writes: > On Saturday 21 April 2007 23:01, Shalon Wood wrote: >> >> I'm trying to subclass FXProgressBar and pervert it into a slider >> (anyone who remembers the original Master of Orion game will >> understand what I'm doing). Unfortunately, it doesn't seem to send >> SEL_LEFTBUTTONPRESS or SEL_LEFTBUTTONRELEASE messages, despite being >> derived from FXWindow via FXFrame. Am I mistaken in thinking that it >> should send those messages? I assumed that that sort of behaviour >> would be inherited... > > Enable the widget so that it'll pass mouse messages on to its target! Aha! Thanks! I'm just learning to use the toolkit, so I'd missed that I needed to do that. Another question: I want to make a sidebar with its own layout. I thought FXFrame would be the right thing to use, but I can't give it a FXPacker layout because it's not a FXComposite. What am I missing? Shalon Wood -- From vjoel at path.berkeley.edu Thu Apr 26 19:00:25 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 26 Apr 2007 16:00:25 -0700 Subject: [fxruby-users] FXSplitter width is 1 until created Message-ID: <46312F09.90306@path.berkeley.edu> Why is the width of an FXSplitter equal to 1 before the FXSplitter#create method is called? My splitter is configured to have LAYOUT_FILL_X, so wouldn't its width be determined before its children were created? It's not really a big deal, but I was configuring the split based on a preferences file during initialize, and couldn't make it work properly. Doing it in #create is an acceptable workaround. This isn't a problem with FX4Splitter. The splitting is implemented differently (and the split values have different meaning). Somehow, both hSplit and vSplit are available before create. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Thu Apr 26 19:10:57 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 26 Apr 2007 16:10:57 -0700 Subject: [fxruby-users] FXSplitter width is 1 until created In-Reply-To: <46312F09.90306@path.berkeley.edu> References: <46312F09.90306@path.berkeley.edu> Message-ID: <46313181.9090703@path.berkeley.edu> Joel VanderWerf wrote: > Why is the width of an FXSplitter equal to 1 before the > FXSplitter#create method is called? > > My splitter is configured to have LAYOUT_FILL_X, so wouldn't its width > be determined before its children were created? > > It's not really a big deal, but I was configuring the split based on a > preferences file during initialize, and couldn't make it work properly. > Doing it in #create is an acceptable workaround. > > This isn't a problem with FX4Splitter. The splitting is implemented > differently (and the split values have different meaning). Somehow, both > hSplit and vSplit are available before create. I'm sorry, that bit about FX4Splitter is nonsense. FX4Splitter has width==1 and height==1 before create, as well. What I should have said is that FX4Splitter's splitting mechanism (proportional rather than based on width) makes this irrelevant to my code, which really just wants to set the proportions, and not the widths of the children. I guess FXSplitter (as opp. FX4Splitter) can't work that way because it might have >2 children. So I'll stick with configuring it in #create. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Thu Apr 26 19:22:29 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 26 Apr 2007 16:22:29 -0700 Subject: [fxruby-users] FXSplitter width is 1 until created In-Reply-To: <46313181.9090703@path.berkeley.edu> References: <46312F09.90306@path.berkeley.edu> <46313181.9090703@path.berkeley.edu> Message-ID: <46313435.7030708@path.berkeley.edu> Joel VanderWerf wrote: ... > So I'll stick with configuring it in #create. Btw, ruby closures are a very clean way to do this. def on_create(&block) @create_actions ||= [] @create_actions << block end def do_create_actions @create_actions and @create_actions.each do |action| action.call end end def initialize(*) splitter = ... on_create do # <-- this is all I had to change in initialize # configure the splitter based on its width and the preferences # for split proportion end end def create super do_create_actions show end Ok, that's enough noise for a while. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle.johnson at gmail.com Fri Apr 27 11:56:26 2007 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 27 Apr 2007 10:56:26 -0500 Subject: [fxruby-users] FXSplitter width is 1 until created In-Reply-To: <46313435.7030708@path.berkeley.edu> References: <46312F09.90306@path.berkeley.edu> <46313181.9090703@path.berkeley.edu> <46313435.7030708@path.berkeley.edu> Message-ID: <88F53679-2272-48C1-9E90-8ABD23D65A6A@gmail.com> On Apr 26, 2007, at 6:22 PM, Joel VanderWerf wrote: > Joel VanderWerf wrote: > ... >> So I'll stick with configuring it in #create. > > Btw, ruby closures are a very clean way to do this. This is a nice hack; I like that it keeps the splitter-specific configuration close to the spot where you actually construct the splitter. Thanks for sharing it! From vjoel at path.berkeley.edu Fri Apr 27 17:52:03 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 27 Apr 2007 14:52:03 -0700 Subject: [fxruby-users] mdiclient windows do not always activate on click Message-ID: <46327083.9040004@path.berkeley.edu> I just noticed that MDIClient windows do not automatically become current when they receive a mouse click, but only do so if the click happens inside of an enabled widget. This may very well be correct, but if so then what is the right way to handle it, if you want a more familiar window-manager behavior (click to focus)? For example, if you change the mditest.rb example like so... --- mditest.rb 2007-04-18 16:19:59.000000000 -0700 +++ mdi.rb 2007-04-27 14:44:54.000000000 -0700 @@ -134,7 +134,7 @@ scrollwindow = FXScrollWindow.new(mdichild, 0) scrollwindow.verticalScrollBar.setLine(@font.fontHeight) btn = FXButton.new(scrollwindow, TYGER, - :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 600, :height => 1000) + :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 100, :height => 100) btn.font = @font btn.backColor = FXColor::White mdichild ...and then click on the empty area within one of the windows behind the active child, then that window will not be made active. However, adding the line scrollwindow.enabled = true makes the behavior feel more normal (to me). Is there any drawback to enabling things like scroll windows (probably also frames and matrixes, but I haven't tried them)? Is there a better way to handle this? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Fri Apr 27 18:13:24 2007 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 27 Apr 2007 15:13:24 -0700 Subject: [fxruby-users] mdiclient windows do not always activate on click In-Reply-To: <46327083.9040004@path.berkeley.edu> References: <46327083.9040004@path.berkeley.edu> Message-ID: <46327584.4060502@path.berkeley.edu> Joel VanderWerf wrote: > I just noticed that MDIClient windows do not automatically become > current when they receive a mouse click, but only do so if the click > happens inside of an enabled widget. This may very well be correct, but > if so then what is the right way to handle it, if you want a more > familiar window-manager behavior (click to focus)? > > For example, if you change the mditest.rb example like so... > > --- mditest.rb 2007-04-18 16:19:59.000000000 -0700 > +++ mdi.rb 2007-04-27 14:44:54.000000000 -0700 > @@ -134,7 +134,7 @@ > scrollwindow = FXScrollWindow.new(mdichild, 0) > scrollwindow.verticalScrollBar.setLine(@font.fontHeight) > btn = FXButton.new(scrollwindow, TYGER, > - :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 600, > :height => 1000) > + :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 100, > :height => 100) > btn.font = @font > btn.backColor = FXColor::White > mdichild > > > ...and then click on the empty area within one of the windows behind the > active child, then that window will not be made active. > > However, adding the line > > scrollwindow.enabled = true > > makes the behavior feel more normal (to me). > > Is there any drawback to enabling things like scroll windows (probably > also frames and matrixes, but I haven't tried them)? > > Is there a better way to handle this? > Here's a candidate. In the FXMDIChild's create method, enable the content window (which I guess is everything but the title bar and border), and handle mousedown: def create(*) super contentWindow.enable contentWindow.connect(SEL_LEFTBUTTONPRESS) do parent.setActiveChild self false end end Unfortunately, a mouse click in (for example) a label inside of the content window doesn't get caught this way. Still looking for something better... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407