From sebastien.bureaux at dbmail.com Mon Nov 1 03:12:42 2010 From: sebastien.bureaux at dbmail.com (sebastien.bureaux) Date: Mon, 1 Nov 2010 08:12:42 +0100 (CET) Subject: [wxruby-users] mingw32-ruby-1.9.1-wxruby-2.0.1-setup.exe et l'encodage utf8 Message-ID: <25789036.235611288595562931.JavaMail.www@wwumf0206> Bonsoir, apr?s avoir install? "mingw32-ruby-1.9.1-wxruby-2.0.1-setup.exe", j'ai un probl?me avec l'encodage des caract?res. Comment encoder les caract?res en utf8 avec la version ci-dessus? J'utilise scite(2.0.1) comme ?diteur de texte. merci -------------- section suivante -------------- Une pi?ce jointe HTML a ?t? nettoy?e... URL: From fabio.petrucci at gmail.com Mon Nov 1 09:59:45 2010 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Mon, 1 Nov 2010 14:59:45 +0100 Subject: [wxruby-users] wxruby thread - gui updates In-Reply-To: <2a5a82315ae10c9fce6d0d44ee26f965@ruby-forum.com> References: <2a5a82315ae10c9fce6d0d44ee26f965@ruby-forum.com> Message-ID: On Sun, Oct 31, 2010 at 8:57 AM, Galen Laws wrote: > I'm new myself but perhaps you can use EvtHandler#add_pending_event from > a standard thread to invoke an event handler in the gui thread. > Thank you Galen, I'll give it a try and let you know if it work. bio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Nov 5 11:48:58 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Fri, 05 Nov 2010 16:48:58 +0100 Subject: [wxruby-users] cannot get my wx script to run Message-ID: #!/usr/bin/env ruby # cannot get my code to work error: 'gem_original_require" no such file to load -- Wx (LoadError) Attachments: http://www.ruby-forum.com/attachment/5292/ReactOS-0.3.11-REL-qemu.zip -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Nov 5 20:01:57 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sat, 06 Nov 2010 01:01:57 +0100 Subject: [wxruby-users] cannot get my wx script to run Message-ID: I can't get my script to run. It just gives me the error: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load' from -e:1 Process finished with exit code 1 Attachments: http://www.ruby-forum.com/attachment/5296/MainFrame.rb -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Nov 5 20:14:29 2010 From: lists at ruby-forum.com (Galen Laws) Date: Sat, 06 Nov 2010 01:14:29 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: I got errors like this ("no such file to load") running 1.9 Ruby and installing the wrong wx. If you're running 1.9, try this one: http://rubygems.org/gems/wxruby-ruby19 This whole 1.8/1.9 thing is a huge pain. Going into the interactive ruby and just typing require 'wx' may be a quicker way to work on this issue. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 6 17:42:06 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Sat, 06 Nov 2010 22:42:06 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <2c862eac3ef6cccdac60327600a5100b@ruby-forum.com> Michael Gardiner wrote in post #959702: > I can't get my script to run. It just gives me the error: > > /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require': no such file to load -- Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' > from > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 > from -e:1:in `load' > from -e:1 > The best you can do is to download the gem from rubyforge and install it with the gem command (gem install PATH_TO_THE_DOWNLOADED_GEM). For some reason installing wxruby via gems doesn't work very well (it's actually very unstable: it either can't find any gems, or installs version 1.9 of wxRuby). I see you're using ruby 1.8, so you'll have to grab the package from http://rubyforge.org/frs/?group_id=35 hope that helps ?ukasz -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 6 22:38:40 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 03:38:40 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <5fe5174459d2aea361320a18bccdfa20@ruby-forum.com> It installed the gem. I am using ruby 1.8 and when i installed it it said: Warning: Installing to ~/.gem since /var/lib/gems/1.8 and /var/lib/gems/1.8/bin/crystalmoth/.gem/ruby/1.8/bin in your path. Warning: You don;t have /home/crystalmoth/.gem/ruby/1.8/bin in your path, gem executables will not run. Now I just get this message: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /var/lib/gems/1.8/bin/rdebug-ide --port 59342 -- /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb Fast Debugger (ruby-debug-ide 0.4.7) listens on :59342 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/lib/ruby-debug.rb:109:in `debug_load' /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/lib/ruby-debug.rb:109:in `debug_program' /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/bin/rdebug-ide:87 /var/lib/gems/1.8/bin/rdebug-ide:19:in `load' /var/lib/gems/1.8/bin/rdebug-ide:19 -e:1:in `load' -e:1 Uncaught exception: no such file to load -- Wx Process finished with exit code 0 Do I just have to set my PATH? If so, how? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 6 23:22:50 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 04:22:50 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <97afef708bd40b2552837f3827083652@ruby-forum.com> So i tried to put that second error message into my path and it seemed to work, kin of. Now I get this message when I try to run my scrip in RubyMine: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load' from -e:1 Process finished with exit code 1 And this messag3e when I try to debug my script in rubymine: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /var/lib/gems/1.8/bin/rdebug-ide --port 37753 -- /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb Process finished with exit code 0 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 6 23:29:11 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 04:29:11 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: I think there's a problem in this script, see attached. Attachments: http://www.ruby-forum.com/attachment/5301/14 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 6 23:36:41 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 04:36:41 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <11293c05780d578733bd68ac37180381@ruby-forum.com> or see this attached Attachments: http://www.ruby-forum.com/attachment/5302/ReactOS-0.3.11-REL-qemu.zip -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 7 00:10:50 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 05:10:50 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: Or see this attached. Attachments: http://www.ruby-forum.com/attachment/5304/seethisattached -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 7 06:12:44 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Sun, 07 Nov 2010 12:12:44 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: <97afef708bd40b2552837f3827083652@ruby-forum.com> References: , <97afef708bd40b2552837f3827083652@ruby-forum.com> Message-ID: Michael Gardiner wrote in post #959862: > So i tried to put that second error message into my path and it seemed > to work, kin of. Now I get this message when I try to run my scrip in > RubyMine: > > /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require': no such file to load -- Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' > from > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 > from -e:1:in `load' > from -e:1 Looks like RubyMine doesn't use your PATH variable. Can you try something like this: - after installing the gem, and adding .gem to your path ( do: export PATH=/home/crystalmoth/.gem/ruby/gems/1.8/gems:$PATH export PATH=/home/crystalmoth/.gem/ruby/1.8/bin:$PATH in the terminal or add these lines to your .profile/.bashrc ) Can you try running the MainFrame.rb directly from the command line (that'd be `ruby MainFrame.rb`) If that works that means you simply need to add the path to your local gems to RubyMine settings. Also - what OS are you using? (I'm assuming it's either Linux or OSX) ?ukasz -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 7 10:20:24 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 16:20:24 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <8040aac7f2e720f7ae22ea7d13ada9ac@ruby-forum.com> I tried those lines of path code. It didn't give me any errors, but then I tried running it from the terminal and got this message: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require: no such file to load --Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in 'require' from MainFrame.rb:4 And I am using Ubuntu Lucid Lynx. I've attached the custom require file and my code. Under /usr/lib/Ruby I seem to have the folders 1.8, 1.9, 1.9.0, 1.9.1, and gems Could there be a conflict of different versions going on. Attachments: http://www.ruby-forum.com/attachment/5305/MainFrame.rb http://www.ruby-forum.com/attachment/5306/custom_require.rb -- Posted via http://www.ruby-forum.com/. From fabio.petrucci at gmail.com Sun Nov 7 10:36:48 2010 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Sun, 7 Nov 2010 16:36:48 +0100 Subject: [wxruby-users] wxruby thread - gui updates In-Reply-To: References: <2a5a82315ae10c9fce6d0d44ee26f965@ruby-forum.com> Message-ID: On Mon, Nov 1, 2010 at 2:59 PM, Fabio Petrucci wrote: > On Sun, Oct 31, 2010 at 8:57 AM, Galen Laws wrote: > >> I'm new myself but perhaps you can use EvtHandler#add_pending_event from >> a standard thread to invoke an event handler in the gui thread. >> > > Unfortunately it didn't works: EvtHandler#add_pending_event execute the code asynchronously (usually during the next event loop iteration) but not in a separate thread. So my problem is still there: have gui update running on a separate thread. In one of the archived posts Alex (Fenton) say this: If using 1.8, you need to manually nudge Ruby's thread scheduler to give time to the RInotify thread. If using 1.9, this won't be needed, but you must not call GUI update code in the non-wx thread. GUI updates must be signalled by posting a Wx::Event to the GUI loop. As i know processing an event could be done as follow: - EvtHandler#process_event - EvtHandler#add_pending_event Anyone know how to signal a gui event to be processed in a separate thread? Thank you all, bio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sun Nov 7 11:01:48 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Sun, 07 Nov 2010 17:01:48 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: <8040aac7f2e720f7ae22ea7d13ada9ac@ruby-forum.com> References: , <8040aac7f2e720f7ae22ea7d13ada9ac@ruby-forum.com> Message-ID: <71c307dabcd3a0a4a5252249ab9947fb@ruby-forum.com> Michael Gardiner wrote in post #959939: > I tried those lines of path code. It didn't give me any errors, but then > I tried running it from the terminal and got this message: > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > 'gem_original_require: no such file to load --Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in ...and here's your problem In the attached example you have require 'Wx' and it should be require 'wx' # lowercase Once you change it wxRuby will be imported properly, the code won't run though (I assume it's a part of a bigger application) - try one of the minimal examples from the wxRuby site ( http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started ) ?ukasz -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 7 11:48:39 2010 From: lists at ruby-forum.com (Michael Gardiner) Date: Sun, 07 Nov 2010 17:48:39 +0100 Subject: [wxruby-users] cannot get my wx script to run In-Reply-To: References: Message-ID: <8f023553b6c7cbc4f17cf76867502a51@ruby-forum.com> I tried the Minimal App with the lowercase wx and it gave me no debug errors but when I tried to run it it said: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: wrong ELF class: ELFCLASS32 - /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load' from -e:1 Process finished with exit code 1 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 7 18:31:19 2010 From: lists at ruby-forum.com (Zhimin Zhan) Date: Mon, 08 Nov 2010 00:31:19 +0100 Subject: [wxruby-users] On Mac: undefined method `create_popup_menu' for # Message-ID: <275c4074afab20c6d6d31ac11180830f@ruby-forum.com> Hi there, I got the following error every time when I tried right clicking the app icon on Dock. Env: Mac OS X 10.6 wxRuby: wxruby-2.0.1-universal-darwin-9 Error: undefined method `create_popup_menu' for # Backtrace: /Users/zhimin/Work/projects/testwise/vendor/source/darwin/gems/wxruby-2.0.1-universal-darwin-9/lib/wx/accessors.rb:50:in `method_missing' /Users/zhimin/Work/projects/testwise/vendor/source/darwin/gems/wxruby-2.0.1-universal-darwin-9/lib/wx/accessors.rb:50:in `method_missing' Thanks, Zhimin -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Nov 9 03:08:45 2010 From: lists at ruby-forum.com (Worrawut Poonsuk) Date: Tue, 09 Nov 2010 09:08:45 +0100 Subject: [wxruby-users] how to reduce size of .exe file got from ocra Message-ID: Hi, I just create a simple WxRuby app and then try to turn it into .exe file using Ocra. The code is something like... require 'wx' class SimpleApp < Wx:App def on_init Wx::Frame.new(nil, -1, "Simple App").show() end end SimpleApp.new.main_loop However, the exe file from Ocra is quite big, about 5.45 Mb. I think it is because Wx requires many dependencies so that make this result. BTW, Is there any way to reduce file size of this exe ? Wut -- Posted via http://www.ruby-forum.com/. From penguinroad at gmail.com Tue Nov 9 08:08:37 2010 From: penguinroad at gmail.com (hendra kusuma) Date: Tue, 9 Nov 2010 21:08:37 +0800 Subject: [wxruby-users] how to reduce size of .exe file got from ocra In-Reply-To: References: Message-ID: On Tue, Nov 9, 2010 at 4:08 PM, Worrawut Poonsuk wrote: > Hi, > > I just create a simple WxRuby app and then try to turn it into .exe file > using Ocra. The code is something like... > > require 'wx' > > class SimpleApp < Wx:App > def on_init > Wx::Frame.new(nil, -1, "Simple App").show() > end > end > > SimpleApp.new.main_loop > > However, the exe file from Ocra is quite big, about 5.45 Mb. I think it > is because Wx requires many dependencies so that make this result. > BTW, Is there any way to reduce file size of this exe ? > > Wut > > There should be some freeware out there to reduce exe file size, I found two long time ago, but forgot their name -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From giff.h92 at gmail.com Tue Nov 9 07:35:35 2010 From: giff.h92 at gmail.com (Hameed Gifford) Date: Tue, 09 Nov 2010 07:35:35 -0500 Subject: [wxruby-users] how to reduce size of .exe file got from ocra In-Reply-To: References: Message-ID: <1289306135.5254.1.camel@hamstap85-laptop> Wut 'sup? I don't think so, since the 'require 'wx'' line loads all of WxRuby. I think you'll find that if you write a very elaborate ruby code, along the lines of 300KB in size, the .exe will not change much. But if I'm proved otherwise, by all means ignore me. - hameed On Tue, 2010-11-09 at 09:08 +0100, Worrawut Poonsuk wrote: > Hi, > > I just create a simple WxRuby app and then try to turn it into .exe file > using Ocra. The code is something like... > > require 'wx' > > class SimpleApp < Wx:App > def on_init > Wx::Frame.new(nil, -1, "Simple App").show() > end > end > > SimpleApp.new.main_loop > > However, the exe file from Ocra is quite big, about 5.45 Mb. I think it > is because Wx requires many dependencies so that make this result. > BTW, Is there any way to reduce file size of this exe ? > > Wut > From penguinroad at gmail.com Thu Nov 11 12:18:41 2010 From: penguinroad at gmail.com (hendra kusuma) Date: Fri, 12 Nov 2010 01:18:41 +0800 Subject: [wxruby-users] how to reduce size of .exe file got from ocra In-Reply-To: <1289306135.5254.1.camel@hamstap85-laptop> References: <1289306135.5254.1.camel@hamstap85-laptop> Message-ID: I believe the exe will be much more than 300 KB in size, since exe files include all library it need, and Wx is not a very small one. about 5 mb is normal I have used ruby script2exe before and the result is way bigger than 5 mb so yours is fine, really On Tue, Nov 9, 2010 at 8:35 PM, Hameed Gifford wrote: > Wut 'sup? > > I don't think so, since the 'require 'wx'' line loads all of WxRuby. I > think you'll find that if you write a very elaborate ruby code, along > the lines of 300KB in size, the .exe will not change much. > > But if I'm proved otherwise, by all means ignore me. > > - hameed > > On Tue, 2010-11-09 at 09:08 +0100, Worrawut Poonsuk wrote: > > Hi, > > > > I just create a simple WxRuby app and then try to turn it into .exe file > > using Ocra. The code is something like... > > > > require 'wx' > > > > class SimpleApp < Wx:App > > def on_init > > Wx::Frame.new(nil, -1, "Simple App").show() > > end > > end > > > > SimpleApp.new.main_loop > > > > However, the exe file from Ocra is quite big, about 5.45 Mb. I think it > > is because Wx requires many dependencies so that make this result. > > BTW, Is there any way to reduce file size of this exe ? > > > > Wut > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Nov 11 23:26:11 2010 From: lists at ruby-forum.com (Worrawut Poonsuk) Date: Fri, 12 Nov 2010 05:26:11 +0100 Subject: [wxruby-users] how to reduce size of .exe file got from ocra In-Reply-To: References: Message-ID: when I do >ocra very_simple_app.rb, then ocra compile and the trace looks something like.. ... ... a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon4.xpm a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon5.xpm a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/treectrl.r b m lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/samples.xrc a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/xrc_sample.rb e RUBYOPT -rubygems e RUBYLIB e GEM_PATH \gemhome p \bin\ruby.exe ruby.exe "\src\very_simple_app.rb" === Compressing === Finished building very_simple_app.exe (5720630 bytes) I think I don't need to load such dependencies like /samples, etc... I look into ocra document again and found that ocra will load all dependencies describe in manifest file of the required gem(or source file). So that I should be able to reduce size by modify the manifest of my wxruby. But the problem is, I cannot find the manifest file in the /lib/ruby/gem/1.8/gems/wxruby-2.0.1-x86-mswin32-60/, cann't find it from the root of ruby path as well :P How can I address ? Any suggestion, pls? Wut -- Posted via http://www.ruby-forum.com/. From penguinroad at gmail.com Fri Nov 12 05:35:16 2010 From: penguinroad at gmail.com (hendra kusuma) Date: Fri, 12 Nov 2010 18:35:16 +0800 Subject: [wxruby-users] how to reduce size of .exe file got from ocra In-Reply-To: References: Message-ID: what about move your samples directory somewhere and try again? perhaps that would do the trick? On Fri, Nov 12, 2010 at 12:26 PM, Worrawut Poonsuk wrote: > when I do >ocra very_simple_app.rb, then ocra compile and the trace > looks something like.. > > ... > ... > a > > lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon4.xpm > a > > lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon5.xpm > a > > lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/treectrl.r > b > m lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc > a > lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/samples.xrc > a > > lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/xrc_sample.rb > e RUBYOPT -rubygems > e RUBYLIB > e GEM_PATH \gemhome > p \bin\ruby.exe ruby.exe "\src\very_simple_app.rb" > === Compressing > === Finished building very_simple_app.exe (5720630 bytes) > > I think I don't need to load such dependencies like /samples, etc... > I look into ocra document again and found that ocra will load all > dependencies describe in manifest file of the required gem(or source > file). So that I should be able to reduce size by modify the manifest of > my wxruby. > > But the problem is, I cannot find the manifest file in the > /lib/ruby/gem/1.8/gems/wxruby-2.0.1-x86-mswin32-60/, cann't find it from > the root of ruby path as well :P > > How can I address ? > Any suggestion, pls? > > Wut > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Nov 12 17:24:08 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Fri, 12 Nov 2010 23:24:08 +0100 Subject: [wxruby-users] evt_button + images_click Message-ID: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Hello. I have two questions. Here is my code: --------- require "wx" class FFF < Wx::Frame def initialize @b = Array.new super(nil, 2, "Bljllll", [5,5], [640,480]) @mypanel = Wx::Panel.new(self) for i in 0..6 @b[i] = Wx::Button.new(@mypanel, i, "#{i}", [10+25*i, 10], [20,20]) evt_button(i){puts i} end end end Wx::App.run do FFF.new.show end -------- 1) I'm create pre-condition number of buttons(7 in example above). What I must do to set every button event which puts button id(btw, it's equal label of buttons too)? For example: if I print button "0", it must puts 0, not 6 as a my code(in my code click to all buttons puts last number in array, here it is 6). 2) Are there events to images such as click and mouse_on? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Nov 12 19:05:45 2010 From: lists at ruby-forum.com (David Inman) Date: Sat, 13 Nov 2010 01:05:45 +0100 Subject: [wxruby-users] Scrolling / wxPanel / wxFlexGridSizer Message-ID: <677d267f9fc09687e9ea7f8a1a7793ec@ruby-forum.com> I have a problem getting scroll bars to become active. Scrollbars appear but do not actually scroll. The problem I am trying to solve is to list a large number of key/value pairs. I looked to use PropertyGrid but did not find it in wxruby 2.0.1. I'm really stuck and would appreciate any help. Thanks, Dave Details: I am starting with an .xrc file containing: ... wxStaticBoxSizer (horizontal, stretch factor 1, expanded vertically) wxPanel (stretch factor 1, expanded vertically) ... In the ruby file invoking the interface I have: require 'wx' require 'loadgui.rb' # from xrcise class MyApp < MyGUI def on_init # Sizer holding key value pairs @settings_sizer = Wx::FlexGridSizer.new(2) @settings_sizer.add_growable_col(1, 1) # wxPanel holding the sizer above @panel = @finder.call( 'ID_SETTINGS' ) @panel.sizer = @settings_sizer @labels = {} @texts = {} ENV.each { |k, v| @labels[k] = Wx::StaticText.new(@panel, :label => k) @texts[k] = Wx::TextCtrl.new(@panel, :value => v) @settings_sizer.add @labels[k], 0 @settings_sizer.add @texts[k], 1, Wx::EXPAND } end end # Run the Application Wx::App.run do $app = MyApp.new $app.show end -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Sat Nov 13 01:25:37 2010 From: mario at ruby-im.net (Mario Steele) Date: Sat, 13 Nov 2010 01:25:37 -0500 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Hello Michael, On Fri, Nov 12, 2010 at 5:24 PM, Misha Ognev wrote: > Hello. > > I have two questions. > > Here is my code: > --------- > require "wx" > > class FFF < Wx::Frame > def initialize > @b = Array.new > super(nil, 2, "Bljllll", [5,5], [640,480]) > @mypanel = Wx::Panel.new(self) > for i in 0..6 > @b[i] = Wx::Button.new(@mypanel, i, "#{i}", [10+25*i, 10], > [20,20]) > evt_button(i){puts i} > evt_button(@b[i]) { puts i } > end > end > > end > > Wx::App.run do > FFF.new.show > end > -------- > > 1) I'm create pre-condition number of buttons(7 in example above). What > I must do to set every button event which puts button id(btw, it's equal > label of buttons too)? For example: if I print button "0", it must puts > 0, not 6 as a my code(in my code click to all buttons puts last number > in array, here it is 6). > This is answered in-line in the code. > 2) Are there events to images such as click and mouse_on? > I believe the standard event handlers for StaticBitmap will work, as it's hierarchy is Object > EvtHandler > Window > Control > StaticBitmap. Standard Images, through Wx::Image, Wx::Bitmap, and such, do not have Events, as they are considered Memory Objects, not Actual Controls. Basically, if you look at the docs for any class we have, and it has somewhere in it's hierarchy EvtHandler, then there are events that the Class will receive. hth, Mario > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Mario Steele Lieutenant Commander 3 XO - Geo 99 XO - STO IFT Fleet http://www.trekfederation.com http://geo99.ruby-im.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From mario at ruby-im.net Sat Nov 13 01:28:56 2010 From: mario at ruby-im.net (Mario Steele) Date: Sat, 13 Nov 2010 01:28:56 -0500 Subject: [wxruby-users] Scrolling / wxPanel / wxFlexGridSizer In-Reply-To: <677d267f9fc09687e9ea7f8a1a7793ec@ruby-forum.com> References: <677d267f9fc09687e9ea7f8a1a7793ec@ruby-forum.com> Message-ID: Hello Dave, On Fri, Nov 12, 2010 at 7:05 PM, David Inman wrote: > I have a problem getting scroll bars to become active. Scrollbars > appear but do not actually scroll. The problem I am trying to > solve is to list a large number of key/value pairs. I looked > to use PropertyGrid but did not find it in wxruby 2.0.1. I'm > really stuck and would appreciate any help. > > Thanks, > Dave > We don't have PropertyGrid available in 2.0.1, but we do have Wx::Grid available, which should allow you to use a Key > Val pairs setup in it, as well as Wx::ListCtrl. Take a look at these two classes' documentation, to see if it will help you. http://wxruby.rubyforge.org/doc/grid.html http://wxruby.rubyforge.org/doc/listctrl.html hth, Mario -- Mario Steele Lieutenant Commander 3 XO - Geo 99 XO - STO IFT Fleet http://www.trekfederation.com http://geo99.ruby-im.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sat Nov 13 07:39:37 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Sat, 13 Nov 2010 13:39:37 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: <96fd4eab70d334825c58446cfd4318fd@ruby-forum.com> 1) evt_button(@b[i]) { puts i } doesn't work I need. It works like a evt_button(i){puts i}. I don't know why. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 13 15:56:33 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Sat, 13 Nov 2010 21:56:33 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Hi! That's the way to do it - it's not very clean since it probably will be triggered by any button event but you can process only events starting with a specific value etc and ignore the rest (and use more strict handlers): class FFF < Wx::Frame def initialize @b = Array.new super(nil, 2, "Bljllll", [5,5], [640,480]) @mypanel = Wx::Panel.new(self) for i in 0..6 @b[i] = Wx::Button.new(@mypanel, i, "#{i}", [10+25*i, 10], [20,20]) end # here you specify global event handler which # will process any button press # this uses event delegation and works dynamically # so it will works regardless of number of buttons evt_button(Wx::ID_ANY){ |ev| puts ev.get_id } end end If you want clickable images you should use Wx::BitmapButton class: http://wxruby.rubyforge.org/doc/bitmapbutton.html Hope that helps :-) ?ukasz -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 14 12:25:06 2010 From: lists at ruby-forum.com (Tom Ladyman) Date: Sun, 14 Nov 2010 18:25:06 +0100 Subject: [wxruby-users] Error with require "wx" Message-ID: I have installed the wxruby gem, with no errors, but when I try to inclue the gem, I get this error: :29:in `require': 126: The specified module could not be found. - C:/Ruby192/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wxruby2.so (LoadError) from :29:in `require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:12:in `' from :33:in `require' from :33:in `rescue in require' from :29:in `require' from C:/Users/Tom/Documents/NetBeansProjects/testserial/lib/main.rb:3:in `
' I've tried installing the other packages, the .exe ones, and still just get that error.. Thanks for any help, Tom -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 14 16:31:48 2010 From: lists at ruby-forum.com (Marvin =?UTF-8?B?R8O8bGtlcg==?=) Date: Sun, 14 Nov 2010 22:31:48 +0100 Subject: [wxruby-users] Regards to Building of wxRuby 2.0.1 In-Reply-To: References: , , Message-ID: Mario Steele wrote in post #957800: > perfectly fine. I'm currently at a lost as to what is causing this. I'm sure it's not good for your sanity, but I just found out that our beloved problem isn't limited to Ubuntu. Yesterday I decided to give Arch Linux a try and today I wanted to do some developing with wxRuby, but nope. Here's what I did: * Compiled Ruby 1.9.2-p0 to /opt/rubies/ruby-1.9.2-p0 * Compiled wxRuby on top of Arch's distro wxWidgets * Installed the wxruby-ruby19 gem I just compiled And now the expected segfault: ========================================= ? quintus at pegasus => /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/samples/minimal $ ruby -dw minimal.rb Exception `LoadError' at :29 - no such file to load -- rubygems/defaults/operating_system Exception `LoadError' at :37 - no such file to load -- rubygems/defaults/operating_system Exception `LoadError' at :29 - no such file to load -- rubygems/defaults/ruby Exception `LoadError' at :37 - no such file to load -- rubygems/defaults/ruby Exception `LoadError' at :29 - no such file to load -- wx /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so: warning: method redefined; discarding old get_alpha_data /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so: warning: method redefined; discarding old get_rgb_data /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object_simple.rb:3: warning: method redefined; discarding old get_data_size /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:3: warning: method redefined; discarding old get_preferred_format /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:7: warning: method redefined; discarding old get_format_count /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/data_object.rb:11: warning: method redefined; discarding old get_data_size /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:30: warning: method redefined; discarding old on_assert_failure /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/validator.rb:4: warning: method redefined; discarding old clone /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/clientdc.rb:8: warning: method redefined; discarding old initialize /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/paintdc.rb:7: warning: method redefined; discarding old initialize (wxruby:2101): Gtk-WARNING **: Error parsing gtk-icon-sizes string: 'panel-menu=24,24 panel=20,20 gtk-button=18,18 gtk-large-toolbar=24,24' /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:16: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0006 p:---- s:0017 b:0017 l:000016 d:000016 CFUNC :on_run c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :main_loop c:0004 p:0053 s:0012 b:0012 l:000011 d:000011 METHOD /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:16 c:0003 p:0062 s:0006 b:0006 l:001658 d:002148 EVAL minimal.rb:73 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001658 d:001658 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- minimal.rb:73:in `
' /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:16:in `run' /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:16:in `main_loop' /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wx/classes/app.rb:16:in `on_run' -- C level backtrace information ------------------------------------------- /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_vm_bugreport+0x5f) [0x7ffac492b30f] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x627c4) [0x7ffac480b7c4] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_bug+0xb3) [0x7ffac480c6f3] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x115715) [0x7ffac48be715] /lib/libpthread.so.0(+0xf1c0) [0x7ffac459b1c0] /usr/lib/libpixman-1.so.0(pixman_image_composite32+0x45d) [0x7ffab7f08a1d] /usr/lib/libcairo.so.2(+0x3a0a1) [0x7ffabb9560a1] /usr/lib/libcairo.so.2(+0x645cc) [0x7ffabb9805cc] /usr/lib/libcairo.so.2(+0x65a7c) [0x7ffabb981a7c] /usr/lib/libcairo.so.2(+0x4822b) [0x7ffabb96422b] /usr/lib/libcairo.so.2(+0x4ada0) [0x7ffabb966da0] /usr/lib/libcairo.so.2(+0x49ec3) [0x7ffabb965ec3] /usr/lib/libcairo.so.2(+0x4a9a2) [0x7ffabb9669a2] /usr/lib/libcairo.so.2(+0x4b771) [0x7ffabb967771] /usr/lib/libcairo.so.2(+0x47e13) [0x7ffabb963e13] /usr/lib/libcairo.so.2(+0x2162d) [0x7ffabb93d62d] /usr/lib/libcairo.so.2(cairo_fill_preserve+0x20) [0x7ffabb934220] /usr/lib/libcairo.so.2(cairo_fill+0x9) [0x7ffabb934239] /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so(+0x14a5e) [0x7ffab6223a5e] /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so(+0x18fa9) [0x7ffab6227fa9] /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so(+0x947f) [0x7ffab621847f] /usr/lib/libgtk-x11-2.0.so.0(+0x8d01b) [0x7ffabfb4a01b] /usr/lib/libgtk-x11-2.0.so.0(+0x8d24f) [0x7ffabfb4a24f] /usr/lib/libgtk-x11-2.0.so.0(+0x136258) [0x7ffabfbf3258] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xa9) [0x7ffabf5cbe09] /usr/lib/libgobject-2.0.so.0(+0x1ef78) [0x7ffabf5dcf78] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x625) [0x7ffabf5e6345] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7ffabf5e6773] /usr/lib/libgtk-x11-2.0.so.0(+0x2516ef) [0x7ffabfd0e6ef] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_propagate_expose+0x1c6) [0x7ffabfb75c96] /usr/lib/libgtk-x11-2.0.so.0(+0x8399b) [0x7ffabfb4099b] /usr/lib/libgtk-x11-2.0.so.0(+0xb7804) [0x7ffabfb74804] /usr/lib/libgtk-x11-2.0.so.0(+0x136258) [0x7ffabfbf3258] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xa9) [0x7ffabf5cbe09] /usr/lib/libgobject-2.0.so.0(+0x1ef78) [0x7ffabf5dcf78] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x625) [0x7ffabf5e6345] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7ffabf5e6773] /usr/lib/libgtk-x11-2.0.so.0(+0x2516ef) [0x7ffabfd0e6ef] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_propagate_expose+0x1c6) [0x7ffabfb75c96] /usr/lib/libgtk-x11-2.0.so.0(+0x8399b) [0x7ffabfb4099b] /usr/lib/libgtk-x11-2.0.so.0(+0xb7804) [0x7ffabfb74804] /usr/lib/libgtk-x11-2.0.so.0(+0x136258) [0x7ffabfbf3258] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0xa9) [0x7ffabf5cbe09] /usr/lib/libgobject-2.0.so.0(+0x1ef78) [0x7ffabf5dcf78] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x625) [0x7ffabf5e6345] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7ffabf5e6773] /usr/lib/libgtk-x11-2.0.so.0(+0x2516ef) [0x7ffabfd0e6ef] /usr/lib/libgtk-x11-2.0.so.0(gtk_container_propagate_expose+0x1c6) [0x7ffabfb75c96] /usr/lib/libgtk-x11-2.0.so.0(+0xb7804) [0x7ffabfb74804] /usr/lib/libgtk-x11-2.0.so.0(+0x136258) [0x7ffabfbf3258] /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x15e) [0x7ffabf5cbebe] /usr/lib/libgobject-2.0.so.0(+0x1ef78) [0x7ffabf5dcf78] /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x625) [0x7ffabf5e6345] /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83) [0x7ffabf5e6773] /usr/lib/libgtk-x11-2.0.so.0(+0x2516ef) [0x7ffabfd0e6ef] /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x58a) [0x7ffabfbf1a7a] /usr/lib/libgdk-x11-2.0.so.0(+0x42cf2) [0x7ffabf84ecf2] /usr/lib/libgdk-x11-2.0.so.0(+0x3dc1b) [0x7ffabf849c1b] /usr/lib/libgdk-x11-2.0.so.0(gdk_window_process_all_updates+0x129) [0x7ffabf84be39] /usr/lib/libgtk-x11-2.0.so.0(+0xb74b1) [0x7ffabfb744b1] /usr/lib/libgdk-x11-2.0.so.0(+0x1d366) [0x7ffabf829366] /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f3) [0x7ffabf013bf3] /usr/lib/libglib-2.0.so.0(+0x423d0) [0x7ffabf0143d0] /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x182) [0x7ffabf014a42] /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7) [0x7ffabfbf07c7] /usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN11wxEventLoop3RunEv+0x48) [0x7ffac0b4e478] /usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN9wxAppBase8MainLoopEv+0x4b) [0x7ffac0bcb84b] /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so(+0x20f170) [0x7ffac263e170] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x17957e) [0x7ffac492257e] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_funcall+0xb2) [0x7ffac49230f2] /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so(_ZN16SwigDirector_App5OnRunEv+0x2d) [0x7ffac263eb5d] /usr/lib/libwx_baseu-2.8.so.0(_Z7wxEntryRiPPw+0x6a) [0x7ffac06a5cfa] /opt/rubies/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86_64-linux/lib/wxruby2.so(+0x20f060) [0x7ffac263e060] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x17c1ee) [0x7ffac49251ee] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x171dd6) [0x7ffac491add6] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x178213) [0x7ffac4921213] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(rb_iseq_eval_main+0xb1) [0x7ffac4926671] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(+0x68b4a) [0x7ffac4811b4a] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(ruby_exec_node+0x1d) [0x7ffac4812aad] /opt/rubies/ruby-1.9.2-p0/lib/libruby.so.1.9(ruby_run_node+0x1e) [0x7ffac4814d1e] ruby(main+0x4b) [0x40099b] /lib/libc.so.6(__libc_start_main+0xfd) [0x7ffac3988c4d] ruby() [0x400889] [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html ========================================= The issue is definitely related to libpixman's version and not to Ubuntu's modifications I conclude. But that means, if the other distros update their libpixman, wxRuby won't work ony any of them... :-( This is the pixman lib Arch uses: ========================================= ? quintus at pegasus => ~ $ LANG=en_US.utf8 pacman -Qi pixman Name : pixman Version : 0.18.4-1 URL : http://xorg.freedesktop.org Licenses : custom Groups : None Provides : None Depends On : glibc Optional Deps : None Required By : cairo xorg-server Conflicts With : None Replaces : None Installed Size : 480.00 K Packager : Jan de Groot Architecture : x86_64 Build Date : Tue 17 Aug 2010 08:59:48 AM CEST Install Date : Sun 14 Nov 2010 11:17:47 AM CET Install Reason : Installed as a dependency for another package Install Script : No Description : Pixman library ========================================= ruby -v, just for completeness: ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] uname -a: Linux pegasus 2.6.35-ARCH #1 SMP PREEMPT Sat Oct 30 21:22:26 CEST 2010 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux Vale, Marvin -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 15 08:00:48 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Mon, 15 Nov 2010 14:00:48 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: <30064b3b42f67edef9df2683c342da8b@ruby-forum.com> Hello else one. I decided a problem 1): evt_button(i){|xx| puts xx.get_id} Now working with problem 2 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Nov 15 08:28:47 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Mon, 15 Nov 2010 14:28:47 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <30064b3b42f67edef9df2683c342da8b@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com>, <30064b3b42f67edef9df2683c342da8b@ruby-forum.com> Message-ID: <7298c366b63f12844b63dc477e9fc92c@ruby-forum.com> Misha Ognev wrote in post #961550: > Hello else one. > > I decided a problem 1): > > evt_button(i){|xx| puts xx.get_id} > > Now working with problem 2 Did you try wx::BitmapButton? ?ukasz -- Posted via http://www.ruby-forum.com/. From sutniuq at gmx.net Mon Nov 15 12:09:07 2010 From: sutniuq at gmx.net (Quintus) Date: Mon, 15 Nov 2010 18:09:07 +0100 Subject: [wxruby-users] Force wxRuby/wxWidgets to Qt libs? Message-ID: <4CE16933.40105@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, Being annoyed by the libpixman bug wxRuby has I wonder wheather I could just make wxRuby use the Qt libs instead of the GTK ones. I already have them installed on my Ubuntu machine, as I'm using applications like K3b which clearly come from KDE and therefore use the Qt library. So here's my question: Is there an easy way to make wxRuby/wxWidgets use the KDE/Qt libraries instead of the GNOME/GTK ones from a normal Ubuntu session? Maybe just by setting an appropriate environment variable such as $ WX_WIDGETS_LIB=Qt ruby my_gui.rb ? Valete, Marvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJM4WkbAAoJEGrS0YjAWTKVaaoIAJ25AMxWzFzjZdi6YU/S+Vvr V5MZimJB/1Bwl0Sne+9DItQOeNn6vkfA9g7A3zlgKiUnFl+/47R/xuen4bW0VK2d ZLkFjmR5gNOfzP/rrR0nLWpmzrgJgKZyHBuRch7GxJmaT20n+pYQgj5oFEyto7UE PI72KjYdFucUkennhemp0r8NgTGSbQDsXZsqOe+6N1W6UTHBK2yqLJL/0dlpykKN q4FQ5Nnj/xxXYrazCXUOiTGLLDSWjSc0u23p+/yGxiEEVFq2WMx30IA96J/KM7pn H9gC7y7tkOfXgFHbS6hrZm7el+9406ozbkW6q0W8LulgqAbduGa7kNNSyEF2RYI= =QXJX -----END PGP SIGNATURE----- From lists at ruby-forum.com Mon Nov 15 13:00:29 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Mon, 15 Nov 2010 19:00:29 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: <8824318af596755893c557c64b48b980@ruby-forum.com> Can I match the event "click right button of the mouse? (non left)"? -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Nov 16 07:30:26 2010 From: alex at pressure.to (Alex Fenton) Date: Tue, 16 Nov 2010 12:30:26 +0000 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <8824318af596755893c557c64b48b980@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> <8824318af596755893c557c64b48b980@ruby-forum.com> Message-ID: <4CE27962.3000709@pressure.to> Hi Yes, there is evt_right_down, evt_right_up and evt_right_dclick (and also similar events for the middle button). Note that if you're creating context menus (a common use for right clicks) it is better to use evt_context_menu which abstracts away platform differences in the means by which such a menu is summoned and dismissed. alex On 15/11/2010 18:00, Misha Ognev wrote: > Can I match the event "click right button of the mouse? (non left)"? > From alex at pressure.to Tue Nov 16 07:32:51 2010 From: alex at pressure.to (Alex Fenton) Date: Tue, 16 Nov 2010 12:32:51 +0000 Subject: [wxruby-users] Force wxRuby/wxWidgets to Qt libs? In-Reply-To: <4CE16933.40105@gmx.net> References: <4CE16933.40105@gmx.net> Message-ID: <4CE279F3.1030804@pressure.to> Hi On 15/11/2010 17:09, Quintus wrote: > Being annoyed by the libpixman bug wxRuby has I wonder wheather I could > just make wxRuby use the Qt libs instead of the GTK ones. I already have > them installed on my Ubuntu machine, as I'm using applications like K3b > which clearly come from KDE and therefore use the Qt library. > > So here's my question: Is there an easy way to make wxRuby/wxWidgets use > the KDE/Qt libraries instead of the GNOME/GTK ones from a normal Ubuntu > session? Maybe just by setting an appropriate environment variable such as > $ WX_WIDGETS_LIB=Qt ruby my_gui.rb No, I'm afraid not. The QT port of wxWidgets is largely unmaintained. Also, the port of wxRuby to each platform/lib requires special work, and there isn't any support in the wxRuby codebase for building against QT. Why not just use QT/Ruby? It is different but has a similar range of features to wxRuby. alex From sutniuq at gmx.net Tue Nov 16 10:16:19 2010 From: sutniuq at gmx.net (Quintus) Date: Tue, 16 Nov 2010 16:16:19 +0100 Subject: [wxruby-users] Force wxRuby/wxWidgets to Qt libs? In-Reply-To: <4CE279F3.1030804@pressure.to> References: <4CE16933.40105@gmx.net> <4CE279F3.1030804@pressure.to> Message-ID: <4CE2A043.9070505@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.11.2010 13:32, schrieb Alex Fenton: > > Why not just use QT/Ruby? It is different but has a similar range of > features to wxRuby. > I already thought about that, but I have so much code that is already written for wxRuby... I don't want to rewrite all that. Additionally, Qt doesn't look native on other platforms than those using KDE, which is a must-have for many of my applications (at least Ubuntu and Windows). Vale, Marvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJM4qAzAAoJEGrS0YjAWTKVaDEH/RUF6u027NTEdZnkT18MWYrw k1nXpsXkXFjvTgducyUY8Zap2JjLX4oKgSHI2xB8EvZBSNZ8MyFHL3/lJc5H2Cm8 g54h7Tmq1+dev5wunR6C31ZvZHEDnx/8oJq3ttodCUu403Uebxk3lADzhtj8BOIO 5Np5xT5ZPFLu5Dgx7SgSlaxEg8eKOLOwHrGLdp7UMd6hAYWb1GFxfgT1S8B5ZYI1 5e/+PdP5B9awT89psFgu75PaUlTmsYZiJAdAy+QFzvmpPe0LFmOexkvlcKDNdwz2 dLys/LOA+HK7lZ8ljBBYFsMdkZOdwhUI9Or6CQAh4UFV/x3/0GrqNhmtCRN0tVA= =+s9t -----END PGP SIGNATURE----- From lists at ruby-forum.com Tue Nov 16 16:57:53 2010 From: lists at ruby-forum.com (David Inman) Date: Tue, 16 Nov 2010 22:57:53 +0100 Subject: [wxruby-users] Scrolling / wxPanel / wxFlexGridSizer In-Reply-To: <677d267f9fc09687e9ea7f8a1a7793ec@ruby-forum.com> References: <677d267f9fc09687e9ea7f8a1a7793ec@ruby-forum.com> Message-ID: <085dcce1195ef00743f1eefd0d6ad61c@ruby-forum.com> Thanks for the help Mario. I did look at grid and listctrl. I had hoped to use a FlexGridSizer instead, because I wanted columns of different sizes and to have one column grow. ListCtrl looks fairly complicated. My problem seems to be getting the parenting or settings correct to have scrollbars work when I fill the FlexGridSizer beyond its window capacity. The scrollbars appear, using a settings of the wxPanel, but mouse clicks on them don't cause scrolling. My hierarchy looks like: ... wxStaticBoxSizer (horizontal, stretch factor 1, expanded vertically) wxPanel (stretch factor 1, expanded vertically) wxFlexGridSizer (2 cols, col 1 growable, stretch factor 1) wxStaticText wxTextCtrl ... wxStaticText wxTextCtrl ... Thanks, Dave -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Nov 16 17:55:34 2010 From: lists at ruby-forum.com (Rubist Rohit) Date: Tue, 16 Nov 2010 23:55:34 +0100 Subject: [wxruby-users] Sample Windows app. to evaluate Message-ID: <25768bbc8c1218bb972572c08208211c@ruby-forum.com> I am new to Ruby and want to use it to write a production-level Windows app for Inventory & Invoicing. I heard about wxRuby but I haven't seen any samples. Are there any such apps. that I can evaluate for performance and looks? -- Posted via http://www.ruby-forum.com/. From fabio.petrucci at gmail.com Wed Nov 17 03:18:46 2010 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Wed, 17 Nov 2010 09:18:46 +0100 Subject: [wxruby-users] wxruby thread - gui updates In-Reply-To: References: Message-ID: Anyone know how to solve this?: On Thu, Oct 28, 2010 at 4:47 PM, Fabio Petrucci wrote: > Hi all, > > i've a question about ruby threads and gui update events: > > My app consist of several folders that needs to be updated depends on what > the user do. > > Actually all the gui updates occurs in response to the user actions into > the main wxruby process. > > It's just fine if the gui update takes short time but, sometimes, the gui > update is a long running task and the user get stuck waiting for the process > to complete. > > It would be nice to have gui update running on a separate thread. > > The first thing i thought was: > > ok i use the wxThread to update my long running gui task but unfortunately > it's not included in wxruby distribution. > > On the other side, using ruby thread in combination with Thread.pass is > good for external process not involving gui updates > > So, what is the right way to go to update gui interface on a separate > thread using wxruby? > > Any suggestion would greately appreciated. > > bio. > Is it the case to consider the inclusion of WxRuby Threads into the wxruby package? Thank you. bio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Nov 18 14:15:52 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Thu, 18 Nov 2010 20:15:52 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Can you help me? For example, I create the button: b = Wx::Button.new(@mypanel, 10, "This is button") evt_button(10){puts "This is button-10"} # Here is event for left-click mouse. Can you write event for b, but with the right click? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Nov 18 17:06:29 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Thu, 18 Nov 2010 23:06:29 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Else one question: how I can disable a button? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Nov 18 19:33:44 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Fri, 19 Nov 2010 01:33:44 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: <4f6637e4dd42073130286a1f571ded21@ruby-forum.com> I tried to add evt_right_dclick, for example, but this is an error: C:/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.1-x86-mingw32/lib/wx/classes/evthandler.rb:136:in `acquire_handler': Specify event handler with a method, name, proc OR block (ArgumentError) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 20 02:28:15 2010 From: lists at ruby-forum.com (Rolando Gaudin) Date: Sat, 20 Nov 2010 08:28:15 +0100 Subject: [wxruby-users] Error with require "wx" In-Reply-To: References: Message-ID: <171f6a421f89d12edfd90ef11511d8ca@ruby-forum.com> Hi, first uninstall the gem wxruby to avoid any potential conflicts and try 'gem install wxruby-ruby19',worked in Windows 7 x64 with RubyInstaller 1.9.2 p0. RoLo -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 20 06:24:19 2010 From: lists at ruby-forum.com (Marvin =?UTF-8?B?R8O8bGtlcg==?=) Date: Sat, 20 Nov 2010 12:24:19 +0100 Subject: [wxruby-users] Regards to Building of wxRuby 2.0.1 In-Reply-To: References: Message-ID: <1557c038ed43317ddbf98b9a73ea1ffb@ruby-forum.com> I have great news!! Today I upgraded my Arch Linux, and now wxRuby works just fine! :-D =================================== ? quintus at pegasus => ~ $ export LANG=en_US.utf8 ? quintus at pegasus => ~ $ pacman -Qi pixman Name : pixman Version : 0.20.0-1 URL : http://xorg.freedesktop.org Licenses : custom Groups : None Provides : None Depends On : glibc Optional Deps : None Required By : cairo xorg-server Conflicts With : None Replaces : None Installed Size : 528.00 K Packager : Jan de Groot Architecture : x86_64 Build Date : Mon 01 Nov 2010 11:25:44 PM CET Install Date : Sat 20 Nov 2010 01:12:04 PM CET Install Reason : Installed as a dependency for another package Install Script : No Description : Pixman library ? quintus at pegasus => ~ $ pacman -Qi wxgtk Name : wxgtk Version : 2.8.11-2 URL : http://wxwidgets.org Licenses : custom:wxWindows Groups : None Provides : None Depends On : gtk2 gstreamer0.10-base libgl libxxf86vm Optional Deps : None Required By : None Conflicts With : None Replaces : None Installed Size : 20292.00 K Packager : Eric Belanger Architecture : x86_64 Build Date : Mon 15 Nov 2010 10:32:17 PM CET Install Date : Sat 20 Nov 2010 01:12:12 PM CET Install Reason : Explicitly installed Install Script : No Description : GTK+ implementation of wxWidgets API for GUI ? quintus at pegasus => ~ $ uname -a Linux pegasus 2.6.35-ARCH #1 SMP PREEMPT Sat Oct 30 21:22:26 CEST 2010 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux ? quintus at pegasus => ~ $ ruby -v ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] ? quintus at pegasus => ~ $ gem list wxruby-ruby19 *** LOCAL GEMS *** wxruby-ruby19 (2.0.1 x86_64-linux) ? quintus at pegasus => ~ $ =================================== Even the bidgemo runs fine! I'll kick my Ubuntu Maverick and just leave a small Ubuntu Lucid installation for security reasons - I'm quite new to Arch, probably I break something. Yay, I'm excited! Vale, Marvin -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Nov 20 13:01:58 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Sat, 20 Nov 2010 19:01:58 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Else one question: how can I close the frame and stop the program? -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Sat Nov 20 19:35:38 2010 From: mario at ruby-im.net (Mario Steele) Date: Sat, 20 Nov 2010 19:35:38 -0500 Subject: [wxruby-users] evt_button + images_click In-Reply-To: References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: It is easy to do: evt_button(@button) do self.close end If that is the only window you have, the app should end on it's own, otherwise you will need to call Wx::App.exit_main_loop hth, Mario Sent from my iPod On Nov 20, 2010, at 1:01 PM, Misha Ognev wrote: > Else one question: how can I close the frame and stop the program? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From lists at ruby-forum.com Sun Nov 21 09:17:50 2010 From: lists at ruby-forum.com (Marvin =?UTF-8?B?R8O8bGtlcg==?=) Date: Sun, 21 Nov 2010 15:17:50 +0100 Subject: [wxruby-users] Regards to Building of wxRuby 2.0.1 In-Reply-To: References: Message-ID: And it gets even better - on Arch the precompiled wxruby-ruby19 gem from the RubyGems Index works - I really gonna miss the compilation... :-) Vale, Marvin -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Nov 21 15:49:41 2010 From: lists at ruby-forum.com (=?UTF-8?B?w4XCgXVrYXN6?= Korecki) Date: Sun, 21 Nov 2010 21:49:41 +0100 Subject: [wxruby-users] On Mac: undefined method `create_popup_menu' for # In-Reply-To: <275c4074afab20c6d6d31ac11180830f@ruby-forum.com> References: <275c4074afab20c6d6d31ac11180830f@ruby-forum.com> Message-ID: <317844c5a42eca61920e63701eebec6d@ruby-forum.com> Hi! The docs for TaskBarIcon provide you with an explanation: http://wxruby.rubyforge.org/doc/taskbaricon.html#TaskBarIcon_createpopupmenu If you aren't planning to add any menus for the dock icon you can simply use this method: https://gist.github.com/709130 Hope that helps! ?ukasz -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Nov 23 17:32:52 2010 From: lists at ruby-forum.com (Misha Ognev) Date: Tue, 23 Nov 2010 23:32:52 +0100 Subject: [wxruby-users] evt_button + images_click In-Reply-To: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: Thanks. Another question: how can I make in Wx::Frame a scrollbar(vertical)? I have big number of labels, that's not fit into screen. -- Posted via http://www.ruby-forum.com/. From dwilde1 at gmail.com Tue Nov 23 19:48:21 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Tue, 23 Nov 2010 16:48:21 -0800 Subject: [wxruby-users] Inserting RMagick RVG images in wxRuby Message-ID: Hello, all - I'm having a grand time making cpu stats for an embedded board show up in my ruby app, but I have run into a roadblock. I used RMagick's RVG graphics to create the graph, and it works fine when I just dump it to an image file such as .png. I'm trying to eliminate that step and write it directly to a panel in my Wx gui, but it appears -- and there's a statement in the docs that confirms it -- that RVG::Image != Magick::Image. I experimented quite a bit with the sample program that takes a RMagick image and inserts it, but I haven't been able to make those techniques work for RVG. Is there a conversion? I've started looking at the Wx GraphicsContext methodology, but it isn't as elegant. Suggestions? wxRuby 2.0.1 RMagick 2.12.1 Ubuntu 9.10 32 bit Ruby 1.87 p 302 -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at pressure.to Thu Nov 25 10:20:57 2010 From: alex at pressure.to (Alex Fenton) Date: Thu, 25 Nov 2010 15:20:57 +0000 Subject: [wxruby-users] evt_button + images_click In-Reply-To: References: <3d4a7dd729f63bfc57b0ba908c822b83@ruby-forum.com> Message-ID: <4CEE7ED9.40800@pressure.to> On 23/11/10 22:32, Misha Ognev wrote: > Another question: how can I make in Wx::Frame a scrollbar(vertical)? I > have big number of labels, that's not fit into screen. > Maybe Wx::ScrolledWindow? Have a look at the samples as there are several ways to use this class. The easiest way is with sizers where the scrolling will be calculated automatically for you. alex From alex at pressure.to Thu Nov 25 10:25:48 2010 From: alex at pressure.to (Alex Fenton) Date: Thu, 25 Nov 2010 15:25:48 +0000 Subject: [wxruby-users] wxruby thread - gui updates In-Reply-To: References: Message-ID: <4CEE7FFC.7030401@pressure.to> Hi > On Thu, Oct 28, 2010 at 4:47 PM, Fabio Petrucci > > wrote: > > Hi all, > > i've a question about ruby threads and gui update events: > > My app consist of several folders that needs to be updated depends > on what the user do. > > Actually all the gui updates occurs in response to the user > actions into the main wxruby process. > > It's just fine if the gui update takes short time but, sometimes, > the gui update is a long running task and the user get stuck > waiting for the process to complete. > Is it strictly GUI code that takes ages to run? What you could do if there is a lot of computation involved in updating the GUI is have the process which works out what needs to be changed running in a separate thread, then posting messages to the main thread so that the actual visual update takes place incrementally whilst the GUI remains responsive. Another option is just to run the updating code in an evt_idle loop - again, it will only happen when there is spare time to update the GUI. > It would be nice to have gui update running on a separate thread. > > The first thing i thought was: > > ok i use the wxThread to update my long running gui task but > unfortunately it's not included in wxruby distribution. > I don't think it will do anything that Ruby (1.9) native OS threads can't do? alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at pressure.to Thu Nov 25 10:13:19 2010 From: alex at pressure.to (Alex Fenton) Date: Thu, 25 Nov 2010 15:13:19 +0000 Subject: [wxruby-users] Inserting RMagick RVG images in wxRuby In-Reply-To: References: Message-ID: <4CEE7D0F.4070103@pressure.to> On 24/11/10 00:48, Don Wilde wrote: > I'm having a grand time making cpu stats for an embedded board show up > in my ruby app, but I have run into a roadblock. I used RMagick's RVG > graphics to create the graph, and it works fine when I just dump it to > an image file such as .png. I'm trying to eliminate that step and > write it directly to a panel in my Wx gui, but it appears -- and > there's a statement in the docs that confirms it -- that RVG::Image != > Magick::Image. I experimented quite a bit with the sample program that > takes a RMagick image and inserts it, but I haven't been able to make > those techniques work for RVG. Is there a conversion? > > I've started looking at the Wx GraphicsContext methodology, but it > isn't as elegant. Suggestions? I'm not completely sure I understand what you want to do - but I think the easiest way is to Wx tell RVG to render the vector at a given resolution in a well-known bitmap format (eg PNG), and then display that in Wx. You can bypass writing the rendered image to disk by using Image.read, and a StringIO if necessary - so it can just be passed about in memory. Re-render the image when the display size changes. You might find something useful in my Ruby Quiz response for a Wx Mathematical Image Generator: http://rubyquiz.strd6.com/quizzes/191-mathematical-image-generator alex From dwilde1 at gmail.com Thu Nov 25 12:02:21 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 09:02:21 -0800 Subject: [wxruby-users] Inserting RMagick RVG images in wxRuby In-Reply-To: <4CEE7D0F.4070103@pressure.to> References: <4CEE7D0F.4070103@pressure.to> Message-ID: On Thu, Nov 25, 2010 at 7:13 AM, Alex Fenton wrote: > On 24/11/10 00:48, Don Wilde wrote: > >> I'm having a grand time making cpu stats for an embedded board show up in >> my ruby app, but I have run into a roadblock. I used RMagick's RVG graphics >> to create the graph, and it works fine when I just dump it to an image file >> such as .png. I'm trying to eliminate that step and write it directly to a >> panel in my Wx gui, but it appears -- and there's a statement in the docs >> that confirms it -- that RVG::Image != Magick::Image. I experimented quite a >> bit with the sample program that takes a RMagick image and inserts it, but I >> haven't been able to make those techniques work for RVG. Is there a >> conversion? >> >> I've started looking at the Wx GraphicsContext methodology, but it isn't >> as elegant. Suggestions? >> > > > I'm not completely sure I understand what you want to do - but I think the > easiest way is to Wx tell RVG to render the vector at a given resolution in > a well-known bitmap format (eg PNG), and then display that in Wx. > > You can bypass writing the rendered image to disk by using Image.read, and > a StringIO if necessary - so it can just be passed about in memory. > Re-render the image when the display size changes. You might find something > useful in my Ruby Quiz response for a Wx Mathematical Image Generator: > http://rubyquiz.strd6.com/quizzes/191-mathematical-image-generator > > alex > Alex, thanks! Your presentation and the sample file in wxruby samples were outstanding and a heck of a lot of fun to play with. Some of the other demos get too cute for their own good, but yours was very clear. I am using it to figure out how to get my DC from point-painting to lines. I have decided to rework my code so that the graph-drawing code is embedded in the Window subclass and done completely in wx DC methodology. It's not as straightforwardly obvious and Ruby idiomatic, but I'm making it work and the code outside of the graph-drawing routine is getting much cleaner. -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwilde1 at gmail.com Thu Nov 25 12:41:16 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 09:41:16 -0800 Subject: [wxruby-users] Inserting RMagick RVG images in wxRuby In-Reply-To: References: <4CEE7D0F.4070103@pressure.to> Message-ID: On Thu, Nov 25, 2010 at 9:02 AM, Don Wilde wrote: > On Thu, Nov 25, 2010 at 7:13 AM, Alex Fenton wrote: > >> On 24/11/10 00:48, Don Wilde wrote: >> >>> I'm having a grand time making cpu stats for an embedded board show up in >>> my ruby app, but I have run into a roadblock. I used RMagick's RVG graphics >>> to create the graph, and it works fine when I just dump it to an image file >>> such as .png. I'm trying to eliminate that step and write it directly to a >>> panel in my Wx gui, but it appears -- and there's a statement in the docs >>> that confirms it -- that RVG::Image != Magick::Image. I experimented quite a >>> bit with the sample program that takes a RMagick image and inserts it, but I >>> haven't been able to make those techniques work for RVG. Is there a >>> conversion? >>> >>> I've started looking at the Wx GraphicsContext methodology, but it isn't >>> as elegant. Suggestions? >>> >> >> >> I'm not completely sure I understand what you want to do - but I think the >> easiest way is to Wx tell RVG to render the vector at a given resolution in >> a well-known bitmap format (eg PNG), and then display that in Wx. >> >> You can bypass writing the rendered image to disk by using Image.read, and >> a StringIO if necessary - so it can just be passed about in memory. >> Re-render the image when the display size changes. You might find something >> useful in my Ruby Quiz response for a Wx Mathematical Image Generator: >> http://rubyquiz.strd6.com/quizzes/191-mathematical-image-generator >> >> alex >> > > Alex, thanks! > > Your presentation and the sample file in wxruby samples were outstanding > and a heck of a lot of fun to play with. Some of the other demos get too > cute for their own good, but yours was very clear. I am using it to figure > out how to get my DC from point-painting to lines. > > I have decided to rework my code so that the graph-drawing code is embedded > in the Window subclass and done completely in wx DC methodology. It's not as > straightforwardly obvious and Ruby idiomatic, but I'm making it work and the > code outside of the graph-drawing routine is getting much cleaner. > > > I should mention that I do know who Alonzo Church is, thanks to John McCarthy. Am I dating myself from the LISPocene Era? :D -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwilde1 at gmail.com Thu Nov 25 12:41:16 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 09:41:16 -0800 Subject: [wxruby-users] Inserting RMagick RVG images in wxRuby In-Reply-To: References: <4CEE7D0F.4070103@pressure.to> Message-ID: On Thu, Nov 25, 2010 at 9:02 AM, Don Wilde wrote: > On Thu, Nov 25, 2010 at 7:13 AM, Alex Fenton wrote: > >> On 24/11/10 00:48, Don Wilde wrote: >> >>> I'm having a grand time making cpu stats for an embedded board show up in >>> my ruby app, but I have run into a roadblock. I used RMagick's RVG graphics >>> to create the graph, and it works fine when I just dump it to an image file >>> such as .png. I'm trying to eliminate that step and write it directly to a >>> panel in my Wx gui, but it appears -- and there's a statement in the docs >>> that confirms it -- that RVG::Image != Magick::Image. I experimented quite a >>> bit with the sample program that takes a RMagick image and inserts it, but I >>> haven't been able to make those techniques work for RVG. Is there a >>> conversion? >>> >>> I've started looking at the Wx GraphicsContext methodology, but it isn't >>> as elegant. Suggestions? >>> >> >> >> I'm not completely sure I understand what you want to do - but I think the >> easiest way is to Wx tell RVG to render the vector at a given resolution in >> a well-known bitmap format (eg PNG), and then display that in Wx. >> >> You can bypass writing the rendered image to disk by using Image.read, and >> a StringIO if necessary - so it can just be passed about in memory. >> Re-render the image when the display size changes. You might find something >> useful in my Ruby Quiz response for a Wx Mathematical Image Generator: >> http://rubyquiz.strd6.com/quizzes/191-mathematical-image-generator >> >> alex >> > > Alex, thanks! > > Your presentation and the sample file in wxruby samples were outstanding > and a heck of a lot of fun to play with. Some of the other demos get too > cute for their own good, but yours was very clear. I am using it to figure > out how to get my DC from point-painting to lines. > > I have decided to rework my code so that the graph-drawing code is embedded > in the Window subclass and done completely in wx DC methodology. It's not as > straightforwardly obvious and Ruby idiomatic, but I'm making it work and the > code outside of the graph-drawing routine is getting much cleaner. > > > I should mention that I do know who Alonzo Church is, thanks to John McCarthy. Am I dating myself from the LISPocene Era? :D -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwilde1 at gmail.com Thu Nov 25 17:57:00 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 14:57:00 -0800 Subject: [wxruby-users] direct painting on bitmap Message-ID: Hi, All - I've been getting closer and closer to a raw painting interface (see 'Inserting RMagick RVG images in wxRuby' for my starting point) and now what I'm working on (yes, I'm getting paid to work today; my kids are 3000 miles away so it's a welcome distraction) is drawing on a MemoryDC associated with a bitmap: @picture = Bitmap.new( size_x, size_y ) artist = MemoryDC.new artist.select_object @picture artist.set_background_mode SOLID artist.flood_fill( 160, 200, Colour.new( 240, 0, 0, 255 ) ) ... and later: paint_bitmap( @picture, client_size.x, client_size.y ) using the definition (part of my Window sub-class): def paint_bitmap bitmap, width, height bitmap = make_dummy if bitmap == nil # dummies for non-existant images (like cpu1 if single-thread) rescaled_bitmap = Bitmap.from_image( bitmap.convert_to_image.rescale( width, height ), -1 ) rescaled_bitmap.save_file( @fname, BITMAP_TYPE_XPM ) paint do | renderer | renderer.draw_bitmap( rescaled_bitmap, 0, 0, false ) end @sized = false end What appears to be happening is that my bitmaps are not taking over from the original contents of the memory arrays, because what I see being rendered appears to be garbage pages from the screen buffer. If I change something in my GUI (like pressing a button, which changes its color to yellow), I see smears of yellow showing up in my bitmaps and getting rendered in my GUI. The Bitmap#draw method referenced in the DC and MemoryDC docs appears to have gone bye-bye in 2.0, so I'm using the direct instantiation menthod. I finally got my copy of Smart and Hock and it says something about select_object not working if the bitmap is unpopulated, so my next try is to pull up a base bitmap from a file instead of creating one from new. Thanks in advance! :D -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwilde1 at gmail.com Thu Nov 25 18:19:43 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 15:19:43 -0800 Subject: [wxruby-users] direct painting on bitmap In-Reply-To: References: Message-ID: On Thu, Nov 25, 2010 at 2:57 PM, Don Wilde wrote: [snip] > @picture = Bitmap.new( size_x, size_y ) > artist = MemoryDC.new > artist.select_object @picture > artist.set_background_mode SOLID > artist.flood_fill( 160, 200, Colour.new( 240, 0, 0, 255 ) ) > > ... and later: > > paint_bitmap( @picture, client_size.x, client_size.y ) > > using the definition (part of my Window sub-class): > > def paint_bitmap bitmap, width, height > bitmap = make_dummy if bitmap == nil # dummies for non-existant > images (like cpu1 if single-thread) > rescaled_bitmap = Bitmap.from_image( > bitmap.convert_to_image.rescale( width, height ), -1 ) > rescaled_bitmap.save_file( @fname, BITMAP_TYPE_XPM ) > paint do | renderer | > renderer.draw_bitmap( rescaled_bitmap, 0, 0, false ) > end > @sized = false > end [snip] Bitmap#load_file is also gone, but Bitmap.new has a file option. Never rely on a first-release API to be as documented. ;-) Changing make_dummy to load a file got rid of the uninitialized bitmaps, but I still can't paint anything on them. The above code should leave me with a screaming red bitmap, but all I get is the white from my blank.png. -- -- Don Wilde ph: 512-394-8896 skype: donwilde1 e: dwilde1 at gmail.com "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwilde1 at gmail.com Thu Nov 25 18:36:25 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Thu, 25 Nov 2010 15:36:25 -0800 Subject: [wxruby-users] direct painting on bitmap In-Reply-To: References: Message-ID: On Thu, Nov 25, 2010 at 3:19 PM, Don Wilde wrote: [snip] > artist.flood_fill( 160, 200, Colour.new( 240, 0, 0, 255 ) ) >> >> Never mind. I just re-read the flood_fill docs and discovered that the Colour in the command is the BOUNDARY color, not the painting color. You can stop laughing now, hope you enjoyed. :D -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.ellis at bigladdersoftware.com Sat Nov 27 03:30:11 2010 From: peter.ellis at bigladdersoftware.com (Peter Ellis) Date: Sat, 27 Nov 2010 01:30:11 -0700 Subject: [wxruby-users] work-for-hire Message-ID: Calling all wxRuby developers, experts, and hackers! My company is looking to contract with one or more individuals to complete a pair of programming tasks as a work-for-hire. The tasks are improvements for an open-source project called wxSU--a glue layer that couples wxRuby to the Ruby API in Google SketchUp. Depending on the task, applicants should have expertise "under-the-hood" of wxRuby, wxWidgets, or Ruby, or experience with low-level GUI programming. See the full description of the tasks here: http://bigladdersoftware.com/wxruby.pdf Thanks! P From lists at ruby-forum.com Mon Nov 29 03:09:44 2010 From: lists at ruby-forum.com (Carlo Bertini) Date: Mon, 29 Nov 2010 09:09:44 +0100 Subject: [wxruby-users] wxruby is dead? Message-ID: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> I wanted to know whether the development of the project is still active or not. many bugs in the bug tracker are open from 25/03/2009 .... thank you very much Carlo Bertini -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Nov 29 04:41:28 2010 From: alex at pressure.to (Alex Fenton) Date: Mon, 29 Nov 2010 09:41:28 +0000 Subject: [wxruby-users] wxruby is dead? In-Reply-To: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> References: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> Message-ID: <4CF37548.1050901@pressure.to> Hi Carlo On 29/11/10 08:09, Carlo Bertini wrote: > I wanted to know whether the development of the project is still active > or not. > many bugs in the bug tracker are open from 25/03/2009 .... I wouldn't call a project with a stable, complete release across half a dozen platforms 'dead' - but it's true that little or no new code has been committed in the past 12 months or so since the release of 2.0.1. I led the development of 2.0 but have been doing other non-programming things, but am around on the mailing list along with other devs. Hibernation maybe? cheers alex From dwilde1 at gmail.com Mon Nov 29 10:13:04 2010 From: dwilde1 at gmail.com (Don Wilde) Date: Mon, 29 Nov 2010 07:13:04 -0800 Subject: [wxruby-users] wxruby is dead? In-Reply-To: <4CF37548.1050901@pressure.to> References: <93bd3b430de4f0be66b323fd601da903@ruby-forum.com> <4CF37548.1050901@pressure.to> Message-ID: On Mon, Nov 29, 2010 at 1:41 AM, Alex Fenton wrote: > Hi Carlo > > > On 29/11/10 08:09, Carlo Bertini wrote: > >> I wanted to know whether the development of the project is still active >> or not. >> many bugs in the bug tracker are open from 25/03/2009 .... >> > > > I wouldn't call a project with a stable, complete release across half a > dozen platforms 'dead' - but it's true that little or no new code has been > committed in the past 12 months or so since the release of 2.0.1. I led the > development of 2.0 but have been doing other non-programming things, but am > around on the mailing list along with other devs. Hibernation maybe? > > Alex, if that is the case it would be very good if we (and I include myself as a sacrificial offering) could get the docs updated to match the new code base. It is very frustrating to discover that half the 'overviews' are gone completely, and wxRuby is vastly different from wxC++ in the way things like Device Contexts and such are instantiated. I have been able to get my code to work well (after reading and re-RTFM-ing), but I'll bet it would be even better if I knew the little bits of tribal knowledge that you have stored in your collective brains. -- -- Don Wilde "If you are creative and add value to the world, sleep well. You've earned it." -------------- next part -------------- An HTML attachment was scrubbed... URL: