From vjoel at path.berkeley.edu Fri Sep 1 02:48:01 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Thu, 31 Aug 2006 23:48:01 -0700 Subject: [fxruby-users] ruby-1.8.5 loads fox16.so more than once Message-ID: <44F7D7A1.6030700@path.berkeley.edu> Hi, all, After upgrading ruby from 1.8.4 to 1.8.5, loading fox16 causes a warning for each constant, and $" shows that the .so has been loaded more than once (see below). I remember reporting this long ago for ruby 1.9 [1]. Maybe something from 1.9 has now appeared in 1.8.5 that is causing this problem? Could it be that I just need to rebuild fox16 against the newer ruby? [1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117682 $ ruby -vr fox16 -e 'p $".grep(/fox/)' ruby 1.8.4 (2005-12-24) [i686-linux] /usr/local/lib/ruby/site_ruby/1.8/fox16/core.rb:177: warning: method redefined; discarding old readBoolEntry /usr/local/lib/ruby/site_ruby/1.8/fox16/core.rb:185: warning: method redefined; discarding old writeBoolEntry /usr/local/lib/ruby/site_ruby/1.8/fox16/aliases.rb:3573: warning: method redefined; discarding old position ["fox16.so", "fox16/core.rb", "fox16/dict.rb", "fox16/settings.rb", "fox16/iterators.rb", "fox16/keys.rb", "fox16/aliases.rb", "fox16/responder2.rb", "fox16/responder.rb", "fox16/timeout.rb", "fox16/chore.rb", "fox16/signal.rb", "fox16/input.rb", "fox16/glgroup.rb", "fox16/execute_nonmodal.rb", "fox16/version.rb"] $ ruby -vr fox16 -e 'p $".grep(/fox/)' ruby 1.8.5 (2006-08-25) [i686-linux] /usr/local/lib/ruby/site_ruby/1.8/fox16/core.rb:177: warning: method redefined; discarding old readBoolEntry /usr/local/lib/ruby/site_ruby/1.8/fox16/core.rb:185: warning: method redefined; discarding old writeBoolEntry /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant TRUE /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant FALSE /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant MAYBE /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant NULL /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant SEL_NONE /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant SEL_KEYPRESS . . . initialized constant ID_REFRESH /usr/local/lib/ruby/site_ruby/1.8/i686-linux/fox16.so: warning: already initialized constant ID_LAST /usr/local/lib/ruby/site_ruby/1.8/fox16/aliases.rb:3573: warning: method redefined; discarding old position ["fox16/core.rb", "fox16/dict.rb", "fox16/settings.rb", "fox16/execute_nonmodal.rb", "fox16.so", "fox16/version.rb", "fox16.so", "fox16/glgroup.rb", "fox16.so", "fox16/responder.rb", "fox16/timeout.rb", "fox16/chore.rb", "fox16/signal.rb", "fox16/input.rb", "fox16/responder2.rb", "fox16.so", "fox16/aliases.rb", "fox16.so", "fox16/keys.rb", "fox16.so", "fox16/iterators.rb", "fox16.so"] -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle at knology.net Fri Sep 1 07:35:37 2006 From: lyle at knology.net (Lyle Johnson) Date: Fri, 1 Sep 2006 06:35:37 -0500 Subject: [fxruby-users] ruby-1.8.5 loads fox16.so more than once In-Reply-To: <44F7D7A1.6030700@path.berkeley.edu> References: <44F7D7A1.6030700@path.berkeley.edu> Message-ID: On Sep 1, 2006, at 1:48 AM, Joel VanderWerf wrote: > Hi, all, > > After upgrading ruby from 1.8.4 to 1.8.5, loading fox16 causes a > warning > for each constant, and $" shows that the .so has been loaded more than > once (see below). > > I remember reporting this long ago for ruby 1.9 [1]. Maybe something > from 1.9 has now appeared in 1.8.5 that is causing this problem? > > Could it be that I just need to rebuild fox16 against the newer ruby? > > [1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117682 Well, this is no good. I'm seeing the same problem on Mac OS X with fox16 built against Ruby 1.8.5 -- so I don't have any reason to believe that rebuilding will make the problem go away. And I see that you didn't get any responses to your post to ruby-core (did you?) I guess I need to run this under the debugger and see what's going on (i.e. why it's loading the shared object more than once). Surely the semantics of require haven't changed? From vjoel at path.berkeley.edu Fri Sep 1 14:04:24 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 01 Sep 2006 11:04:24 -0700 Subject: [fxruby-users] ruby-1.8.5 loads fox16.so more than once In-Reply-To: References: <44F7D7A1.6030700@path.berkeley.edu> Message-ID: <44F87628.2030300@path.berkeley.edu> Lyle Johnson wrote: > On Sep 1, 2006, at 1:48 AM, Joel VanderWerf wrote: > >> Hi, all, >> >> After upgrading ruby from 1.8.4 to 1.8.5, loading fox16 causes a >> warning >> for each constant, and $" shows that the .so has been loaded more than >> once (see below). >> >> I remember reporting this long ago for ruby 1.9 [1]. Maybe something >> from 1.9 has now appeared in 1.8.5 that is causing this problem? >> >> Could it be that I just need to rebuild fox16 against the newer ruby? >> >> [1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117682 > > Well, this is no good. I'm seeing the same problem on Mac OS X with > fox16 built against Ruby 1.8.5 -- so I don't have any reason to > believe that rebuilding will make the problem go away. And I see that > you didn't get any responses to your post to ruby-core (did you?) I can't seem to find any responses (and I have no clear memory of any). There doesn't seem to be anything in Mauricio's 1.8.5 writeup[1] that would explain the problem. [1] http://eigenclass.org/hiki.rb?ruby+1.8.5+changelog > I guess I need to run this under the debugger and see what's going on > (i.e. why it's loading the shared object more than once). Surely the > semantics of require haven't changed? > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From vjoel at path.berkeley.edu Fri Sep 1 19:26:49 2006 From: vjoel at path.berkeley.edu (Joel VanderWerf) Date: Fri, 01 Sep 2006 16:26:49 -0700 Subject: [fxruby-users] FXDockTitle Message-ID: <44F8C1B9.6090904@path.berkeley.edu> The FXDockTitle doesn't seem to get defined as a ruby class anywhere, although there seem to be declarations for it in fxruby-1.6.1/ext/fox16/include. (I was trying to update the glviewer.rb to use it!) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 From lyle at knology.net Tue Sep 5 08:16:21 2006 From: lyle at knology.net (Lyle Johnson) Date: Tue, 5 Sep 2006 07:16:21 -0500 Subject: [fxruby-users] Uncaught bounce notification In-Reply-To: <200609041332.11460.jeroen@fox-toolkit.org> References: <200609041332.11460.jeroen@fox-toolkit.org> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sep 4, 2006, at 1:32 PM, Jeroen van der Zijp wrote: > >> Hi, >> >> I'm using FOXRuby Tabbook to display some different frames. >> >> As part of my GUI options I have to replace sometime the frames I >> choose >> to display on the tab book. >> >> The problem is that when I'm trying to remove a frame (and it's >> FXTabItem) for some reason the garbage collector does not free its >> place >> in the memory. >> >> This, eventually, slow down my GUI. >> >> I destroy both the page and it's tab item when I remove them from the >> tab item. >> > > > FXRuby related questions should be directed at the fxruby mailing > list; > I forwarded it to Lyle, who is the resident FXRuby Guru.... In order to remove a frame (or any other child window), you should use the removeChild() method, e.g. tabBook.removeChild(tab1) tabBook.removeChild(frame1) As you've discovered, the destroy() method destroys the server-side resource but doesn't actually get rid of the client-side (Ruby) object. You need to use removeChild(). Hope this helps, Lyle -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iD8DBQFE/WqVFXV/hD6oMd0RAhFnAKCL3hWlQ9CkUmCgibie7LKLIBADHwCfWuXc e8KyHhQNrGfrH4PBEYTfUHs= =MeVV -----END PGP SIGNATURE----- From smartgpx at gmail.com Wed Sep 13 03:46:48 2006 From: smartgpx at gmail.com (DeeJay) Date: Wed, 13 Sep 2006 08:46:48 +0100 Subject: [fxruby-users] ruby-1.8.5 loads fox16.so more than once Message-ID: <533048b70609130046t291fb0d5u35474fb89c6c367d@mail.gmail.com> re: 'noise' about Constants from multiple loads of fox16.so I have no deep understanding of what is wrong, but I note that the problem also occurs with the Windows version of ruby. My ruby installations are all created with various releases of the OneClickInstaller [oci]. The problem seems to be triggered by require'ing fox. Using oci185-21 with ruby 1.8.5 (2006-08-25) [i386-mswin32] this behaviour is seen with both fox 16 AND fox12. I didn't see it with whatever recent binary of ruby1.8.4 was shipped with oci184-19, with either fox12 or fox16. To try to 'step through' the problem without a debugger - which I wouldn't understand - I renamed the ..ruby\lib\ruby\gems\1.8\gems\fxruby-1.6.1-mswin32\lib\fox16 subdirectory and created an empty one. Then by successively requireing fox16 and importing the library files reported as missing I was able to see when the redefined Constant problem was triggered. By observation, any file in ..\lib\fox16 which itself contains the line "require 'fox16'" was the trigger for the redefined Constant warnings. By commenting out these 'require' lines I have created a minimal copy of ..\lib\fox16 [containing 15 .rb files] which allows a simple FXruby application (like hello.rb) to start up silently. I make no recommendation that this is a correct or safe thing to do with the fxruby libraries, but I thought I should share what I had found, in the hope that it may lead to a supported and released solution. fwiw, this is what ri has to say about Kernel#require - " The name of the loaded feature is added to the array in $". A feature will not be loaded if it's name already appears in $". However, the file name is not converted to an absolute path, so that ``require 'a';require './a''' will load a.rb twice. " DeeJay, Leicester, UK -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060913/99d8fb75/attachment.html From lyle at knology.net Wed Sep 13 08:32:45 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 13 Sep 2006 07:32:45 -0500 Subject: [fxruby-users] ruby-1.8.5 loads fox16.so more than once In-Reply-To: <533048b70609130046t291fb0d5u35474fb89c6c367d@mail.gmail.com> References: <533048b70609130046t291fb0d5u35474fb89c6c367d@mail.gmail.com> Message-ID: <2ED6CFBB-D53B-4C7A-ADAA-71F912BDE30F@knology.net> On Sep 13, 2006, at 2:46 AM, DeeJay wrote: > fwiw, this is what ri has to say about Kernel#require - > > " The name of the loaded feature is added to the array in $". A > feature will not be loaded if it's name already appears in $". > However, the file name is not converted to an absolute path, so > that ``require 'a';require './a''' will load a.rb twice. " Right, and this is the behavior that got broken in Ruby 1.8.5. I've already posted the bug to the ruby-core list and Nobu says that he's fixed it in CVS (i.e. it should be working by Ruby 1.8.6). For any follow-up on this, please refer to: http://rubyforge.org/tracker/index.php? func=detail&aid=5633&group_id=300&atid=1223 Thanks, Lyle From lyle at knology.net Fri Sep 15 21:39:28 2006 From: lyle at knology.net (Lyle Johnson) Date: Fri, 15 Sep 2006 20:39:28 -0500 Subject: [fxruby-users] [ANN] FXRuby-1.4.7 and 1.6.2 Now Available Message-ID: <44D20EB9-43FD-48B2-84C8-CBC52D1D2D0D@knology.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 All, FXRuby versions 1.4.7 and 1.6.2 are now available for download from this page: http://rubyforge.org/frs/?group_id=300&release_id=6924 Note that you should be using FOX 1.6.5 or later due to some important changes made in that release of FOX. Also note that due to a bug in RubyGems 0.9.0, building from the source gem isn't advised unless you're able to download to an earlier version of RubyGems. (This bug doesn't affect binary gems.) And as long as you're noting those two things, you should also note that due to a bug introduced in Ruby 1.8.5, a large number of warning messages will be printed to the console when you load FXRuby (any version) into Ruby 1.8.5. This problem is described here: http://rubyforge.org/tracker/index.php? func=detail&aid=5633&group_id=300&atid=1223 Due to this problem with FXRuby under Ruby 1.8.5, the downloads page offers builds for both Ruby versions 1.8.4 and 1.8.5 on Windows. 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 1.8.4/1.8.5), 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) iD8DBQFFC1XRFXV/hD6oMd0RAj9vAKCJbdiln2DzYYIWf/o79lNKo0deawCfUDEt rQVY3hbB7Uw46f4NhMCwnRA= =bb40 -----END PGP SIGNATURE----- From weyus at att.net Tue Sep 19 16:57:01 2006 From: weyus at att.net (Wes Gamble) Date: Tue, 19 Sep 2006 15:57:01 -0500 Subject: [fxruby-users] Can't update fxruby 1.6.2 gem for Windows Message-ID: <4510599D.6070407@att.net> Windows XP RubyGems 0.9.0 When I attempt to update the gem for fxruby mswin32, I get the output below. Is there something wrong with the gem distribution? Am I doing something wrong? Thanks, Wes ============================================ C:\eclipse\workspace>gem update Updating installed gems... Need to update 1 gems from http://gems.rubyforge.org . complete Attempting remote update of fxruby Select which gem to install for your platform (i386-mswin32) 1. fxruby 1.6.2 (ruby) 2. fxruby 1.6.2 (mswin32) 3. fxruby 1.6.1 (ruby) 4. fxruby 1.6.1 (mswin32) 5. fxruby 1.6.0 (mswin32) 6. fxruby 1.6.0 (ruby) 7. fxruby 1.4.7 (mswin32) 8. fxruby 1.4.7 (ruby) 9. fxruby 1.4.6 (ruby) 10. fxruby 1.4.6 (mswin32) 11. fxruby 1.4.5 (ruby) 12. fxruby 1.4.5 (mswin32) 13. fxruby 1.4.4 (ruby) 14. fxruby 1.4.4 (mswin32) 15. fxruby 1.4.3 (mswin32) 16. fxruby 1.4.3 (ruby) 17. fxruby 1.4.2 (ruby) 18. fxruby 1.4.2 (mswin32) 19. fxruby 1.4.1 (mswin32) 20. fxruby 1.4.1 (ruby) 21. fxruby 1.4.0 (ruby) 22. fxruby 1.2.6 (mswin32) 23. fxruby 1.2.6 (ruby) 24. fxruby 1.2.5 (ruby) 25. fxruby 1.2.5 (mswin32) 26. fxruby 1.2.4 (mswin32) 27. fxruby 1.2.4 (ruby) 28. fxruby 1.2.3 (ruby) 29. fxruby 1.2.3 (mswin32) 30. fxruby 1.2.2 (ruby) 31. fxruby 1.2.2 (mswin32) 32. fxruby 1.2.1 (ruby) 33. fxruby 1.2.1 (mswin32) 34. Cancel installation > 2 ERROR: While executing gem ... (OpenURI::HTTPError) 404 Not Found C:\eclipse\workspace> From lyle at knology.net Wed Sep 20 08:11:18 2006 From: lyle at knology.net (lyle at knology.net) Date: 20 Sep 2006 12:11:18 -0000 Subject: [fxruby-users] Can't update fxruby 1.6.2 gem for Windows In-Reply-To: <> References: <> Message-ID: <20060920121118.31369.qmail@webmail1.knology.net> On Tue, 19 Sep 2006 15:57:01 -0500, Wes Gamble wrote : > Windows XP > RubyGems 0.9.0 > > When I attempt to update the gem for fxruby mswin32, I get the output below. > > Is there something wrong with the gem distribution? Am I doing > something wrong? I don't have any control over the RubyGems repository, so I don't know what's wrong there, but can you just download the appropriate gem from the downloads page and install it locally? The FXRuby downloads page is here: http://rubyforge.org/frs/?group_id=300&release_id=6924 Hope this helps, Lyle From weyus at att.net Wed Sep 20 10:59:17 2006 From: weyus at att.net (Wes Gamble) Date: Wed, 20 Sep 2006 09:59:17 -0500 Subject: [fxruby-users] Can't update fxruby 1.6.2 gem for Windows In-Reply-To: <20060920121118.31369.qmail@webmail1.knology.net> References: <> <20060920121118.31369.qmail@webmail1.knology.net> Message-ID: <45115745.1070005@att.net> I will give that a shot. Is there someone responsible for the Gem release however? lyle at knology.net wrote: >On Tue, 19 Sep 2006 15:57:01 -0500, Wes Gamble wrote : > > > >>Windows XP >>RubyGems 0.9.0 >> >>When I attempt to update the gem for fxruby mswin32, I get the output below. >> >>Is there something wrong with the gem distribution? Am I doing >>something wrong? >> >> > >I don't have any control over the RubyGems repository, so I don't know what's wrong there, but >can you just download the appropriate gem from the downloads page and install it locally? > >The FXRuby downloads page is here: > > http://rubyforge.org/frs/?group_id=300&release_id=6924 > >Hope this helps, > >Lyle >_______________________________________________ >fxruby-users mailing list >fxruby-users at rubyforge.org >http://rubyforge.org/mailman/listinfo/fxruby-users > > > From lyle at knology.net Wed Sep 20 14:19:24 2006 From: lyle at knology.net (lyle at knology.net) Date: 20 Sep 2006 18:19:24 -0000 Subject: [fxruby-users] Can't update fxruby 1.6.2 gem for Windows In-Reply-To: <> References: <> Message-ID: <20060920181924.16499.qmail@webmail3.knology.net> On Wed, 20 Sep 2006 09:59:17 -0500, Wes Gamble wrote : > I will give that a shot. Is there someone responsible for the Gem > release however? I'm not exactly sure what you're asking. I'm the person who built the gems, and I uploaded them to the FXRuby project page at RubyForge. The bit that I don't have control over is whatever process it is on RubyForge that takes the gems that I uploaded to the FXRuby project page and makes them available to you when you type "gem install fxruby". I think someone like Tom Copeland (at RubyForge) would be the person to check with on that. I suspect that the problem has to do with the fact that there are two different 1.6.2 gems for Windows: one built for Ruby 1.8.4 and one built for Ruby 1.8.5. But I don't know what (if anything) I need to do to fix that. From lyle.johnson at gmail.com Thu Sep 21 10:56:54 2006 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Thu, 21 Sep 2006 09:56:54 -0500 Subject: [fxruby-users] [Rubygems-developers] Can't install fxruby via rubygems 0.9.0 on Windows XP In-Reply-To: <1158847890.3379.30.camel@bugs.hal> References: <450F04F4.3000407@att.net> <3665a1a00609182105i3c2b1ad3ra99f41b21390a34@mail.gmail.com> <31d15f490609210705t158efad4t88b93695e6d2496b@mail.gmail.com> <1158847890.3379.30.camel@bugs.hal> Message-ID: On 9/21/06, Tom Copeland wrote: > Hm, both those win32 gems seem to be on all the mirrors: Yeah, the files are there. Is it a naming convention thing? What I mean is, is the fact that the gems are named: fxruby-1.4.7-ruby1.8.4-mswin32.gem fxruby-1.4.7-ruby1.8.5-mswin32.gem and: fxruby-1.6.2-ruby1.8.4-mswin32.gem fxruby-1.6.2-ruby1.8.5-mswin32.gem Causing the gem server code some grief? From lyle.johnson at gmail.com Fri Sep 22 09:24:51 2006 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 22 Sep 2006 08:24:51 -0500 Subject: [fxruby-users] [Rubygems-developers] Can't install fxruby via rubygems 0.9.0 on Windows XP In-Reply-To: <1158892276.3379.60.camel@bugs.hal> References: <450F04F4.3000407@att.net> <3665a1a00609182105i3c2b1ad3ra99f41b21390a34@mail.gmail.com> <31d15f490609210705t158efad4t88b93695e6d2496b@mail.gmail.com> <1158847890.3379.30.camel@bugs.hal> <1158892276.3379.60.camel@bugs.hal> Message-ID: On 9/21/06, Tom Copeland wrote: > Hm, maybe... I guess it depends on where the gem HTTP client expects to > find those dashes. Ah ha... now that I check the logs, here's what's > being requested: > > GET /gems/fxruby-1.6.2-mswin32.gem > > That's why those 404 errors are popping up... OK, so it is a naming convention thing. The Gem server apparently inspected the Gem spec for that gem (in order to identify its version number and platform) but didn't bother to remember its correct file name. Oh well. Although I am of the opinion that this is a RubyGems problem, I'll go ahead and rename one of the gems in this style and see if that fixes the problem. From lyle.johnson at gmail.com Fri Sep 22 09:37:46 2006 From: lyle.johnson at gmail.com (Lyle Johnson) Date: Fri, 22 Sep 2006 08:37:46 -0500 Subject: [fxruby-users] [Rubygems-developers] Can't install fxruby via rubygems 0.9.0 on Windows XP In-Reply-To: <4513265B.8030304@att.net> References: <450F04F4.3000407@att.net> <3665a1a00609182105i3c2b1ad3ra99f41b21390a34@mail.gmail.com> <31d15f490609210705t158efad4t88b93695e6d2496b@mail.gmail.com> <1158847890.3379.30.camel@bugs.hal> <4513265B.8030304@att.net> Message-ID: On 9/21/06, Wes Gamble wrote: > I uninstalled fxruby using "gem uninstall" and attempted to reinstall > using "gem install" and I still get the 404 error. > > 1) Is there a way for me to update the list of mirrors - I assume that > that is all handled server-side so probably not. > > 2) Is there some debug mode that I can run gem install in, so that I can > see which server and/or file is being looked for? Per Tom Copeland, the problem wasn't that the file wasn't there; the problem was that the RubyGems server code was looking for it under a different file name. I will be filing a bug report about that, but in the meantime I've renamed one of the Gem files so that the Gem server will be able to serve it up. The file "fxruby-1.6.2-mswin32.gem" should now be served-up properly when you type: gem [install | update] fxruby Note that this gem was built against Ruby 1.8.5, which has at least one bug that impacts FXRuby. If you need a gem for FXRuby-1.6.2 that was built against Ruby 1.8.4, you'll have to download the Gem file directly from the FXRuby project page and install it locally. Hope this helps, Lyle From AEtzold at gmx.de Fri Sep 22 15:15:52 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Fri, 22 Sep 2006 21:15:52 +0200 Subject: [fxruby-users] A problem about updating an FXRuby program layout recursively In-Reply-To: References: <450F04F4.3000407@att.net> <3665a1a00609182105i3c2b1ad3ra99f41b21390a34@mail.gmail.com> <31d15f490609210705t158efad4t88b93695e6d2496b@mail.gmail.com> <1158847890.3379.30.camel@bugs.hal> <4513265B.8030304@att.net> Message-ID: <20060922191552.104860@gmx.net> Dear all, I have a design question: assume we have an FXText field containing a sentence The Ruby version is the current one. with "best" highlighted, and there is a choice of words | most wonderful |, | cutest |, | most effective | to replace "best". To do the replacement, I want to just click on any of three buttons. I want to iterate through all of the words of the sentence and I only know the choice of words for replacement at runtime. Now, if I click on the | most wonderful | - button, I want to have a sentence The most wonderful version of is the current one. i.e., "best" gets changed to "most wonderful", the next word Ruby gets highlighted, and there should be a choice of buttons of words replacing "Ruby", like | the computing language invented by Matz |, which should be shown instead of | most wonderful |, | cutest |, | most effective |. I have written a method with a lot of evals in it, which calls itself, when the user clicks on a button, and updates its arguments (move to the next word etc.) to do the trick of updating the buttons, but I can only show the first set of buttons and replace the first word - the new buttons for the next set of replacement words don't appear. I rather randomly tried to call "app.update, app.recalc" etc., but none worked. What am I missing ? Thank you very much Best regards Axel -- NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet! Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl From AEtzold at gmx.de Fri Sep 22 16:17:40 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Fri, 22 Sep 2006 22:17:40 +0200 Subject: [fxruby-users] A problem about updating an FXRuby program layout recursively Message-ID: <20060922201740.160050@gmx.net> Dear all, I have a design question: assume we have an FXText field containing a sentence The Ruby version is the current one. with "best" highlighted, and there is a choice of words | most wonderful |, | cutest |, | most effective | to replace "best". To do the replacement, I want to just click on any of three buttons. I want to iterate through all of the words of the sentence and I only know the choice of words for replacement at runtime. Now, if I click on the | most wonderful | - button, I want to have a sentence The most wonderful version of is the current one. i.e., "best" gets changed to "most wonderful", the next word Ruby gets highlighted, and there should be a choice of buttons of words replacing "Ruby", like | the computing language invented by Matz |, which should be shown instead of | most wonderful |, | cutest |, | most effective |. I have written a method with a lot of evals in it, which calls itself, when the user clicks on a button, and updates its arguments (move to the next word etc.) to do the trick of updating the buttons, but I can only show the first set of buttons and replace the first word - the new buttons for the next set of replacement words don't appear. I rather randomly tried to call "app.update, app.recalc" etc., but none worked. What am I missing ? Thank you very much Best regards Axel -- NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet! Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl From lyle at knology.net Fri Sep 22 21:36:57 2006 From: lyle at knology.net (Lyle Johnson) Date: Fri, 22 Sep 2006 20:36:57 -0500 Subject: [fxruby-users] A problem about updating an FXRuby program layout recursively In-Reply-To: <20060922201740.160050@gmx.net> References: <20060922201740.160050@gmx.net> Message-ID: On Sep 22, 2006, at 3:17 PM, Axel Etzold wrote: > I have written a method with a lot of evals in it, which calls > itself, when the user > clicks on a button, and updates its arguments (move to the next > word etc.) > to do the trick of updating the buttons, but I can only show the > first set of buttons and replace the first word - the new buttons > for the next set of replacement words don't appear. > I rather randomly tried to call "app.update, app.recalc" etc., but > none worked. > > What am I missing ? Are you actually constructing a new FXButton each time? If so, you need to call create() on the button to realize it, e.g. new_button = FXButton.new(p, "Button Label", ...) new_buttton.create Note that a preferable approach (if I understand what you're doing) is to just re-use the existing buttons, and change their label text, e.g. old_button.text = "New Label for an Old Button" Hope this helps, Lyle From philippe.lang at attiksystem.ch Sun Sep 24 15:18:23 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Sun, 24 Sep 2006 21:18:23 +0200 Subject: [fxruby-users] FXComboTableItem - where is my combo? Message-ID: <6C0CF58A187DA5479245E0830AF84F421D128D@poweredge.attiksystem.ch> Hi, I'm trying to use an FXComboTableItem to edit the content of an FXTable cells. The code I use is the following: #--------------------------- # FXTable initialization #--------------------------- @table = FXTable.new(@tabbook, nil, 0, TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,0,0,0,0, 2,2,2,2) @table.visibleRows = 20 @table.visibleColumns = 8 @table.setTableSize(10, 4) # Initialize the scrollable part of the table (0..9).each do |r| (0..3).each do |c| @table.setItemText(r, c, "r:#{r} c:#{c}") end end # Initialize column headers (0...4).each { |c| @table.setColumnText(c, Date::MONTHNAMES[c+1]) } # Initialize row headers (0...10).each { |r| @table.setRowText(r, "Row#{r}") } #--------------------------- # FXTable events #--------------------------- @table.connect(SEL_DOUBLECLICKED) do |sender, selector, data| @table.setItem(data.row, data.col, FXComboTableItem.new(['a', 'b', 'c'])) end As soon as I double-click on a cell, it receives the "a" value, but no Combobox appears... Sure that I'm doing something wrong. Does anyone have an example maybe? Thanks ---------------- Philippe Lang -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060924/c7547fcc/attachment.bin From philippe.lang at attiksystem.ch Mon Sep 25 13:54:34 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 25 Sep 2006 19:54:34 +0200 Subject: [fxruby-users] FXTable.setItemIcon bug? Message-ID: <6C0CF58A187DA5479245E0830AF84F421D12A0@poweredge.attiksystem.ch> Hi, There seems to be a problem with FXTable.setItemIcon, if no other icon has been set before: @table.connect(SEL_CLICKED) do |sender, selector, data| @table.setItemIcon(data.row, data.col, tick) end .. Does a SEGFAULT when I click. But: @table.setItemIcon(2, 2, tick) @table.connect(SEL_CLICKED) do |sender, selector, data| @table.setItemIcon(data.row, data.col, tick) end ... Does not, wherever I click. One more thing: @table.setItemIcon(2, 2, tick) @table.setItemIcon(2, 2, nil) @table.connect(SEL_CLICKED) do |sender, selector, data| @table.setItemIcon(data.row, data.col, tick) end ... SEGFAULTs too. I'm not sure if that's an FXRuby or FOX effect... Cheers, Note: I'm using FXRuby 1.6.2 for Ruby 1.8.4 .exe under Windows XP. --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060925/51939ddd/attachment.bin From philippe.lang at attiksystem.ch Mon Sep 25 16:43:13 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Mon, 25 Sep 2006 22:43:13 +0200 Subject: [fxruby-users] FXTable initialization bug? Message-ID: <6C0CF58A187DA5479245E0830AF84F421D12A2@poweredge.attiksystem.ch> Hi, Firstly, sorry for flooding this forum with bug reports: FXRuby works just fine except a few minor glitches... Here is another one: when clicking outside an FXTable visible cells (either on the right or at the bottom), when no cell have ever been selected, the app SEGFAULTs. Preselecting a cell corrects the problem. Demo code here: -------------------------------- #!/usr/bin/ruby require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 600, 350) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) FXMenuTitle.new(menubar, "&File", nil, filemenu) # Tabbook @tabbook = FXTabBook.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT) @tab = FXTabItem.new(@tabbook, "FXTable", nil) # FXTable @table = FXTable.new(@tabbook, nil, 0, TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 2, 2, 2, 2) @table.visibleRows = 10 @table.visibleColumns = 4 @table.setTableSize(10, 4) # Initialize columns @table.setColumnText(0, "A") @table.setColumnText(1, "B") @table.setColumnText(2, "C") @table.setColumnText(3, "D") # Initialize rows (0...10).each { |r| @table.setRowText(r, "Row #{r}") } # FXRuby bug workaround: one cell must be selected, otherwise app crashes # when a click is done outside the table #@table.setCurrentItem(0, 0) end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run End -------------------------------- FXRuby 1.6.2 for Ryby 1.8.4, Windows XP --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060925/1015799b/attachment-0001.bin From lyle at knology.net Mon Sep 25 20:52:08 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 25 Sep 2006 19:52:08 -0500 Subject: [fxruby-users] FXComboTableItem - where is my combo? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F421D128D@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F421D128D@poweredge.attiksystem.ch> Message-ID: <41112344-0EFD-4CE6-A613-7592B9D1E253@knology.net> On Sep 24, 2006, at 2:18 PM, Philippe Lang wrote: > I'm trying to use an FXComboTableItem to edit the content of an > FXTable cells... > As soon as I double-click on a cell, it receives the "a" value, but > no Combobox appears... > > Sure that I'm doing something wrong. Does anyone have an example > maybe? First things first, there's a bug in the FXComboTableItem which I've just recorded. So that will be fixed in the next release. But in general, the way editable table cells in FOX work are that you press the F2 key to invoke the editor. There may be another way to do it. In your code, you're merely setting which kind of editor will be used in a cell, but you're not actually switching that cell into "edit" mode. From lyle at knology.net Mon Sep 25 20:54:06 2006 From: lyle at knology.net (Lyle Johnson) Date: Mon, 25 Sep 2006 19:54:06 -0500 Subject: [fxruby-users] FXTable initialization bug? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F421D12A2@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F421D12A2@poweredge.attiksystem.ch> Message-ID: <86E534FE-9446-4D02-98B8-B4385A0D841E@knology.net> On Sep 25, 2006, at 3:43 PM, Philippe Lang wrote: > Here is another one: when clicking outside an FXTable visible cells > (either on the right or at the bottom), when no cell have ever been > selected, the app SEGFAULTs. Preselecting a cell corrects the problem. OK. I know this problem has been reported in the past, but I don't see it in the bug list, so I've just added a bug report on your behalf. From AEtzold at gmx.de Wed Sep 27 05:33:21 2006 From: AEtzold at gmx.de (Axel Etzold) Date: Wed, 27 Sep 2006 11:33:21 +0200 Subject: [fxruby-users] Change default background, maybe to a wallpaper design ? Message-ID: <20060927093321.220310@gmx.net> Dear all, I would like to change the greyish background of the FXRuby GUI. Now, I have two questions with respect to this: I know that I can change the color of individual buttons, toolbars etc., but I'd like to know whether one can change this greyish default. using something like app.backColor = STD_BACK_COLOR didn't do what I want... Now I recall that using RMagick, you generate something like a wallpaper tapestry (e.g., repeat a logo several times on a canvas) using commands like logo = Magick::ImageList.new('logo:') img = Magick::ImageList.new img.new_image(200, 100, Magick::TextureFill.new(logo)) as mustapha describes in his nice introductory tutorial on Rmagick in http://www.mustap.com/rubyzone_post_185_manipulating-images-with-rma . Is it possible to create such a background with RMagick and use it to replace all that's grey in FXRuby GUIs ? Thank you very much, Best regards, Axel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer From lyle at knology.net Wed Sep 27 08:53:19 2006 From: lyle at knology.net (Lyle Johnson) Date: Wed, 27 Sep 2006 07:53:19 -0500 Subject: [fxruby-users] Change default background, maybe to a wallpaper design ? In-Reply-To: <20060927093321.220310@gmx.net> References: <20060927093321.220310@gmx.net> Message-ID: <3BE60F72-10E9-4028-AACE-B8744FDDF384@knology.net> On Sep 27, 2006, at 4:33 AM, Axel Etzold wrote: > I would like to change the greyish background of the FXRuby GUI. > Now, I have two questions with respect to this: > I know that I can change the color of individual buttons, toolbars > etc., but I'd like to know whether one can change this greyish > default. > using something like > > app.backColor = STD_BACK_COLOR > > didn't do what I want... Try experimenting with the application's base color attribute, e.g. app.baseColor = FXColor::PapayaWhip Note that in order for this setting to apply to the entire application, you need to make this setting when the application object is first instantiated, and before you've created any other widgets, e.g. app = FXApp.new app.baseColor = FXColor::DeepSkyBlue1 main = FXMainWindow.new(app, ...) > Is it possible to create such a background with RMagick and use it to > replace all that's grey in FXRuby GUIs ? Not that I know of... You might ask around on the FOX GUI list about this. I know that it's been asked there before. From meinrad.recheis at gmail.com Wed Sep 27 16:09:20 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Wed, 27 Sep 2006 22:09:20 +0200 Subject: [fxruby-users] Change default background, maybe to a wallpaper design ? In-Reply-To: <3BE60F72-10E9-4028-AACE-B8744FDDF384@knology.net> References: <20060927093321.220310@gmx.net> <3BE60F72-10E9-4028-AACE-B8744FDDF384@knology.net> Message-ID: <43d756720609271309vc0ccaaboe3c20dd44d3243e4@mail.gmail.com> its possible to set the widget colors (backColor/baseColor/hiliteColor/shadowColor/frameColor/textColor ...) to better looking colors. i have done this for example in foxGUIb. but it requires special tweaks for every kind of widget. sometimes it requires even defining tricky singleton methods to achieve good looking color schemes, but it is possible. background images (skinning) is impossible for standard widgets in fox. you could do it with FXCanvas but that would require to rewrite all the standard widgets in ruby as derivatives of FXCanvas. i wouldn't try that ;) consider switching to jruby and swing. jruby is getting pretty mature and swing is a toolkit that is well designed (compared to fox) and fully supports skinning. -- henon On 9/27/06, Lyle Johnson wrote: > > On Sep 27, 2006, at 4:33 AM, Axel Etzold wrote: > > > I would like to change the greyish background of the FXRuby GUI. > > Now, I have two questions with respect to this: > > I know that I can change the color of individual buttons, toolbars > > etc., but I'd like to know whether one can change this greyish > > default. > > using something like > > > > app.backColor = STD_BACK_COLOR > > > > didn't do what I want... > > Try experimenting with the application's base color attribute, e.g. > > app.baseColor = FXColor::PapayaWhip > > Note that in order for this setting to apply to the entire > application, you need to make this setting when the application > object is first instantiated, and before you've created any other > widgets, e.g. > > app = FXApp.new > app.baseColor = FXColor::DeepSkyBlue1 > main = FXMainWindow.new(app, ...) > > > Is it possible to create such a background with RMagick and use it to > > replace all that's grey in FXRuby GUIs ? > > Not that I know of... You might ask around on the FOX GUI list about > this. I know that it's been asked there before. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > From philippe.lang at attiksystem.ch Thu Sep 28 03:10:05 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Thu, 28 Sep 2006 09:10:05 +0200 Subject: [fxruby-users] FXRuby and Unicode Message-ID: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> Hi, There have been posts in the fox mailing-list recently, regarding a problem with european characters with accents, like "?", "?", "?", "?"... They all appear as squares on the screen. The answer of Jeroen is: > When you compile FOX, make sure -DUNICODE is passed; > without it, FOX will try to access the system with 8-bit > characters; this works for ASCII but not for larger code sets. Is it possible to compile next version of FXRuby with this option? I guess it is not for the moment, since I have exactly the same problem. Cheers! --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/5f2504e7/attachment.bin From a.reith at gmail.com Thu Sep 28 04:53:38 2006 From: a.reith at gmail.com (A.R.) Date: Thu, 28 Sep 2006 19:53:38 +1100 Subject: [fxruby-users] SEL_CLOSE - win32 event Message-ID: Hello FXRuby users ! I have few questions about FX event (i'm on winxp / ruby 1.8.4 (revert from 1.8.5) / fxruby 1.6.2) : 1. why SEL_CLOSE doesn't work on this example ?? It seems that SEL_CLOSE never be called ?? require 'fox16' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "test close", nil, nil, DECOR_ALL, 0, 0, 200, 200) self.connect(SEL_CLOSE, method(:onClose)) end def onClose(sender, sel, event) response = FXMessageBox.question(self, MBOX_YES_NO, "Close Window", "Are you sure?") return (response == MBOX_CLICKED_YES ? 0 : 1) end def create super show(PLACEMENT_SCREEN) end end application = FXApp.new("test") test = MyWindow.new(application) application.create test.show(PLACEMENT_SCREEN) application.run ----------------- 2. (i have posted this question on comp.lang.ruby with no responses at this time) : I'm trying to build a small 'auto-copy' app with FXRuby (on windows). I need to intercept WM_CHANGECBCHAIN message (in conjonction with win32 function call SetClipboardViewer and ChangeClipboardChain), but it seems that the only way for handling non integrated win32 event with Fox is to overload the FXApp::dispatchEvent C function ... Any idea for doing that only with Ruby and FXruby ? From lyle at knology.net Thu Sep 28 09:07:50 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 28 Sep 2006 08:07:50 -0500 Subject: [fxruby-users] SEL_CLOSE - win32 event In-Reply-To: References: Message-ID: <4738BB92-4437-4DF3-94AF-0070C21CE21F@knology.net> On Sep 28, 2006, at 3:53 AM, A.R. wrote: > 1. why SEL_CLOSE doesn't work on this example ?? It seems that > SEL_CLOSE never be called ?? This is due to a bug in FOX; see: http://rubyforge.org/tracker/index.php? func=detail&aid=5498&group_id=300&atid=1223 I'm still waiting for this bug to be fixed. > 2. (i have posted this question on comp.lang.ruby with no responses at > this time) : I'm trying to build a small 'auto-copy' app with FXRuby > (on windows). I > need to intercept WM_CHANGECBCHAIN message (in conjonction with win32 > function call SetClipboardViewer and ChangeClipboardChain), but it > seems that the only way for handling non integrated win32 event with > Fox is to overload the FXApp::dispatchEvent C function ... > > Any idea for doing that only with Ruby and FXruby ? No, sorry. That's getting into way too much Win32 platform-dependent stuff. Your best bet is to try to get Jeroen to provide first class support for that in FOX. From lyle at knology.net Thu Sep 28 09:09:18 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 28 Sep 2006 08:09:18 -0500 Subject: [fxruby-users] FXRuby and Unicode In-Reply-To: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> References: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> Message-ID: <3E723A83-9B89-43D9-930B-412FE4848282@knology.net> On Sep 28, 2006, at 2:10 AM, Philippe Lang wrote: > Hi, > > There have been posts in the fox mailing-list recently, regarding a > problem with european characters with accents, like "?", "?", "?", > "?"... They all appear as squares on the screen. > > The answer of Jeroen is: > >> When you compile FOX, make sure -DUNICODE is passed; >> without it, FOX will try to access the system with 8-bit >> characters; this works for ASCII but not for larger code sets. > > Is it possible to compile next version of FXRuby with this option? > I guess it is not for the moment, since I have exactly the same > problem.]\ Philippe, I will look into this. I was unaware of this problem. From meinrad.recheis at gmail.com Thu Sep 28 03:32:46 2006 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 28 Sep 2006 09:32:46 +0200 Subject: [fxruby-users] Change default background, maybe to a wallpaper design ? In-Reply-To: <43d756720609271309vc0ccaaboe3c20dd44d3243e4@mail.gmail.com> References: <20060927093321.220310@gmx.net> <3BE60F72-10E9-4028-AACE-B8744FDDF384@knology.net> <43d756720609271309vc0ccaaboe3c20dd44d3243e4@mail.gmail.com> Message-ID: <43d756720609280032lc0f5f38j80a4f034749548d5@mail.gmail.com> On 9/27/06, Meinrad Recheis wrote: > its possible to set the widget colors > (backColor/baseColor/hiliteColor/shadowColor/frameColor/textColor ...) > to better looking colors. i have done this for example in foxGUIb. but > it requires special tweaks for every kind of widget. sometimes it > requires even defining tricky singleton methods to achieve good > looking color schemes, but it is possible. > ... here is a screenshot of a userinterface I did at my work with FXRuby. i am going to add the style-library I built to foxGUIb if some people are interested. yours, -- henon -------------- next part -------------- A non-text attachment was scrubbed... Name: designer_GUI_design1.png Type: image/png Size: 44734 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/2a98f944/attachment-0001.png From jeroen at fox-toolkit.org Thu Sep 28 10:53:27 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 28 Sep 2006 09:53:27 -0500 Subject: [fxruby-users] SEL_CLOSE - win32 event In-Reply-To: <4738BB92-4437-4DF3-94AF-0070C21CE21F@knology.net> References: <4738BB92-4437-4DF3-94AF-0070C21CE21F@knology.net> Message-ID: <200609280953.27695.jeroen@fox-toolkit.org> On Thursday 28 September 2006 08:07, Lyle Johnson wrote: > > On Sep 28, 2006, at 3:53 AM, A.R. wrote: > > > 1. why SEL_CLOSE doesn't work on this example ?? It seems that > > SEL_CLOSE never be called ?? > > This is due to a bug in FOX; see: > > http://rubyforge.org/tracker/index.php? > func=detail&aid=5498&group_id=300&atid=1223 > > I'm still waiting for this bug to be fixed. > > > 2. (i have posted this question on comp.lang.ruby with no responses at > > this time) : I'm trying to build a small 'auto-copy' app with FXRuby > > (on windows). I > > need to intercept WM_CHANGECBCHAIN message (in conjonction with win32 > > function call SetClipboardViewer and ChangeClipboardChain), but it > > seems that the only way for handling non integrated win32 event with > > Fox is to overload the FXApp::dispatchEvent C function ... > > > > Any idea for doing that only with Ruby and FXruby ? > > No, sorry. That's getting into way too much Win32 platform-dependent > stuff. Your best bet is to try to get Jeroen to provide first class > support for that in FOX. When you asked to remove the test on "message" not being zero, I removed them all [or so I thought]. However, in the case of close() I have overlooked the test. It has been fixed internally, and I will make a new release of 1.6. asap. Thanks for the info, - Jeroen From jeroen at fox-toolkit.org Thu Sep 28 10:55:47 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Thu, 28 Sep 2006 09:55:47 -0500 Subject: [fxruby-users] FXRuby and Unicode In-Reply-To: <3E723A83-9B89-43D9-930B-412FE4848282@knology.net> References: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> <3E723A83-9B89-43D9-930B-412FE4848282@knology.net> Message-ID: <200609280955.48030.jeroen@fox-toolkit.org> On Thursday 28 September 2006 08:09, Lyle Johnson wrote: > > On Sep 28, 2006, at 2:10 AM, Philippe Lang wrote: > > > Hi, > > > > There have been posts in the fox mailing-list recently, regarding a > > problem with european characters with accents, like "?", "?", "?", > > "?"... They all appear as squares on the screen. > > > > The answer of Jeroen is: > > > >> When you compile FOX, make sure -DUNICODE is passed; > >> without it, FOX will try to access the system with 8-bit > >> characters; this works for ASCII but not for larger code sets. > > > > Is it possible to compile next version of FXRuby with this option? > > I guess it is not for the moment, since I have exactly the same > > problem.]\ > > Philippe, I will look into this. I was unaware of this problem. I'm not 100% sure if the FXRuby glue needs to be compiled with this; but certainly, FOX itself should be. The "outward face" FOX presents is UTF8, so as long as your app accesses the system via FOX, the FOX library will convert UTF8 to UTF16 behind the scenes. - Jeroen From philippe.lang at attiksystem.ch Thu Sep 28 15:57:09 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Thu, 28 Sep 2006 21:57:09 +0200 Subject: [fxruby-users] FXRuby and Unicode Message-ID: <6C0CF58A187DA5479245E0830AF84F421D12D8@poweredge.attiksystem.ch> fxruby-users-bounces at rubyforge.org wrote: >>> Is it possible to compile next version of FXRuby with this option? >>> I guess it is not for the moment, since I have exactly the same >>> problem.]\ >> >> Philippe, I will look into this. I was unaware of this problem. > > I'm not 100% sure if the FXRuby glue needs to be compiled > with this; but certainly, FOX itself should be. > > The "outward face" FOX presents is UTF8, so as long as your > app accesses the system via FOX, the FOX library will convert > UTF8 to UTF16 behind the scenes. Hi, Here is a copy of the FXCalendar widget, on the month of - august in French - Ao?t 2006. This is also true for strings set from a program... --------------- Philippe Lang Attik System -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/0973ec02/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 18200 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/0973ec02/attachment-0001.jpe -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060928/0973ec02/attachment-0001.bin From lyle at knology.net Thu Sep 28 11:00:30 2006 From: lyle at knology.net (Lyle Johnson) Date: Thu, 28 Sep 2006 10:00:30 -0500 Subject: [fxruby-users] FXRuby and Unicode In-Reply-To: <200609280955.48030.jeroen@fox-toolkit.org> References: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> <3E723A83-9B89-43D9-930B-412FE4848282@knology.net> <200609280955.48030.jeroen@fox-toolkit.org> Message-ID: On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote: > I'm not 100% sure if the FXRuby glue needs to be compiled with this; > but certainly, FOX itself should be. Right. And unless the Visual C++ project file that comes with the FOX source distribution already has this flag set, I'm not compiling FOX that way (i.e. for the binary distribution of FXRuby for Windows). Anyways, I just need to check into this one and see what's what. I've added it to my bug list until it's resolved. > The "outward face" FOX presents is UTF8, so as long as your app > accesses > the system via FOX, the FOX library will convert UTF8 to UTF16 > behind the scenes. OK. From a.reith at gmail.com Thu Sep 28 20:06:13 2006 From: a.reith at gmail.com (A.R.) Date: Fri, 29 Sep 2006 11:06:13 +1100 Subject: [fxruby-users] SEL_CLOSE - win32 event In-Reply-To: <200609280953.27695.jeroen@fox-toolkit.org> References: <4738BB92-4437-4DF3-94AF-0070C21CE21F@knology.net> <200609280953.27695.jeroen@fox-toolkit.org> Message-ID: > > This is due to a bug in FOX; see: > > Ok thanks for this explication :) > > > Any idea for doing that only with Ruby and FXruby ? > > > > No, sorry. That's getting into way too much Win32 platform-dependent > > stuff. Your best bet is to try to get Jeroen to provide first class > > support for that in FOX. I understand (and agree) this. In fact, i'm asked more how to attach some external event (generated by win or by the application ...). i'll take a look at FXMAPFUNC and try to pick some external win32 manager event (but i didn't find this for the moment in ruby). Thanks. From a.reith at gmail.com Thu Sep 28 23:25:50 2006 From: a.reith at gmail.com (A.R.) Date: Fri, 29 Sep 2006 14:25:50 +1100 Subject: [fxruby-users] Dirty (but working) solution for handle win32 message with Fox and Swin Message-ID: After few searchs, i've find some solution to my problem. I'll work on it next week for understand the loop procedure under both fox and swin. So this is the code for an FXRuby auto-copy application (keep on top-most windows) with handling win32 event with Swin library (there no much documentation about it :( ) If you have over ideas for doing same thing less dirty, drop me a line ! require 'fox16' include Fox require 'Win32API' require 'swin' HWND_TOPMOST = -1 HWND_NOTOPMOST = -2 SWP_NOSIZE = 1 SWP_NOMOVE = 2 SWP_SHOWWINDOW = 64 CF_TEXT = 1 WM_DESTROY = 0x00000002 WM_QUIT = 0x00000018 WM_CHANGECBCHAIN = 781 WM_DRAWCLIPBOARD = 776 class ClipW < FXMainWindow attr_accessor :txt def initialize(app) super(app,"test clip",nil,nil,DECOR_ALL|LAYOUT_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y,10,30,200,200) @txt = FXText.new(self,nil,0,LAYOUT_FILL_X|LAYOUT_FILL_Y) end def create super show(PLACEMENT_SCREEN) end def setOnTop setWindowPos = Win32API.new('user32', 'SetWindowPos', ["P", "P","I", "I", "I", "I", "I"], "I") setWindowPos.call(xid, HWND_TOPMOST, 0, 0, 0, 0,SWP_NOSIZE|SWP_NOMOVE) end end #win32 API Bee = Win32API.new('kernel32', 'Beep', 'II', 'I') SetClipboardViewer = Win32API.new('user32','SetClipboardViewer','L','L') ChangeClipboardChain = Win32API.new('user32','ChangeClipboardChain','LL','I') SendMessage = Win32API.new("user32", "SendMessage", ['L'] * 4, 'L') #Fox application = FXApp.new("Clip","copie") Clip = ClipW.new(application) application.create #SWin S = SWin::LWFactory.new(SWin::Application.hInstance) mw = S.newwindow(nil) mw.create @@hwndNextViewer = SetClipboardViewer.call(mw.hWnd) mw.addEvent WM_DRAWCLIPBOARD mw.addEvent WM_CHANGECBCHAIN mw.addEvent WM_DESTROY def mw.msghandler(msg) #msg has attrs of hWnd,msg,wParam,lParam Bee.call(3000,50) #add this for debugging facility :) case msg.msg when WM_CHANGECBCHAIN @@hwndNextViewer = msg.lParam if msg.wParam == @@hwndNextViewer SendMessage.call(@@hwndNextViewer, msg.msg, msg.wParam, msg.lParam) when WM_DESTROY ChangeClipboardChain.call(msg.hWnd,@@hwndNextViewer) when WM_DRAWCLIPBOARD Bee.call(4000,50) SendMessage.call(@@hwndNextViewer, msg.msg, msg.wParam, msg.lParam) if @@hwndNextViewer!=0 Clip.txt.text = Clip.getDNDData(FROM_CLIPBOARD, FXWindow.stringType) end end Clip.show(PLACEMENT_SCREEN) Clip.setOnTop #mw.show application.run SWin::Application.messageloop From philippe.lang at attiksystem.ch Fri Sep 29 02:52:53 2006 From: philippe.lang at attiksystem.ch (Philippe Lang) Date: Fri, 29 Sep 2006 08:52:53 +0200 Subject: [fxruby-users] Contextual menu in FXTreeList Message-ID: <6C0CF58A187DA5479245E0830AF84F421D12DB@poweredge.attiksystem.ch> Hi, I've got code that manages a contextual menu in an FXTreeList: tree.connect(SEL_RIGHTBUTTONPRESS) do |sender, selector, data| index = tree.getItemAt(data.win_x, data.win_y) if index != nil tree.killSelection tree.selectItem(index) filemenu = FXMenuPane.new(self) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) filemenu.create() filemenu.popup(nil, data.root_x, data.root_y) filemenu.grabKeyboard getApp().runModalWhileShown(filemenu) end end It works just fine, except for one thing: when you right-clic on an item, and the menu appears, you cannot simply right-clic on another item, and expect a menu to appear again. You have to clic twice; the first clic disables the first menu, and the second shows the second menu. Is there a way to change that? I've tried disabling "runModalWhileShown", but it does not help. Thanks! --------------- Philippe Lang Attik System -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3125 bytes Desc: not available Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20060929/6e73e9e7/attachment.bin From jeroen at fox-toolkit.org Fri Sep 29 16:01:50 2006 From: jeroen at fox-toolkit.org (Jeroen van der Zijp) Date: Fri, 29 Sep 2006 15:01:50 -0500 Subject: [fxruby-users] FXRuby and Unicode In-Reply-To: References: <6C0CF58A187DA5479245E0830AF84F421D12D3@poweredge.attiksystem.ch> <200609280955.48030.jeroen@fox-toolkit.org> Message-ID: <200609291501.50470.jeroen@fox-toolkit.org> On Thursday 28 September 2006 10:00, Lyle Johnson wrote: > > On Sep 28, 2006, at 9:55 AM, Jeroen van der Zijp wrote: > > > I'm not 100% sure if the FXRuby glue needs to be compiled with this; > > but certainly, FOX itself should be. > > Right. And unless the Visual C++ project file that comes with the FOX > source distribution already has this flag set, I'm not compiling FOX > that way (i.e. for the binary distribution of FXRuby for Windows). > Anyways, I just need to check into this one and see what's what. I've > added it to my bug list until it's resolved. BTW, I did release the FOX 1.6.15 the other day, with the suggested patches for FXTopWindow and FXMDIChild. - Jeroen