From timmy2000 at t-n-p.org Fri Jun 1 12:55:20 2007 From: timmy2000 at t-n-p.org (timmy2000 at t-n-p.org) Date: Fri, 1 Jun 2007 17:55:20 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <465B3AF6.4000103@pressure.to> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> Message-ID: <20070601165520.GA49469@larissa.t-n-p.org> Hi Alex, Alex Fenton wrote: > I just tried the following on Win XP and it seems to work as expected > > splitter = Wx::SplitterWindow.new(self, -1) > window1 = Wx::Window.new(splitter, -1) > window1.set_background_colour(Wx::RED) > window2 = Wx::Window.new(splitter, -1) > window2.set_background_colour(Wx::GREEN) > splitter.split_vertically(window1, window2, 50) > > Perhaps you could show us some code if it's still not working for you? Here's what I have: class TreeFrame < MDIChildFrame def initialize(parent) @splitter = MySplitterWindow.new(self) @left = MyPanel.new(@splitter) @right = MyPanel.new(@splitter) @splitter.split_vertically(@left, @right, 200) end end I believe leaving out the window id is the same as giving it a value of -1. Is that correct? Other than that, I cannot see anything different. MyPanel and MySplitterWindow classes are very generic. The sash seems to be positioned at 100px on Windows, no matter of sashPosition value. I am using wxruby-0.6 here by the way, had no luck compiling wxruby2 on FreeBSD, which is my main development machine. Thanks for looking into this. -- the neptune project http://t-n-p.org From alex at pressure.to Mon Jun 4 18:25:16 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 04 Jun 2007 23:25:16 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <20070601165520.GA49469@larissa.t-n-p.org> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> Message-ID: <4664914C.6020407@pressure.to> timmy2000 at t-n-p.org wrote: > I believe leaving out the window id is the same as giving it a value of > -1. Is that correct? Other than that, I cannot see anything different. > MyPanel and MySplitterWindow classes are very generic. The sash seems to > be positioned at 100px on Windows, no matter of sashPosition value. > Sorry for the delay in replying. Yes, -1 supplies the window with a default id. Your code looks good as well otherwise. > I am using wxruby-0.6 here by the way, had no luck compiling wxruby2 on > FreeBSD, which is my main development machine. > I haven't had a chance to try this on a box with 0.6 yet, but I suspect that it's a bug in that wxruby version. Unfortunately there's probably no chance of this getting fixed on that version; I don't know that codebase and AFAIK no-one else has worked on it for a couple of years. I'd be really keen to get wxruby2 working on BSD however. Perhaps you could post the compile error(s) you're getting? alex From R.L.Kingsland at lboro.ac.uk Tue Jun 5 04:55:58 2007 From: R.L.Kingsland at lboro.ac.uk (Roman Kingsland) Date: Tue, 05 Jun 2007 09:55:58 +0100 Subject: [Wxruby-users] Wx::Image resizing Message-ID: <1181033758.12624.8.camel@co-rs-rlk-ubuntu> Hello, I am having problems using the 'resize' and 'size' methods of Wx::Image. They seem to be undefined: irb(main):021:0> image = Wx::Image.new("input.ppm") => # irb(main):022:0> image.respond_to? "rescale" => true irb(main):023:0> image.respond_to? "resize" => false irb(main):024:0> image.respond_to? "size" => false Installation details: wxruby2-preview (0.0.40) Ruby interface to the wxWidgets GUI library ruby 1.8.5 (2006-08-25) [i486-linux] Any help would be much appreciated. Roman From alex at pressure.to Tue Jun 5 05:39:53 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Jun 2007 10:39:53 +0100 Subject: [Wxruby-users] Wx::Image resizing In-Reply-To: <1181033758.12624.8.camel@co-rs-rlk-ubuntu> References: <1181033758.12624.8.camel@co-rs-rlk-ubuntu> Message-ID: <46652F69.4090702@pressure.to> Hi Roman Kingsland wrote: > I am having problems using the 'resize' and 'size' methods of > Wx::Image. They seem to be undefined: > > wxruby2-preview (0.0.40) > Ruby interface to the wxWidgets GUI library > Thanks for the report - it seems these two have been missed in the header files which generate the methods in Ruby. Will be fixed for the next release. In the meantime, you could probably use a MemoryDC to do something similar to those methods, drawing the original bitmap onto a suitably sized 'canvas' image. Or if you've compiled your own wxruby2 I can give you a patch. a From R.L.Kingsland at lboro.ac.uk Tue Jun 5 05:44:30 2007 From: R.L.Kingsland at lboro.ac.uk (Roman Kingsland) Date: Tue, 05 Jun 2007 10:44:30 +0100 Subject: [Wxruby-users] Wx::Image resizing In-Reply-To: <46652F69.4090702@pressure.to> References: <1181033758.12624.8.camel@co-rs-rlk-ubuntu> <46652F69.4090702@pressure.to> Message-ID: <1181036670.12624.12.camel@co-rs-rlk-ubuntu> Hi > In the meantime, you could probably use a MemoryDC to do something > similar to those methods, drawing the original bitmap onto a suitably > sized 'canvas' image. Or if you've compiled your own wxruby2 I can give > you a patch. A patch would be great, thanks. Roman From alex at pressure.to Tue Jun 5 05:53:16 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Jun 2007 10:53:16 +0100 Subject: [Wxruby-users] Wx::Image resizing In-Reply-To: <1181036670.12624.12.camel@co-rs-rlk-ubuntu> References: <1181033758.12624.8.camel@co-rs-rlk-ubuntu> <46652F69.4090702@pressure.to> <1181036670.12624.12.camel@co-rs-rlk-ubuntu> Message-ID: <4665328C.9020100@pressure.to> Roman Kingsland wrote: >> In the meantime, you could probably use a MemoryDC to do something >> similar to those methods, drawing the original bitmap onto a suitably >> sized 'canvas' image. Or if you've compiled your own wxruby2 I can give >> you a patch. >> > > A patch would be great, thanks. > Please find attached - to be applied in the base directory of the unpacked src .tar.gz. Once it's applied, rake should only need to recompile the Image class, and re-link the wxruby2.so library. alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wximage_size.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20070605/49ee67f4/attachment.pl From timmy2000 at t-n-p.org Wed Jun 6 17:35:29 2007 From: timmy2000 at t-n-p.org (timmy2000 at t-n-p.org) Date: Wed, 6 Jun 2007 22:35:29 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <4664914C.6020407@pressure.to> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> <4664914C.6020407@pressure.to> Message-ID: <20070606213529.GA99920@larissa.t-n-p.org> Alex Fenton wrote: > Unfortunately there's probably no chance of this getting fixed That's not the end of the world. I can demonstrate the app working on more that one OS (in this case its Mac OS X, FreeBSD and Ubuntu/Debian), so Im happy as a tree. > I'd be really keen to get wxruby2 working on BSD however. Perhaps you > could post the compile error(s) you're getting? With pleasure. I am building it on ruby-1.8.5.12,1 with gcc version 3.4.4 (20050518) and here's the output from "rake --trace": ** Invoke swig/typemap.i (first_time, not_needed) ** Execute obj/AcceleratorEntry.o -c -O -pipe -march=athlon-xp -fPIC -Wno-unused-function -I /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/bin \ -I /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib \ -I /usr/local/lib/ruby -I /usr/local/lib/ruby/site_ruby/1.8 \ -I /usr/local/lib/ruby/site_ruby/1.8/i386-freebsd6 \ -I /usr/local/lib/ruby/site_ruby -I /usr/local/lib/ruby/1.8 \ -I /usr/local/lib/ruby/1.8/i386-freebsd6 -I . \ -I /usr/home/timmy/desktop/wxruby2-preview-0.0.40/doc/lib -o obj/AcceleratorEntry.o src/AcceleratorEntry.cpp rake aborted! Command failed with status (127): [ -c -O -pipe -march=athlon-xp -fPIC ...] /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:730:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:737:in `sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:816:in `sh' ./rake/rakewx.rb:321:in `create_compile_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:376:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `send' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1021:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:375:in `invoke_prerequisites' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:368:in `invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7 /usr/local/bin/rake:16:in `load' /usr/local/bin/rake:16 Hope this helps. If there's anything else you need to know / I should try, please let me know. Thanks. -- the neptune project http://t-n-p.org From alex at pressure.to Wed Jun 6 18:02:01 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Jun 2007 23:02:01 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <20070606213529.GA99920@larissa.t-n-p.org> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> <4664914C.6020407@pressure.to> <20070606213529.GA99920@larissa.t-n-p.org> Message-ID: <46672ED9.6050000@pressure.to> timmy2000 at t-n-p.org wrote: > That's not the end of the world. I can demonstrate the app working on > more that one OS (in this case its Mac OS X, FreeBSD and Ubuntu/Debian), > so Im happy as a tree. > > So nice to hear from happy users... >> I'd be really keen to get wxruby2 working on BSD however. Perhaps you >> could post the compile error(s) you're getting? >> > > With pleasure. I am building it on ruby-1.8.5.12,1 with gcc version 3.4.4 > (20050518) and here's the output from "rake --trace": I think we are simply lacking platform-specific compile instructions for BSDs. Since you're using gcc + GTK, I guess we can try the linux instructions. 1) Could you post the output of the following command? ruby -e 'puts RUBY_PLATFORM' 2) Could you try editing rakefile in the base wxruby2 directory as follows and run rake again, posting any errors? At line 41, there's a section commented 'platform specific'. Please replace the whole series of if/then statements like "if($macosx) require 'rake/rakemacosx' with simply require 'rake/rakelinux' thanks for your help alex From alex at pressure.to Wed Jun 6 18:04:43 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Jun 2007 23:04:43 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <20070606213529.GA99920@larissa.t-n-p.org> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> <4664914C.6020407@pressure.to> <20070606213529.GA99920@larissa.t-n-p.org> Message-ID: <46672F7B.3030509@pressure.to> Also, please could you send the output of the following command: wx-config --cxx On my system (PowerPC OS X) this returns 'g++' cheers alex From timmy2000 at t-n-p.org Thu Jun 7 06:05:18 2007 From: timmy2000 at t-n-p.org (timmy2000 at t-n-p.org) Date: Thu, 7 Jun 2007 11:05:18 +0100 Subject: [Wxruby-users] sash position problem In-Reply-To: <46672ED9.6050000@pressure.to> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> <4664914C.6020407@pressure.to> <20070606213529.GA99920@larissa.t-n-p.org> <46672ED9.6050000@pressure.to> Message-ID: <20070607100518.GA14559@larissa.t-n-p.org> Alex Fenton wrote: > 1) Could you post the output of the following command? > > ruby -e 'puts RUBY_PLATFORM' i386-freebsd6 > 2) Could you try editing rakefile in the base wxruby2 directory as > follows and run rake again, posting any errors? Done that and the previous error does not occur any more. Instead, I get version issues: "This version of wxRuby requires WxWidgets 2.8.3 or greater". The packages on this machine are quite outdated - only WxWidgets 2.8.0 is available. I have no time to upgrade them right now, but this is something that needs to be done soon, perhaps next week. I'll let you know when I've done this and any results that follow. You also wanted to know the output of 'wxgtk2-2.4-config --cxx', its 'c++' Thanks for your time Tim -- the neptune project http://t-n-p.org From alex at pressure.to Thu Jun 7 06:48:15 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Jun 2007 11:48:15 +0100 Subject: [Wxruby-users] building WxRuby on BSD In-Reply-To: <20070607100518.GA14559@larissa.t-n-p.org> References: <20070528015905.GA14298@larissa.t-n-p.org> <465B3AF6.4000103@pressure.to> <20070601165520.GA49469@larissa.t-n-p.org> <4664914C.6020407@pressure.to> <20070606213529.GA99920@larissa.t-n-p.org> <46672ED9.6050000@pressure.to> <20070607100518.GA14559@larissa.t-n-p.org> Message-ID: <4667E26F.50703@pressure.to> timmy2000 at t-n-p.org wrote: ... thanks for the helpful info. >> 2) Could you try editing rakefile in the base wxruby2 directory as >> follows and run rake again, posting any errors? >> > > Done that and the previous error does not occur any more. Instead, I get > version issues: "This version of wxRuby requires WxWidgets 2.8.3 or > greater". > > The packages on this machine are quite outdated - only WxWidgets 2.8.0 is > available. I have no time to upgrade them right now, but this is > something that needs to be done soon, perhaps next week. Ideally I'd suggest using gcc to build your own version of the latest stable wxWidgets, configured according to the linux instructions on this page: http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets Wx has a plethora of compile-time options and this should guarantee that those selected are compatible with wxRuby. Wx has good mechanisms for operating multiple versions with different options side-by-side. Let us know how it goes when you get a chance. If it works out well I'll patch the rakefile so it supports BSDs in the next release. Thanks Alex From bureaux.sebastien at neuf.fr Tue Jun 12 12:27:49 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Tue, 12 Jun 2007 18:27:49 +0200 Subject: [Wxruby-users] fichier wxruby2 Message-ID: <000501c7ad0e$9efce630$0201a8c0@SN111194970311> Bonjour, je voulais savoir si il est possible d'installer les fichiers wxruby2 ailleurs que dans les dossiers habituel et sans se servir de rubygems? car j'aimerais pouvoir les d?plac?s. Merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070612/9109a189/attachment.html From bureaux.sebastien at neuf.fr Sat Jun 16 12:03:42 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Sat, 16 Jun 2007 18:03:42 +0200 Subject: [Wxruby-users] exemple html Message-ID: <000501c7b02f$e9f4bb30$0201a8c0@SN111194970311> Bonjour, je voudrait savoir si il est possible d'aller chercher des flux rss et d'affich? les pages web avec l'exemple que vous donnez dans wxruby2: 'html', car je cherche une biblioth?que ou autre qui puisse me permettre de faire cel?. merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070616/0aab1c02/attachment.html From mario at ruby-im.net Sun Jun 17 11:36:20 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 17 Jun 2007 10:36:20 -0500 Subject: [Wxruby-users] Wx::TextCtrl and wxMSW Message-ID: Hey Alex, Found a solution to the problem that was occuring with wxMSW and the Wx::TextCtrl, have yet to verify that this will work in linux, but my little trick to the matter, was simple, thanks to the things that are provided with both Wx::TextCtrl, and Wx::Window classes. I'm providing this bit of information for thoes who may have trouble with dealing with Wx::TextCtrl, _AND_ have word wrapping action going on. As this seems to be a problem with dealing with word wrapping, I've been able to create a solution to make autoscrolling work. I create my own method for appending text to the Wx::TextCtrl buffer, Named append_buffer. Here is what it looks like: class MyBuffer < Wx::TextCtrl def append_buffer(text) # I have some processing of the text to colorize it, but I think this is just generally a problem # with word wrapping in general self.freeze # Freeze the buffer, so the control doesn't try to scroll on us, don't need that. Plus makes for faster updates succ,c,sl = self.position_to_xy(self.get_last_position) # Need to know where we are at in the buffer. Only part used is sl # Here is where I process my text, but shouldn't be needed for other stuff, least your doing an Extended Text Formatting self.append_text(text) self.thaw # Okay, we are done adding, so you can clear out now succ,c,se = self.position_to_xy(self.get_last_position) # Now we need to know where the buffer is, since we added data. self.scroll_lines((el-sl)+2) # Move the window to the last line given. Add 2 more fake lines, to ensure we get to the absolute bottom end end And that's all there is to it. Just happy to finally figure this out, cause it was bugging the heck out of me. I'll write back here in a few, once I test the changes on Linux, and ensure it works there as well, without any problems. Mario Steele -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070617/0b1a5e4f/attachment.html From mario at ruby-im.net Sun Jun 17 11:47:30 2007 From: mario at ruby-im.net (Mario Steele) Date: Sun, 17 Jun 2007 10:47:30 -0500 Subject: [Wxruby-users] Wx::TextCtrl and wxMSW In-Reply-To: References: Message-ID: Following up, Confirmed, that this patch also works perfectly fine on wxGTK as well. One of the major obstacles out of my way, finally. Was about to tear my hair out from trying to figure out ways to get around this. Even went as far as to write a control to handle the displaying of the text, but I wanted to avoid that, if I could use Wx::TextCtrl. Just to psyched about not having to write a work around on it. L8ers, Mario Steele On 6/17/07, Mario Steele wrote: > > Hey Alex, > > Found a solution to the problem that was occuring with wxMSW and the > Wx::TextCtrl, have yet to verify that this will work in linux, but my little > trick to the matter, was simple, thanks to the things that are provided with > both Wx::TextCtrl, and Wx::Window classes. > > I'm providing this bit of information for thoes who may have trouble with > dealing with Wx::TextCtrl, _AND_ have word wrapping action going on. As > this seems to be a problem with dealing with word wrapping, I've been able > to create a solution to make autoscrolling work. > > I create my own method for appending text to the Wx::TextCtrl buffer, > Named append_buffer. > > Here is what it looks like: > > class MyBuffer < Wx::TextCtrl > def append_buffer(text) > # I have some processing of the text to colorize it, but I think this > is just generally a problem > # with word wrapping in general > self.freeze # Freeze the buffer, so the control doesn't try to scroll > on us, don't need that. Plus makes for faster updates > succ,c,sl = self.position_to_xy(self.get_last_position ) # Need to > know where we are at in the buffer. Only part used is sl > # Here is where I process my text, but shouldn't be needed for other > stuff, least your doing an Extended Text Formatting > self.append_text (text) > self.thaw # Okay, we are done adding, so you can clear out now > succ,c,se = self.position_to_xy(self.get_last_position) # Now we need > to know where the buffer is, since we added data. > self.scroll_lines ((el-sl)+2) # Move the window to the last line > given. Add 2 more fake lines, to ensure we get to the absolute bottom > end > end > > And that's all there is to it. Just happy to finally figure this out, > cause it was bugging the heck out of me. I'll write back here in a few, > once I test the changes on Linux, and ensure it works there as well, without > any problems. > > > Mario Steele > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070617/3e84df8c/attachment.html From bureaux.sebastien at neuf.fr Mon Jun 18 18:20:48 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Tue, 19 Jun 2007 00:20:48 +0200 Subject: [Wxruby-users] (no subject) Message-ID: <000501c7b1f6$ecab29e0$0201a8c0@SN111194970311> Bonjour, en fait j'ai chercher sur rubyforge quelques projets cr?er avec wxruby ou wxruby2, en vain!!! je voulais savoir si vous pouviez me donnez quelques noms de projets cr?er avec wxruby ou wxruby2 pour que je puisse voir ce que d'autres personnes ont pu r?aliser. Merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070619/03cf3fec/attachment.html From fabio.petrucci at gmail.com Tue Jun 19 08:53:27 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Tue, 19 Jun 2007 14:53:27 +0200 Subject: [Wxruby-users] (no subject) In-Reply-To: <000501c7b1f6$ecab29e0$0201a8c0@SN111194970311> References: <000501c7b1f6$ecab29e0$0201a8c0@SN111194970311> Message-ID: ..try this http://rubyforge.org/projects/weft-qda/ On 6/19/07, Sebastien wrote: > > Bonjour, en fait j'ai chercher sur rubyforge quelques projets cr?er avec > wxruby ou wxruby2, en vain!!! > je voulais savoir si vous pouviez me donnez quelques noms de projets cr?er > avec wxruby ou wxruby2 pour que je puisse voir ce que d'autres personnes ont > pu r?aliser. > Merci > Sebastien > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070619/9cb0a4ec/attachment.html From fabio.petrucci at gmail.com Tue Jun 19 08:55:55 2007 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Tue, 19 Jun 2007 14:55:55 +0200 Subject: [Wxruby-users] (no subject) In-Reply-To: References: <000501c7b1f6$ecab29e0$0201a8c0@SN111194970311> Message-ID: ..and this http://rubyforge.org/projects/traducteur/ On 6/19/07, Fabio Petrucci wrote: > > ..try this http://rubyforge.org/projects/weft-qda/ > > On 6/19/07, Sebastien < bureaux.sebastien at neuf.fr> wrote: > > > Bonjour, en fait j'ai chercher sur rubyforge quelques projets cr?er > > avec wxruby ou wxruby2, en vain!!! > > je voulais savoir si vous pouviez me donnez quelques noms de projets > > cr?er avec wxruby ou wxruby2 pour que je puisse voir ce que d'autres > > personnes ont pu r?aliser. > > Merci > > Sebastien > > > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070619/250fbfa3/attachment-0001.html From ac251404 at ohio.edu Wed Jun 20 11:17:52 2007 From: ac251404 at ohio.edu (Alex Ciarlillo) Date: Wed, 20 Jun 2007 11:17:52 -0400 Subject: [Wxruby-users] Wx::TaskBarIcon example? Message-ID: <46794520.5020206@ohio.edu> I was wondering if anyone could help me out with a little bit of sample code for TaskBarIcon. I want my app to launch hidden and be able to show/hide it from a taskbaricon menu. I found some C++ examples but they were beyond the scope of what I'm trying to do and confused me more. Thanks, -Alex C. From alex at pressure.to Thu Jun 21 11:48:59 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Jun 2007 16:48:59 +0100 Subject: [Wxruby-users] Wx::TextCtrl and wxMSW In-Reply-To: References: Message-ID: <467A9DEB.5080507@pressure.to> Hi Mario Firstly, very sorry for the delay in replying. I've been abroad, on holiday and off line for a little while. Mario Steele wrote: > Found a solution to the problem that was occuring with wxMSW and the > Wx::TextCtrl, have yet to verify that this will work in linux, but my > little trick to the matter, was simple, thanks to the things that are > provided with both Wx::TextCtrl, and Wx::Window classes. Thanks for sharing that method. Once I read your email and re-read the bug I realised it was same as/similar to something I worked around for Weft QDA, using freeze/remember position/thaw. Since we've both hit the same problem and solution I'm inclined to add this to wxSugar for the next release. alex From alex at pressure.to Thu Jun 21 12:03:19 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Jun 2007 17:03:19 +0100 Subject: [Wxruby-users] fichier wxruby2 In-Reply-To: <000501c7ad0e$9efce630$0201a8c0@SN111194970311> References: <000501c7ad0e$9efce630$0201a8c0@SN111194970311> Message-ID: <467AA147.1010606@pressure.to> Sebastien wrote: > Bonjour, je voulais savoir si il est possible d'installer les fichiers > wxruby2 ailleurs que dans les dossiers habituel et sans se servir de > rubygems? > car j'aimerais pouvoir les d?plac?s. Excusez-moi de n'avoir pas repond? ? vous - je passais mes vacances et ne lisais pas mes ?mails. 1) On pouvez se servir de 'rubyscript2exe' ? cr?er un fichier qu'on peut ex?cuter sans une installation de wxruby ou ruby. 2) Si vous voulez utiliser deux installations de wxruby separ?s avec une en de ruby, et sans rubygems, vous devriez transcoder votre propres fichiers aux r?pertoires differents. Donc, ex?cutez ruby avec l'option '-I' pour choisir de laquelle vous voulez vous servir. Par exemple: ruby -Iwxruby/versions/0.0.38 my_script.rb alex From alex at pressure.to Thu Jun 21 12:08:27 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Jun 2007 17:08:27 +0100 Subject: [Wxruby-users] Wx::TaskBarIcon example? In-Reply-To: <46794520.5020206@ohio.edu> References: <46794520.5020206@ohio.edu> Message-ID: <467AA27B.5030203@pressure.to> Hi Alex Alex Ciarlillo wrote: > I was wondering if anyone could help me out with a little bit of sample > code for TaskBarIcon. I want my app to launch hidden and be able to > show/hide it from a taskbaricon menu. I found some C++ examples but they > were beyond the scope of what I'm trying to do and confused me more. > Have a look at samples/bigdemo/bigdemo.rb in the distribution. Roy, who added this class to wxRuby, also added an example there called DemoTaskBarIcon that shows how to do event handling and icon switching using Wx::TaskBarIcon. cheers alex From bureaux.sebastien at neuf.fr Fri Jun 22 11:37:54 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Fri, 22 Jun 2007 17:37:54 +0200 Subject: [Wxruby-users] fichier wxruby2 Message-ID: <000501c7b4e3$4e22fc40$0201a8c0@SN111194970311> Salut! Alex a ?crit: 1) On pouvez se servir de 'rubyscript2exe' ? cr?er un fichier qu'on peut ex?cuter sans une installation de wxruby ou ruby. J'ai essayer 'rubyscript2exe', mais ?a ne marche pas, pourtant j'ai suivi les indications sur la page du projet, en vain.Je vais encore essayer pour voir. 2) Si vous voulez utiliser deux installations de wxruby separ?s avec une en de ruby, et sans rubygems, vous devriez transcoder votre propres fichiers aux r?pertoires differents. Donc, ex?cutez ruby avec l'option '-I' pour choisir de laquelle vous voulez vous servir. Par exemple: ruby -Iwxruby/versions/0.0.38 my_script.rb Est-ce que vous pouvez ?tre plus pr?cis pour l'exemple 2 s'il vous pla?t. En fait j'aimerai pouvoir installer les gems utiles au fonctionnement de mon application dans mon application, pour ?viter aux gens qui t?l?charge mon projet de devoir les install?s.(comme wxruby2 par exemple) A propos de wx::htmlwindow, est ce que par la suite il sera possible d'ouvrir toutes pages internet? comme un navigateur, car j'arrive ? en ouvrir quelques unes, mais pas toutes. J'essai de cr?er un lecteur de flux rss/atom, mais tout ne marche pas correctement. Merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070622/a0f77236/attachment.html From alex at pressure.to Fri Jun 22 13:51:40 2007 From: alex at pressure.to (Alex Fenton) Date: Fri, 22 Jun 2007 18:51:40 +0100 Subject: [Wxruby-users] exemple html - RSS In-Reply-To: <000501c7b02f$e9f4bb30$0201a8c0@SN111194970311> References: <000501c7b02f$e9f4bb30$0201a8c0@SN111194970311> Message-ID: <467C0C2C.2080306@pressure.to> Sebastien wrote: > Bonjour, je voudrait savoir si il est possible d'aller chercher > des flux rss et d'affich? les pages web avec l'exemple que vous donnez > dans wxruby2: 'html', car je cherche une biblioth?que ou autre qui > puisse me permettre de faire cel?. Ce n'est pas possible d'afficher RSS/atom lui-m?me avec Wx::HtmlWindow. Mais vous pouvez vous servir de quelques biblioth?ques ruby pour chercher RSS (par exemple 'net/http', 'mechanize', 'http-access2') et l'analyser (par exemple 'rexml'). Donc, on devrait cr?er HTML qui r?presente ce que contient le RSS (le titre, le page vers ce qu'il lier, etc), et l'afficher dans Wx::HtmlWindow par son m?thode 'set_page', qui accepte un param?tre de source HTML. En cette mani?re, on peut realiser un lecteur flux RSS/atom. alex From bureaux.sebastien at neuf.fr Fri Jun 22 16:02:23 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Fri, 22 Jun 2007 22:02:23 +0200 Subject: [Wxruby-users] exemple html - RSS Message-ID: <000501c7b508$50386ef0$0201a8c0@SN111194970311> alex ?crit: Ce n'est pas possible d'afficher RSS/atom lui-m?me avec Wx::HtmlWindow. Mais vous pouvez vous servir de quelques biblioth?ques ruby pour chercher RSS (par exemple 'net/http', 'mechanize', 'http-access2') et l'analyser (par exemple 'rexml'). Donc, on devrait cr?er HTML qui r?presente ce que contient le RSS (le titre, le page vers ce qu'il lier, etc), et l'afficher dans Wx::HtmlWindow par son m?thode 'set_page', qui accepte un param?tre de source HTML. En cette mani?re, on peut realiser un lecteur flux RSS/atom. s?bastien r?pond: j'ai r?aliser un lecteur rss/atom qui me permet d'avoir le nom du flux avec l'heure, la date, et le titre de l'article, mais ce que j'aimerai pouvoir faire, c'est pouvoir afficher la page web du flux int?gralement, donc avec les images....,donc de pouvoir affiger la page comme dans un navigateur par exemple. Pour l'instant, je me sert de 'simple-rss' et 'Wx::HtmlWindow', entre autre. Avec l'exemple 'html' de wxruby2, je me suis cr?er un navigateur tr?s simple qui me permet d'afficher des pages web, plus ou moins bien suivant les pages, mais ?a n'est pas encore ?a!!! J'esp?re que par la suite ce sera possible de pouvoir r?aliser un navigateur, ou un lecteur de flux rss pouvant afficher toutes les pages. merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070622/43d1d784/attachment.html From alex at pressure.to Sat Jun 23 17:04:50 2007 From: alex at pressure.to (Alex Fenton) Date: Sat, 23 Jun 2007 22:04:50 +0100 Subject: [Wxruby-users] fichier wxruby2 In-Reply-To: <000501c7b4e3$4e22fc40$0201a8c0@SN111194970311> References: <000501c7b4e3$4e22fc40$0201a8c0@SN111194970311> Message-ID: <467D8AF2.9060605@pressure.to> salut Sebastien wrote: > > Alex a ?crit: > 1) On pouvez se servir de 'rubyscript2exe' ? cr?er un fichier qu'on peut > ex?cuter sans une installation de wxruby ou ruby. > > J'ai essayer 'rubyscript2exe', mais ?a ne marche pas, pourtant j'ai > suivi les indications sur la page du projet, en vain.Je vais encore > essayer pour voir. > ... > En fait j'aimerai pouvoir installer les gems utiles au fonctionnement > de mon application dans mon application, pour ?viter aux gens qui > t?l?charge mon projet de devoir les install?s.(comme wxruby2 par exemple) > Suivant ce but que vous avez d?crit, je crois que rubyscript2exe est le plus convenable. Croyez-vous qu'il ne marche pas ? cause de wxruby? Ou quelques autres erreurs? J'ai r?ussi ? faire un program avec wxruby en me servant de rubyscript2exe. alex From alex at pressure.to Sat Jun 23 17:16:48 2007 From: alex at pressure.to (Alex Fenton) Date: Sat, 23 Jun 2007 22:16:48 +0100 Subject: [Wxruby-users] exemple html - RSS In-Reply-To: <000501c7b508$50386ef0$0201a8c0@SN111194970311> References: <000501c7b508$50386ef0$0201a8c0@SN111194970311> Message-ID: <467D8DC0.9090702@pressure.to> Sebastien wrote: > j'ai r?aliser un lecteur rss/atom qui me permet d'avoir le nom du flux > avec l'heure, la date, et le titre de l'article, mais ce que j'aimerai > pouvoir faire, c'est pouvoir afficher la page web du > flux int?gralement, donc avec les images....,donc de pouvoir affiger > la page comme dans un navigateur par exemple. > Pour l'instant, je me sert de 'simple-rss' et 'Wx::HtmlWindow', entre > autre. Je crois que quand votre proj?t est plus developp?, nous nous interessons ? en entendre plus. > Avec l'exemple 'html' de wxruby2, je me suis cr?er un navigateur tr?s > simple qui me permet d'afficher des pages web, plus ou moins bien > suivant les pages, mais ?a n'est pas encore ?a!!! > J'esp?re que par la suite ce sera possible de pouvoir r?aliser un > navigateur, ou un lecteur de flux rss pouvant afficher toutes les pages. Wx::HtmlWindow n'est convenable qu'aux usages assez basiques - certainment pas pour r?aliser un navigateur comme Internet Explorer ou Firefox. Il y a des biblioth?ques pour WxWidgets ? cr?er un navigateur avec Mozilla ou Webkit, mais je doute que nous ne puissions les offrir en wxRuby ? l'avenir prochain. merci alex From bureaux.sebastien at neuf.fr Sat Jun 23 18:58:24 2007 From: bureaux.sebastien at neuf.fr (Sebastien) Date: Sun, 24 Jun 2007 00:58:24 +0200 Subject: [Wxruby-users] fichier wxruby2 Message-ID: <000501c7b5ea$016305f0$0201a8c0@SN111194970311> Bonjour Alex a ?crit: > 1) On pouvez se servir de 'rubyscript2exe' ? cr?er un fichier qu'on peut ex?cuter sans une installation de wxruby ou ruby. ?a y est j'ai trouv? comment faire pour cr?er un '.exe' C'est vraiment tr?s simple alors que je cherchai ? faire beaucoup plus compliqu?. Merci Sebastien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070624/4596d471/attachment-0001.html From ac251404 at ohio.edu Thu Jun 28 14:45:03 2007 From: ac251404 at ohio.edu (Alex Ciarlillo) Date: Thu, 28 Jun 2007 14:45:03 -0400 Subject: [Wxruby-users] Keeping GUI responsive while processing data Message-ID: <468401AF.6080102@ohio.edu> To start I will say I have read through the read "Problem with threads" to try and work around this problem, but I do not think I understand what is happening enough to make use of the info I found there. My app is pretty basic and does some text processing on 2 files and uses WIN32OLE to take the data and put it an excel sheet. The processing is really fast, but loading up Excel and doing output via WIN32OLE is taking a little bit. I'm fine with the speed, but while its doing the processing and output the entire GUI freezes and looks like crap for about 5 seconds. Basically I'm looking for an easy way to avoid this so the end user doesnt freak out and think the program crashed or anything. I found this code in the thread mentioned above: def on_init t = Wx::Timer.new(self, 55) evt_timer(55) { Thread.pass } t.start(100) which would be used in the on_init of the main App. I understand what it is doing (creates a 100ms timer which calls Thread.pass every iteration), but I don't understand how this can help the problem. I assume that if I do my processing in a new thread, this timer just keeps passing the the execution around between Wx and my thread until it finishes, which would hide the unresponsiveness of the GUI. However, I must be wrong since this doesn't work, or I'm doing it wrong. I have a button called 'run' which calls the following method: --------------- button code ------------------------------- def run dialog = Wx::FileDialog.new(self, "Save Report", "", "APReport.xls", "Excel Files (.xls)|*.xls", Wx::SAVE|Wx::OVERWRITE_PROMPT) file1 = @file1.get_value.to_s.strip file2 = @file2.get_value.to_s.strip if file1 == '' or file2 == '' info = sprintf("Please make sure you have selected both files.") dialog2 = Wx::MessageDialog.new(self, info, "Missing File?") dialog2.show_modal() elsif dialog.show_modal() == Wx::ID_OK save_path = dialog.get_path() puts save_path puts file1 puts file2 $t = Thread.new { ap = APBook.new ap.run(file1, file2, save_path) ### THIS IS THE PART THAT TAKES } ### SOME TIME end end And my on_init looks like this: ------------- on_init -------------------- class MyApp < Wx::App def on_init t = Wx::Timer.new(self, 55) evt_timer(55) { $t.pass if !$t.nil? && $t.methods.include?("pass") } t.start(100) SimpleFrame.new(nil, :size => Wx::Size.new(400, 180), :title => "AP Report").show end end This is basically cobbled together from the code Raine posted in 'Problem with threads' which she stated did not work... but it seems that no one ever got to the crux of the issue of why it didnt work. So I ask, in exasperation, what am I doing wrong? Where do I go from here? Thanks for reading, this got a bit longer than I intended... -Alex C From alex at pressure.to Thu Jun 28 15:03:37 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 28 Jun 2007 20:03:37 +0100 Subject: [Wxruby-users] Keeping GUI responsive while processing data In-Reply-To: <468401AF.6080102@ohio.edu> References: <468401AF.6080102@ohio.edu> Message-ID: <46840609.2040700@pressure.to> Hi Alex Alex Ciarlillo wrote: > the entire GUI freezes and looks like crap for > about 5 seconds. Basically I'm looking for an easy way to avoid this so > the end user doesnt freak out and think the program crashed or anything. > > I found this code in the thread mentioned above: > > $t = Thread.new { > ap = APBook.new > ap.run(file1, file2, save_path) ### THIS IS THE PART THAT TAKES > } ### SOME TIME > This looks fine - for testing I tried an example replacing your win32OLE code with a simple Thread.new { sleep 5; puts 'done' } I don't think you need to save the thread as a global ... > ------------- on_init -------------------- > > class MyApp < Wx::App > def on_init > t = Wx::Timer.new(self, 55) > evt_timer(55) { $t.pass if !$t.nil? && $t.methods.include?("pass") } Here you should be calling the class method Thread.pass - there is no instance method Thread#pass in ruby, so execution never switches to the OLE thread in your statement. There is an instance method Thread#run, but I find working with the code above that simply evt_timer(55) { Thread.pass } works fine and the GUI remains responsive. Does this help? cheers alex From ac251404 at ohio.edu Thu Jun 28 15:34:57 2007 From: ac251404 at ohio.edu (Alex Ciarlillo) Date: Thu, 28 Jun 2007 15:34:57 -0400 Subject: [Wxruby-users] Keeping GUI responsive while processing data In-Reply-To: <46840609.2040700@pressure.to> References: <468401AF.6080102@ohio.edu> <46840609.2040700@pressure.to> Message-ID: <46840D61.9090200@ohio.edu> Alex Fenton wrote: > Hi Alex > > Alex Ciarlillo wrote: > >> the entire GUI freezes and looks like crap for >> about 5 seconds. Basically I'm looking for an easy way to avoid this so >> the end user doesnt freak out and think the program crashed or anything. >> >> I found this code in the thread mentioned above: >> >> > > >> $t = Thread.new { >> ap = APBook.new >> ap.run(file1, file2, save_path) ### THIS IS THE PART THAT TAKES >> } ### SOME TIME >> >> > This looks fine - for testing I tried an example replacing your win32OLE > code with a simple > > Thread.new { sleep 5; puts 'done' } > > I don't think you need to save the thread as a global ... > > >> ------------- on_init -------------------- >> >> class MyApp < Wx::App >> def on_init >> t = Wx::Timer.new(self, 55) >> evt_timer(55) { $t.pass if !$t.nil? && $t.methods.include?("pass") } >> > Here you should be calling the class method Thread.pass - there is no > instance method Thread#pass in ruby, so execution never switches to the > OLE thread in your statement. > > There is an instance method Thread#run, but I find working with the code > above that simply evt_timer(55) { Thread.pass } works fine and the GUI > remains responsive. > > Does this help? > > cheers > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > Worked like a charm :) I thought I tried using Thread.pass earlier and it didnt work, but I realized it was because I was trying to run a different file than the one I was editing (duh). It's all working great now tho. Thanks!