From lists at ruby-forum.com Sat Oct 3 00:04:55 2009 From: lists at ruby-forum.com (Nathan Esquenazi) Date: Sat, 3 Oct 2009 06:04:55 +0200 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> Message-ID: <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> Any update to getting this to work. I have the same problem. In snow leopard, I tried this: $ sudo gem install wxruby and I get this /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle, 9): no suitable image found. Did find: (LoadError) /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle which among others makes me curious why v. 1.9.3 is the default installed even though it is an outdated version. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Oct 3 21:57:46 2009 From: lists at ruby-forum.com (Michael Daly) Date: Sun, 4 Oct 2009 03:57:46 +0200 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> Message-ID: <234d958040c7d229788b923d2813b277@ruby-forum.com> Nathan Esquenazi wrote: > Any update to getting this to work. I have the same problem. In snow > leopard, I tried this: > > $ sudo gem install wxruby > > and I get this > > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: > dlopen(/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle, > 9): no suitable image found. Did find: (LoadError) > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: > no matching architecture in universal wrapper - > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle > > which among others makes me curious why v. 1.9.3 is the default > installed even though it is an outdated version. I haven't had any success. After trying to compile the dependencies needed to compile the wxRuby source (and failing at many points) I eventually gave up. I'm hoping that someone with a bit more Mac experience may come along and help out, but until then I fear we're out of luck. Mike -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Oct 5 08:55:32 2009 From: alex at pressure.to (Alex Fenton) Date: Mon, 05 Oct 2009 13:55:32 +0100 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> Message-ID: <4AC9ECC4.4000208@pressure.to> Nathan Esquenazi wrote: > Any update to getting this to work. I have the same problem. In snow > leopard, I tried this: > > $ sudo gem install wxruby > > and I get this > > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: > dlopen(/Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle, > 9): no suitable image found. Did find: (LoadError) > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle: > no matching architecture in universal wrapper - > /Library/Ruby/Gems/1.8/gems/wxruby-1.9.3-universal-darwin/lib/wxruby2.bundle > > which among others makes me curious why v. 1.9.3 is the default > installed even though it is an outdated version. > I don't know why Rubygems does this sometimes, but the remote install fails to find the correct version. If this happens download the latest gem version from file download page on Rubyforge and call sudo gem install wxruby in the same directory as the downloaded file, or instead of 'wxruby' give the file path. But this probably won't work because we have only built on 32-bit arch for OS X, using 10.5 alex From alex at pressure.to Mon Oct 5 08:52:52 2009 From: alex at pressure.to (Alex Fenton) Date: Mon, 05 Oct 2009 13:52:52 +0100 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: <234d958040c7d229788b923d2813b277@ruby-forum.com> References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> <234d958040c7d229788b923d2813b277@ruby-forum.com> Message-ID: <4AC9EC24.2040901@pressure.to> Michael Daly wrote: > I haven't had any success. After trying to compile the dependencies > needed to compile the wxRuby source (and failing at many points) I > eventually gave up. If you have the Mac Developer Tools installed, I don't think there should be any dependencies - wxWidgets, Ruby and SWIG should already be installed. Unless, possibly the version of SWIG isn't compatible. > I'm hoping that someone with a bit more Mac > experience may come along and help out, but until then I fear we're out > of luck. I'm going to upgrade to 10.6 in the near future so will be looking at this shortly. alex From lists at ruby-forum.com Mon Oct 5 23:11:09 2009 From: lists at ruby-forum.com (Zhimin Zhan) Date: Tue, 6 Oct 2009 05:11:09 +0200 Subject: [wxruby-users] Segmentation fault on BitmapComboBox.get_string Message-ID: Hi, BitmapComboBox displays and sends events fine, but failed to return string value. Error: wxToolBar.rbw:67: [BUG] Segmentation fault ruby 1.8.6 (2008-03-03) [i386-mswin32] Also failed on Ruby mingw 1.8.6 ruby 1.8.6 (2009-08-04) [i386-mingw32] wxRuby v2.0.1 mingw Code (wxToolBar.rbw - modified) bitmap_combo = Wx::BitmapComboBox.new(tb, cbID, "") tb.add_control(bitmap_combo) evt_combobox(cbID) {|event| bitmap_combo.get_string_selection #line 67 on_combo(event) } Zhimin -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Oct 6 03:22:28 2009 From: lists at ruby-forum.com (Nathan Esquenazi) Date: Tue, 6 Oct 2009 09:22:28 +0200 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: <4AC9ECC4.4000208@pressure.to> References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> <4AC9ECC4.4000208@pressure.to> Message-ID: <611f1496f43ecd4cfb071ff2a72044f8@ruby-forum.com> Thanks for the update guys. Yea, I actually did end up manually downloading the latest version from the rubyforge site and trying to install it that way with the result being the same error but for the new version. LoadError: dlopen(/Library/Ruby/Gems/1.8/gems/wxruby-2.0.1-universal-darwin-9/lib/wxruby2.bundle, 9): no suitable image found. Did find: /Library/Ruby/Gems/1.8/gems/wxruby-2.0.1-universal-darwin-9/lib/wxruby2.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/wxruby-2.0.1-universal-darwin-9/lib/wxruby2.bundle There should be a way around this, at the very least as an alternative, consider pushing the gem to gemcutter.org which is as simple as gem publishing can get and it almost certainly won't have this version problem. Then the gem can be installed with $ gem install wxruby --source http://gemcutter.org -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Oct 6 10:25:07 2009 From: lists at ruby-forum.com (Chris Mowforth) Date: Tue, 6 Oct 2009 16:25:07 +0200 Subject: [wxruby-users] Printing plain text directly without dialogues In-Reply-To: <1d8d4a860906241532t1387f8c1kba08e7d5d27258a2@mail.gmail.com> References: <1d8d4a860906241532t1387f8c1kba08e7d5d27258a2@mail.gmail.com> Message-ID: <73cbcbac92b94a7d97c75e540cc84d1a@ruby-forum.com> Have you tried cups? (cups.rubyforge.org). UNIX only, unfortunately, but it's a bit easier to get up & running with it. m0wf -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Oct 11 23:14:45 2009 From: lists at ruby-forum.com (Philip Stephens) Date: Mon, 12 Oct 2009 05:14:45 +0200 Subject: [wxruby-users] How to use menuitems Message-ID: <7a0652a4f987b854573038ff796236ef@ruby-forum.com> When I try to work with menus I get the following error message after selecting "Red" from the colour menu. The following code produces the following error message. What am I doing wrong and how do I fix it. Thank you in advance. - Philip EtestApp.rb:57:in `do_Red': undefined method ===>`check'<==== for 109:Fixnum (NoMethodError) from EtestApp.rb:34:in `initialize' (now line 125) Etest.rb # This class was automatically generated from XRC source. It is not # recommended that this file is edited directly; instead, inherit from # this class and extend its behaviour there. # # Source file: Etest.xrc # Generated at: Sun Oct 11 20:05:09 -0600 2009 class EyesFrame < Wx::Frame attr_reader :m_statictext7, :m_textrednumber, :m_statictext9, :m_textgreennumber, :m_statictext11, :m_textbluenumber, :m_buttonchange, :m_menubar1, :m_menu1, :m_miexit, :m_menucolour, :m_mired, :m_migreen, :m_miblue, :m_miwhite def initialize(parent = nil) super() xml = Wx::XmlResource.get xml.flags = 2 # Wx::XRC_NO_SUBCLASSING xml.init_all_handlers xml.load("Etest.xrc") xml.load_frame_subclass(self, parent, "MyFrame") finder = lambda do | x | int_id = Wx::xrcid(x) begin Wx::Window.find_window_by_id(int_id, self) || int_id # Temporary hack to work around regression in 1.9.2; remove # begin/rescue clause in later versions rescue RuntimeError int_id end end @m_statictext7 = finder.call("m_staticText7") @m_textrednumber = finder.call("m_textRedNumber") @m_statictext9 = finder.call("m_staticText9") @m_textgreennumber = finder.call("m_textGreenNumber") @m_statictext11 = finder.call("m_staticText11") @m_textbluenumber = finder.call("m_textBlueNumber") @m_buttonchange = finder.call("m_buttonchange") @m_menubar1 = finder.call("m_menubar1") @m_menu1 = finder.call("m_menu1") @m_miexit = finder.call("m_miexit") @m_menucolour = finder.call("m_menuColour") @m_mired = finder.call("m_miRed") @m_migreen = finder.call("m_miGreen") @m_miblue = finder.call("m_miBlue") @m_miwhite = finder.call("m_miwhite") if self.class.method_defined? "on_init" self.on_init() end end end Etest.App.rb begin require 'rubygems' rescue LoadError end require 'wx' require 'Etest.rb' class AppFrame < EyesFrame # Inherit from the generated base class and set up event handlers # set up pen and brush colours @red_value = 0 @green_value = 0 @blue_value = 0 # Create Needed Brushes and Pens BG_BRUSH = Wx::Brush.new @fg_pen = Wx::Pen.new @font = Wx::NULL_FONT @text_colour = Wx::NULL_COLOUR def initialize() super() @font = Wx::Font.new(50,Wx::FONTFAMILY_TELETYPE, Wx::FONTSTYLE_NORMAL,Wx::FONTWEIGHT_NORMAL) BG_BRUSH.set_colour(255,0, 0) # Setup the actual data to be stored in Brushes and Pens do_rndValues evt_button(@m_buttonchange) { do_rndValues } evt_paint { on_paint } evt_menu(@m_mired) { do_Red} evt_menu(@m_migreen) { do_Green } evt_menu(@m_miblue) { do_Blue } evt_menu(@m_miwhite) { do_white } end def do_rndValues @red_value = rand(255) @green_value = rand(255) @blue_value = rand(255) @m_textrednumber.label = @red_value.to_s @m_textgreennumber.label = @green_value.to_s @m_textbluenumber.label = @blue_value.to_s refresh() end def do_Red() @red_value = 255 @green_value = 0 @blue_value = 0 @m_textrednumber.label = @red_value.to_s @m_textgreennumber.label = @green_value.to_s @m_textbluenumber.label = @blue_value.to_s @m_mired.check(true) @m_migreen.check(false) @m_miblue.check(false) @m_miwhite.check(false) refresh() end def on_paint # We do our drawing now rect = self.get_client_size paint do |dc| gdc = Wx::GraphicsContext.create(dc) # draw rectangle temp_brush = gdc.create_brush(BG_BRUSH) gdc.set_brush(temp_brush) x = 0 y = 0 w = 300 h = 260 gdc.draw_rectangle(x,y,w,h) end # paint do end # on paint end Wx::App.run do AppFrame.new.show end -- Posted via http://www.ruby-forum.com/. From max-braeu at gmx.de Mon Oct 12 08:15:11 2009 From: max-braeu at gmx.de (Maximilian =?ISO-8859-1?Q?Br=E4utigam?=) Date: Mon, 12 Oct 2009 14:15:11 +0200 Subject: [wxruby-users] AcceleratorTable to "tab" the formular & trapping signals from frame border buttons Message-ID: <1255349711.9673.17.camel@localhost> Hi all, I have two problems and I would be very happy if we could solve them. Thanks in advance. my first problem: I want to realise a formular for user input that is able to switch the activated TextCtrl (there are a few) by clicking "TAB". It is quiet easy to trap the Tab click but I have no idea how to handle the "activation" of the next TextCtrl. Maybe the solution is simple but I don't see it?! ;( Code so far: acc_table = Wx::AcceleratorTable[ [ Wx::ACCEL_NORMAL, Wx::K_TAB, 8001 ] ] self.accelerator_table = acc_table evt_menu(8001) { puts "what to do?" } my second problem: how do I trap a signal from the window border icons - I don't know how it is called, I mean "minimize", "maximize" and "exit" buttons in the upper right corner? If you want to see the whole project: http://labdiary.sourceforge.net/ Help is always welcome. Thank you very much! Kind regards, der Max From lists at ruby-forum.com Thu Oct 15 16:53:58 2009 From: lists at ruby-forum.com (Haris Bogdanovic) Date: Thu, 15 Oct 2009 22:53:58 +0200 Subject: [wxruby-users] problem installing wxruby on linux Message-ID: Hi. I installed wxruby with 'gem install wxruby' and everything went ok. Then I installed wxwidgets (wx2.8) and wx-common. I run irb and write: require 'rubygems' require 'wx' and get the following error: #----------------- LoadError: libwx_gtk2u_stc-2.8.so.0: cannot open shared object file: No such file or directory - /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so from /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /home/haris/.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 (irb):3 from /usr/lib/ruby/1.8/rubygems/requirement.rb:22 #-------------------- wxruby2.so is present in /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/ directory along with wx.rb Why am I getting this error ? Thanks. Haris. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Oct 21 08:42:19 2009 From: lists at ruby-forum.com (Dave Cameron) Date: Wed, 21 Oct 2009 14:42:19 +0200 Subject: [wxruby-users] wxRuby on Snow Leopard 10.6 In-Reply-To: <4AC9ECC4.4000208@pressure.to> References: <58e0a1adfb1f891d12cde0bb83dc202f@ruby-forum.com> <4AB88CE0.9010708@pressure.to> <5e7accd53176ab0f9a11ac8edfd7f1b1@ruby-forum.com> <4AC9ECC4.4000208@pressure.to> Message-ID: Alex Fenton wrote: > I don't know why Rubygems does this sometimes, but the remote install > fails to find the correct version. Judging by the listing at http://gemcutter.org, the platform string for v1.9.3 does not specify a darwin version, it is only "universal-darwin"[1]. Subsequent gems specify "universal-darwin-9". Since Snow Leopard's platform string is "universal-darwin-10"[2] v1.9.3 matches Snow Leopard[3] and it will be selected for installation. I just ran in to this problem with the wxruby gem too. I'm fairly new to ruby and gems, so I did the research above to try to understand what was going on. Hopefully it is not too obvious and can help someone. I'm hoping for a gem for darwin-10 soon too. Cheers, Dave Cameron [1] http://gemcutter.org/gems/wxruby/versions [2] you can check this by running `gem environment` [3] matching is explained in `gem help platforms` -- Posted via http://www.ruby-forum.com/. From stefano.grioni at gmail.com Thu Oct 22 13:27:11 2009 From: stefano.grioni at gmail.com (Stefano Grioni) Date: Thu, 22 Oct 2009 19:27:11 +0200 Subject: [wxruby-users] WXRuby crashes on Debian SID Message-ID: <4AE095EF.4030507@gmail.com> Hello, When I install wxruby using the gem on my Debian Sid, I cannot make it work : $ ruby /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: symbol _ZN9wxListBox13EnsureVisibleEi, version WXU_2.8 not defined in file libwx_gtk2u_core-2.8.so.0 with link time reference - /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb:8 I also tried to compile it from sources but it complained that SWIG <= 1.3.38 is supported, whereas 1.3.40-2 is installed. Are the two element related? Do you think you may use some help solving that issue (I'm no C/C++ guru however)? Best regards From lists at ruby-forum.com Thu Oct 22 23:05:48 2009 From: lists at ruby-forum.com (Sti Ev3) Date: Fri, 23 Oct 2009 05:05:48 +0200 Subject: [wxruby-users] wxRuby 2.0.1 on Ubuntu 9.10 In-Reply-To: <41ce0aaadd809d434d29f44300972fc3@ruby-forum.com> References: <61c507640909102017s3a23f278oc24a20af6f668d4d@mail.gmail.com> <41ce0aaadd809d434d29f44300972fc3@ruby-forum.com> Message-ID: <8c4086dba544d548bac2bd70c78b2f8d@ruby-forum.com> Ran into this today on Ubuntu 9.10, ruby 1.8.7. Not having much success finding solutions. /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: symbol _ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU_2.8.5 not defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so (LoadError) -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Fri Oct 23 08:36:11 2009 From: alex at pressure.to (Alex Fenton) Date: Fri, 23 Oct 2009 13:36:11 +0100 Subject: [wxruby-users] WXRuby crashes on Debian SID In-Reply-To: <4AE095EF.4030507@gmail.com> References: <4AE095EF.4030507@gmail.com> Message-ID: <4AE1A33B.40600@pressure.to> hi Stefano Grioni wrote: > When I install wxruby using the gem on my Debian Sid, I cannot make it > work : > > $ ruby > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb > > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > symbol _ZN9wxListBox13EnsureVisibleEi, version WXU_2.8 not defined in > file libwx_gtk2u_core-2.8.so.0 with link time reference - > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so > (LoadError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/samples/minimal/minimal.rb:8 > Just about every distro uses their own configuration and version of wxWidgets, so we only support the commonest (Ubuntu) officially. I guess from your message that the Debian config of wxWidgets isn't compatible with the wxRuby gem. > I also tried to compile it from sources but it complained that SWIG <= > 1.3.38 is supported, whereas 1.3.40-2 is installed. Yes, the right way forward should be to compile your own wxRuby - you should only need g++, wxwidgets-dev package and SWIG. What the message is telling you is tha tonly swig LESS THAN 1.3.38 is supported - shortly after wxRuby 2.0 was released, SWIG made some incompatible changes. SWIG is easy to compile from scratch if you want to build your own version 1.3.38. You could install it in a custom location like /usr/local/bin so the system version is untouched. IF you want to install it somewhere out of PATH, but use it just for the wxRuby build, you can tell rake to use a special swig when building like this: rake SWIG_CMD=/path/to/swig1-3-38 cheers alex From lists at ruby-forum.com Fri Oct 23 09:38:24 2009 From: lists at ruby-forum.com (Steve cd) Date: Fri, 23 Oct 2009 15:38:24 +0200 Subject: [wxruby-users] wxRuby 2.0.1 on Ubuntu 9.10 In-Reply-To: <8c4086dba544d548bac2bd70c78b2f8d@ruby-forum.com> References: <61c507640909102017s3a23f278oc24a20af6f668d4d@mail.gmail.com> <41ce0aaadd809d434d29f44300972fc3@ruby-forum.com> <8c4086dba544d548bac2bd70c78b2f8d@ruby-forum.com> Message-ID: <24c4532f9c0717a9593b7808720ffddc@ruby-forum.com> After reading around, I've tried to compile from source following the wiki but it's not working out. SWIG Version 1.3.36 gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) wx-config --version 2.8.10 ... Class: GLCanvas : Window class wxGLCanvas g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DwxABI_VERSION=208010 -fno-strict-aliasing -g -g -O2 -fPIC -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o obj/GLCanvas.o src/GLCanvas.cpp In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, from src/GLCanvas.cpp:2207: /usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such file or directory /usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such file or directory /usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such file or directory In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, from src/GLCanvas.cpp:2207: /usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: ?GLXContext? does not name a type /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids declaration of ?GLXFBConfig? with no type /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected ?;? before ?*? token rake aborted! Command failed with status (1): [g++ -c -I/usr/lib/wx/include/gtk2-unicod...] -- Posted via http://www.ruby-forum.com/. From timo at orangeorb.de Fri Oct 23 12:01:13 2009 From: timo at orangeorb.de (Timo Springmann) Date: Fri, 23 Oct 2009 18:01:13 +0200 Subject: [wxruby-users] Change title of first menu in Mac OS Message-ID: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> Hi List, currently I'm experimenting with wxRuby. I'm want to create a multi- platform application which feels native on all three systems (OS X, Linux, Windows). Currently one small thing is bohering me on Mac OS. My applications first menu is _alway_ called "ruby". I would like my applications name to be the first menu-name like in every other OS X application. I tried setting app_name, vendor_name, class_name of my App class, but it doen't help. Any ideas? Regards, Timo From mario at ruby-im.net Fri Oct 23 17:57:14 2009 From: mario at ruby-im.net (Mario Steele) Date: Fri, 23 Oct 2009 17:57:14 -0400 Subject: [wxruby-users] Change title of first menu in Mac OS In-Reply-To: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> References: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> Message-ID: Hello Timo, This has been discussed before. The reason for the problem, is that Mac OS X uses executable bundle name for the first entry, so if you want to change the name, you need to make a copy of the ruby interpreter, and rename it as your App name, then create a script, to actually execute it. Example: Application name is Rudle [eumario at localhost: ~/Rudle] cp /usr/bin/ruby . [eumario at localhost: ~/Rudle] mv ruby Rudle [eumario at localhost: ~/Rudle] echo "Rudle app/rudle.rb" rudle [eumario at localhost: ~/Rudle] chmod a+x rudle On Fri, Oct 23, 2009 at 12:01 PM, Timo Springmann wrote: > Hi List, > > currently I'm experimenting with wxRuby. I'm want to create a > multi-platform application which feels native on all three systems (OS X, > Linux, Windows). Currently one small thing is bohering me on Mac OS. My > applications first menu is _alway_ called "ruby". I would like my > applications name to be the first menu-name like in every other OS X > application. I tried setting app_name, vendor_name, class_name of my > App class, but it doen't help. > > Any ideas? > > Regards, > Timo > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From timo at orangeorb.de Sat Oct 24 05:02:47 2009 From: timo at orangeorb.de (Timo Springmann) Date: Sat, 24 Oct 2009 11:02:47 +0200 Subject: [wxruby-users] Change title of first menu in Mac OS In-Reply-To: References: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> Message-ID: Hi, thanks for the quick answer. Before I wrote to the list I was searching for this "problem" bt I couldn't find the mentioned discussion. Do you have a link? Regards, Timo Am 23.10.2009 um 23:57 schrieb Mario Steele: > This has been discussed before. The reason for the problem, is that > Mac OS X uses executable bundle name for the first entry, so if you > want to change the name, you need to make a copy of the ruby > interpreter, and rename it as your App name, then create a script, > to actually execute it. > > On Fri, Oct 23, 2009 at 12:01 PM, Timo Springmann > wrote: > Hi List, > > currently I'm experimenting with wxRuby. I'm want to create a multi- > platform application which feels native on all three systems (OS X, > Linux, Windows). Currently one small thing is bohering me on Mac OS. > My applications first menu is _alway_ called "ruby". I would like my > applications name to be the first menu-name like in every other OS X > application. I tried setting app_name, vendor_name, class_name > of my App class, but it doen't help. > > Any ideas? > > Regards, > Timo > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > -- > Mario Steele > http://www.trilake.net > http://www.ruby-im.net > http://rubyforge.org/projects/wxruby/ > http://rubyforge.org/projects/wxride/ > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From timo at orangeorb.de Sat Oct 24 05:17:09 2009 From: timo at orangeorb.de (Timo Springmann) Date: Sat, 24 Oct 2009 11:17:09 +0200 Subject: [wxruby-users] Working with ListCtrl and ListItem Message-ID: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> Hi List, I'm trying to get my ListCtrl to work. Currently I've managed to fill my ListCtrl with items, but I think it's not the most beautiful way: class MyList < Wx::ListCtrl def initialize(parent, *args) super(parent, :style => Wx::LC_REPORT|LC_HRULES ) create_layout fill_list end def create_layout self.insert_column(0, "Name") self.insert_column(1, "Code") self.insert_column(2, "Desc") self.set_column_width(0,80) self.set_column_width(1,100) self.set_column_width(2,150) end def fill_list i=0 DataObject.find(:all).each do |data| self.insert_item(i, data.name) self.set_item(i,1,data.code) self.set_item(i,2,data.description) i = i + 1 end end I think it would be better to subclass Wx::ListItem and add instances of this class to the List. Something like this (not tested): class MyListItem < Wx::ListItem def initialize(data_object, *args) super(*args) # here I need to add the column data, but I don't know how end end my_list.add_item(MyListItem.new(data_object)) But I have no idea how I can fill the columns in my ListItem-Object. Any ideas how I can do this? I think it should work with ListItem#set_data and/or ListItem#set_column but I don't understand the docs. Regards, Timo From alex at pressure.to Sat Oct 24 07:01:37 2009 From: alex at pressure.to (Alex Fenton) Date: Sat, 24 Oct 2009 12:01:37 +0100 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> Message-ID: <4AE2DE91.8010302@pressure.to> hi timo Timo Springmann wrote: ... > I think it would be better to subclass Wx::ListItem and add instances > of this class to the List. Something like this (not tested): > > class MyListItem < Wx::ListItem > def initialize(data_object, *args) > super(*args) > # here I need to add the column data, but I don't know how > end > end > > my_list.add_item(MyListItem.new(data_object)) > > But I have no idea how I can fill the columns in my ListItem-Object. > Any ideas how I can do this? I think it should work with > ListItem#set_data and/or ListItem#set_column but I don't understand > the docs. Yes, the wxWidgets API for working with multiple columns is not so obvious. You do need to have one ListItem for every single cell - you can't combine several columns of a single row into one. Have a look at this thread: http://rubyforge.org/pipermail/wxruby-users/2009-September/004955.html If you have an underlying data model eg linked to a RDBMS, it can be a lot tidier to use Wx::LISTCTRL_VIRTUAL, and supply a set of methods to populate the listctrl automatically. Take a look at the samples dir (there's an example in sapmles/bigdemo I think). cheers alex From alex at pressure.to Sat Oct 24 07:08:26 2009 From: alex at pressure.to (Alex Fenton) Date: Sat, 24 Oct 2009 12:08:26 +0100 Subject: [wxruby-users] Change title of first menu in Mac OS In-Reply-To: References: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> Message-ID: <4AE2E02A.4090703@pressure.to> Mario Steele wrote: > This has been discussed before. The reason for the problem, is that > Mac OS X uses executable bundle name for the first entry, so if you > want to change the name, you need to make a copy of the ruby > interpreter, and rename it as your App name, then create a script, to > actually execute it. Just to add to what Mario said - if it's a "bare" compiled executable on OS X, then the filename of the executable (eg "ruby") is automatically the name of the application menu, as you've found. You can change the name of the executable. I think it should also be possible to do this by bundling the whole lot into a "proper" Mac OS application bundle, which is a special sort of directory with a properties list. Have a look for searches on this list which discuss "Platypus", and perhaps something here on wxPython: http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X also have a look at this work by Daniel Zepeda, wihch generalised some things I'd done to get a completely native-feeling GUI app on OS X (dealing with things like icon etc). http://www.ruby-forum.com/topic/184701 cheers alex From timo at orangeorb.de Sat Oct 24 11:28:24 2009 From: timo at orangeorb.de (Timo Springmann) Date: Sat, 24 Oct 2009 17:28:24 +0200 Subject: [wxruby-users] Change title of first menu in Mac OS In-Reply-To: <4AE2E02A.4090703@pressure.to> References: <932F4BF6-DC53-4325-9021-2596E19970A4@orangeorb.de> <4AE2E02A.4090703@pressure.to> Message-ID: Hi Alex, Am 24.10.2009 um 13:08 schrieb Alex Fenton: > Mario Steele wrote: >> This has been discussed before. The reason for the problem, is >> that Mac OS X uses executable bundle name for the first entry, so >> if you want to change the name, you need to make a copy of the ruby >> interpreter, and rename it as your App name, then create a script, >> to actually execute it. > > Just to add to what Mario said - if it's a "bare" compiled > executable on OS X, then the filename of the executable (eg "ruby") > is automatically the name of the application menu, as you've found. > You can change the name of the executable. Thanks for pointing me into the right direction. I'll take a look into this later. First the application has to be written... > also have a look at this work by Daniel Zepeda, wihch generalised > some things I'd done to get a completely native-feeling GUI app on > OS X (dealing with things like icon etc). > > http://www.ruby-forum.com/topic/184701 This sound _very_ interesting, but the git url in the announcement doesn't work anymore. Any idea where I can get wxRubyTemplate from? Regards, Timo From lists at ruby-forum.com Sat Oct 24 20:50:07 2009 From: lists at ruby-forum.com (Doug Sands) Date: Sun, 25 Oct 2009 02:50:07 +0200 Subject: [wxruby-users] wxruby2.so: [BUG] Segmentation fault on require 'wx' Message-ID: <8e582b983cdbff64769163e09c394998@ruby-forum.com> Hi -- I am trying to get ruby 1.9 to run on my Windows Vista Ultimate computer with and Intel 32 bit processor and all OS updates applied. I installed ruby 1.9 on October 23, 2009 using the zip file (ruby-1.9.1-p129-i386-mswin32.zip) and the instructions located at: http://blog.orangecabin.com/2009/05/install-ruby-1-9-on-windows-using-zip-binary/. I was able to run several simple scripts. So far so good. I then went after wxruby and got it installed following the instructions at http://wxruby.rubyforge.org/svn/trunk/wxruby/INSTALL I tried to execute minimal.rb. Running it in any fashion from the command line e.g. ruby minimal.rb ruby -rubygems minimal.rb generated the error output you see below. I eliminated all the code and can produce the crash and the same output just by requiring 'rubygems' and 'wx'. I called that file mini.rb and it is below. It will fail if the only two lines are: require 'rubygems' require 'wx' I searched around on the forums for a solution and have found none so I am posting and asking for help. In searching I've seen requests for the output of gem env and ruby -v so they are below too. gem update system returns Nothing to update. Thanks to anyone who can help and everyone who tries. Doug #### this is mini.rb <><><><><><><><><><><><><><> #!/usr/bin/env ruby # wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team # Freely reusable code: see SAMPLES-LICENSE.TXT for details begin require 'rubygems' rescue LoadError end require 'wx' <><><><><><><><><><><><><><> C:\Program Files\Applications\Ruby\lib\ruby\gems\1.9.1\gems\wxruby-2.0.1-x86-mswin32-60\samples\minimal>ruby -rubygems mini.rb C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wxruby2.so: [BUG] Segmentation fault ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] -- control frame ---------- c:0008 p:-9088168 s:0021 b:0021 l:000020 d:000020 TOP c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :require c:0006 p:0011 s:0015 b:0015 l:000014 d:000014 TOP C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wx.rb:12 c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0038 s:0006 b:0006 l:0001ac d:002364 EVAL mini.rb:9 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:0001ac d:0001ac TOP --------------------------- -- Ruby level backtrace information----------------------------------------- C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wx.rb:12:in `require' C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wx.rb:12:in `' mini.rb:9:in `require' mini.rb:9:in `
' [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. <><><><><><><><><><><><><><> C:\>ruby -v ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] <><><><><><><><><><><><><><> C:\>gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129) [i386-mswin32] - INSTALLATION DIRECTORY: C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1 - RUBYGEMS PREFIX: C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5 - RUBY EXECUTABLE: "C:/Program Files/Applications/Ruby/bin/ruby.exe" - EXECUTABLE DIRECTORY: C:/Program Files/Applications/Ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - C:/Program Files/Applications/Ruby/lib/ruby/gems/1.9.1 - C:/Users/Doug/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://gems.rubyforge.org/ <><><><><><><><><><><><><><> -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Sun Oct 25 08:04:28 2009 From: alex at pressure.to (Alex Fenton) Date: Sun, 25 Oct 2009 12:04:28 +0000 Subject: [wxruby-users] wxruby2.so: [BUG] Segmentation fault on require 'wx' In-Reply-To: <8e582b983cdbff64769163e09c394998@ruby-forum.com> References: <8e582b983cdbff64769163e09c394998@ruby-forum.com> Message-ID: <4AE43ECC.80309@pressure.to> hi doug Doug Sands wrote: > I am trying to get ruby 1.9 to run on my Windows Vista Ultimate computer > with and Intel 32 bit processor and all OS updates applied. > I installed ruby 1.9 on October 23, 2009 using the zip file > (ruby-1.9.1-p129-i386-mswin32.zip) ... > C:/Program > Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wxruby2.so: > [BUG] Segmentation fault > ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] it looks like you may be using the wxruby gem built for Ruby version 1.8 - these are not compatible with Ruby 1.9. We don't currently have a wxruby gem for Ruby 1.9 built with the microsoft compiler, but you can use wxRuby and ruby 1.9 built with the mingw compiler. If you got to the download page: http://rubyforge.org/frs/?group_id=35 you'll see a mingw-...-setup.exe package. This is an all-in-one development environment for Windows and Ruby 1.9, with wxruby already installed. This should have you up and running quickly for GUI dev on MS windows. The one-click installer for ruby has moved to using MingW, so it's our best guess as wxRuby developers that this is future platform for ruby on windows. alex From lists at ruby-forum.com Sun Oct 25 09:05:12 2009 From: lists at ruby-forum.com (Doug Sands) Date: Sun, 25 Oct 2009 14:05:12 +0100 Subject: [wxruby-users] wxruby2.so: [BUG] Segmentation fault on require 'wx' In-Reply-To: <4AE43ECC.80309@pressure.to> References: <8e582b983cdbff64769163e09c394998@ruby-forum.com> <4AE43ECC.80309@pressure.to> Message-ID: <7062aeb71dd5ad6ff43519fb916bc28c@ruby-forum.com> Alex Fenton wrote: > hi doug > > Doug Sands wrote: >> I am trying to get ruby 1.9 to run on my Windows Vista Ultimate computer >> with and Intel 32 bit processor and all OS updates applied. >> I installed ruby 1.9 on October 23, 2009 using the zip file >> (ruby-1.9.1-p129-i386-mswin32.zip) > ... > >> C:/Program >> Files/Applications/Ruby/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mswin32-60/lib/wxruby2.so: >> [BUG] Segmentation fault >> ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] > > it looks like you may be using the wxruby gem built for Ruby version > 1.8 - these are not compatible with Ruby 1.9. We don't currently have a > wxruby gem for Ruby 1.9 built with the microsoft compiler, but you can > use wxRuby and ruby 1.9 built with the mingw compiler. If you got to the > download page: > > http://rubyforge.org/frs/?group_id=35 > > you'll see a mingw-...-setup.exe package. This is an all-in-one > development environment for Windows and Ruby 1.9, with wxruby already > installed. This should have you up and running quickly for GUI dev on MS > windows. > > The one-click installer for ruby has moved to using MingW, so it's our > best guess as wxRuby developers that this is future platform for ruby on > windows. > > alex Hello Alex -- Worked like a charm. I feel kind of foolish for not having found the information suggesting I to do this is on my own given how much searching I did. Nevertheless, I didn't, you helped, and I'm up and running. Thank you very much. Doug -- Posted via http://www.ruby-forum.com/. From mistergibson at gmail.com Sun Oct 25 09:37:39 2009 From: mistergibson at gmail.com (Mister Gibson) Date: Sun, 25 Oct 2009 06:37:39 -0700 Subject: [wxruby-users] rb++ vs. swig Message-ID: <4AE454A3.4080701@gmail.com> Dear wxruby, Have you looked into RB++ as an alternative to swig? http://rbplusplus.rubyforge.org/ I'd love to hear your thoughts on this. Cheers. From alex at pressure.to Sun Oct 25 11:07:38 2009 From: alex at pressure.to (Alex Fenton) Date: Sun, 25 Oct 2009 15:07:38 +0000 Subject: [wxruby-users] rb++ vs. swig In-Reply-To: <4AE454A3.4080701@gmail.com> References: <4AE454A3.4080701@gmail.com> Message-ID: <4AE469BA.50606@pressure.to> hi Mister Gibson wrote: > Have you looked into RB++ as an alternative to swig? > > http://rbplusplus.rubyforge.org/ Yes, I've looked into it a little; some comments I've had in the past: http://rubyforge.org/pipermail/wxruby-development/2009-June.txt And also some discussion on this thread (FFI vs SWIG vs rb++) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/322464 rb++ does seem neater than SWIG. But there's a very considerable number of difficult problems of wrapping wxWidgets in Ruby that are already solved using SWIG. rb++ also relies a fair bit on C++ namespaces, which wxWidgets doesn't use, and SWIG also supports a number of C++ features which aren't yet supported in rb++. but i'm always interested to hear more on this cheers alex From hsarvell at gmail.com Sun Oct 25 12:39:11 2009 From: hsarvell at gmail.com (Henrik Sarvell) Date: Sun, 25 Oct 2009 17:39:11 +0100 Subject: [wxruby-users] Problems in 64bit Ubuntu 8.10 Message-ID: <921d551c0910250939n2cdca3bamb17b8f12df8edadb@mail.gmail.com> I've installed wxgtk 2.8.10 and wxruby 2.0.0. When I try to run any scripts I get the following: /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so: /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so: symbol _ZN13wxAuiNotebook7SetFontERK6wxFont, version WXU_2.8.5 not defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-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 editor.rb:5 Any ideas? Which version of wxgtk was used while developing wxruby 2? /Henrik From timo at orangeorb.de Sun Oct 25 14:40:17 2009 From: timo at orangeorb.de (Timo Springmann) Date: Sun, 25 Oct 2009 19:40:17 +0100 Subject: [wxruby-users] Creating corrent menuitems with xrcise Message-ID: <33AD3B39-E6F1-411C-A733-56EBCAF5931D@orangeorb.de> Hi List, actually I'm trying to generate my UI with wxFormBuilder. But I haven't managed to create correct plattform-independent Quit- and About-Menuitem with the correct IDs (Wx::ID_EXIT, Wx::ID_ABOUT). Can anyone tell me how to do this? Everything I tried so far leads to not working menu items or false menu items in i.e. Mac OS. Regards, Timo From hsarvell at gmail.com Sun Oct 25 19:10:08 2009 From: hsarvell at gmail.com (Henrik Sarvell) Date: Mon, 26 Oct 2009 00:10:08 +0100 Subject: [wxruby-users] Problems in 64bit Ubuntu 8.10 In-Reply-To: <921d551c0910250939n2cdca3bamb17b8f12df8edadb@mail.gmail.com> References: <921d551c0910250939n2cdca3bamb17b8f12df8edadb@mail.gmail.com> Message-ID: <921d551c0910251610o17ed3384hc9a3062332af5e55@mail.gmail.com> OK, solved it, I had to compile myself, here is a small description and the gem: http://www.prodevtips.com/2009/10/25/ubuntu-810-karmic-koala-64bit-on-a-sony-vaio-aw11z/ Maybe someone with the authority could download it from there and put it here: http://rubyforge.org/frs/?group_id=35 ? /Henrik On Sun, Oct 25, 2009 at 5:39 PM, Henrik Sarvell wrote: > I've installed wxgtk 2.8.10 and wxruby 2.0.0. > > When I try to run any scripts I get the following: > > /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so: > /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so: > symbol _ZN13wxAuiNotebook7SetFontERK6wxFont, version WXU_2.8.5 not > defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - > /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-linux/lib/wxruby2.so > (LoadError) > ? ? ? ?from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' > ? ? ? ?from /var/lib/gems/1.8/gems/wxruby-2.0.0-x86_64-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 editor.rb:5 > > Any ideas? Which version of wxgtk was used while developing wxruby 2? > > /Henrik > From timo at orangeorb.de Sun Oct 25 19:14:41 2009 From: timo at orangeorb.de (Timo Springmann) Date: Mon, 26 Oct 2009 00:14:41 +0100 Subject: [wxruby-users] Virtual ListCtrl not sortable by clicking the header? Message-ID: I just realised, that as soon as I add Wx::LC_VIRTUAL to the style, the list stops being sortable by clicking on the header. Are virtual lists always unsortable by clicking on the header? Regards, Timo From fabio.petrucci at gmail.com Mon Oct 26 07:44:09 2009 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Mon, 26 Oct 2009 12:44:09 +0100 Subject: [wxruby-users] AcceleratorTable Message-ID: Hi all, i'm using Wx::AcceleratorTable to shortcut function keys (F1, F2...) Given the code: acc_table = Wx::AcceleratorTable[ [ Wx::MOD_NORMAL, Wx::K_F3, myBtn.get_id() ], [ Wx::MOD_ALT, Wx::K_F4, myMnu.get_id() ]...] frame.accelerator_table = acc_table the 3? param of Wx:AcceleratorEntry is an id identifing a menu item id or a commad id. If i have a menu item or a button, i get the corresponding id into the third param and everything works as expected. What to do if i have just a function (no button, neither menu item binded)? How do i get the id to bind to? Any help is greately appreciated. thank you. bio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Mon Oct 26 11:51:28 2009 From: lists at ruby-forum.com (El Gato) Date: Mon, 26 Oct 2009 16:51:28 +0100 Subject: [wxruby-users] Splashscreen showing progress Message-ID: I'd like to use a splashscreen instead of a progress dialog. I have a png that I can use with Bitmap.new, and I found that I can write text to it, but is there any way for me to update that text once the splashscreen is displayed? [code] def splash bmp = Wx::Bitmap.new(SPLASH_IMG, Wx::BITMAP_TYPE_PNG) bmp.draw do |dc| dc.set_font(Wx::Font.new(8, Wx::FONTFAMILY_SWISS, Wx::FONTSTYLE_NORMAL, Wx::FONTWEIGHT_LIGHT)) dc.set_text_foreground(Wx::WHITE) dc.draw_text('Loading...', 20, 200) end ss = Wx::SplashScreen.new(bmp, Wx::SPLASH_CENTRE_ON_PARENT|Wx::SPLASH_TIMEOUT, 3000, nil, -1) # Is there any way to essentially "dc.draw_text(...)" at this point? yield if block_given? ss.destroy end [/code] -- Posted via http://www.ruby-forum.com/. From timo at orangeorb.de Mon Oct 26 19:42:53 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 00:42:53 +0100 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: <4AE2DE91.8010302@pressure.to> References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> <4AE2DE91.8010302@pressure.to> Message-ID: <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> Hi Alex, Am 24.10.2009 um 13:01 schrieb Alex Fenton: > > Yes, the wxWidgets API for working with multiple columns is not so > obvious. You do need to have one ListItem for every single cell - > you can't combine several columns of a single row into one. Have a > look at this thread: Because of the un-sortable VIRTUAL list style I took a deeper look into the normal ListCtrl. You wrote, that I need one ListItem for every single cell. After reading the docs I thought I understand how it works, but I still can't get it to do what I want. I _thought_ the following code would create a ListCrtl with two columns populated with one line filling both columns with some text. But both items (item0 and item1) will put it's text into the first cell (column 0). It seems like "self.set_column(0)" doesn't do anything... any ideas? class MyList < Wx::ListCtrl def initialize() super(:style => Wx::LC_REPORT|Wx::LC_HRULES) self.insert_column(0, "Col1") self.insert_column(1, "Col2") self.set_column_width(0,280) self.set_column_width(1,300) add_entries end def add_entries item0 = Wx::ListItem.new item0.set_text("Some text for column 0") item0.set_column(0) item0.set_id(0) self.insert_item(item0) item1 = Wx::ListItem.new item1.set_text("Some other text for column 1") item1.set_column(1) item1.set_id(0) self.insert_item(item1) end end Regards, Timo P.S.: I know I could use self.insert_item and self.set_item in this case (and it would work), but later I would like to move the creatin of the list items to an own class. From timo at orangeorb.de Tue Oct 27 04:22:06 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 09:22:06 +0100 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> <4AE2DE91.8010302@pressure.to> <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> Message-ID: Hi, this morning I tested my code on a Linux box. The result is a little bit different. On my linux box it seems, that the set_column call is working, but every "self.insert_item" is creating a new row, although both items should be in the same row (set_id is both times called with 0). I Just checked the versions: Mac OS: wxruby 2.0.1 Linux: wxruby 2.0.0 Seems like I'm trying something that should not work or there's a bug in at least one wxruby version Regards, Timo From alex at pressure.to Tue Oct 27 08:14:33 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 12:14:33 +0000 Subject: [wxruby-users] AcceleratorTable In-Reply-To: References: Message-ID: <4AE6E429.9010608@pressure.to> hi Fabio Fabio Petrucci wrote: > i'm using Wx::AcceleratorTable to shortcut function keys (F1, F2...) ... > What to do if i have just a function (no button, neither menu item > binded)? An Accelerator Table is just that - a mapping of key presses that provide fast access to existing menu items or GUI controls. So it's expected that there should be an ID to go with each. However I expect that an accelerator entry would trigger an evt_menu even if there wasn't actually a real menu item in the Frame's menus, if you wanted to "cheat": evt_menu(SOME_ARBITRARY_ID, :the_function) AcceleratorTable(....) alex From alex at pressure.to Tue Oct 27 08:27:39 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 12:27:39 +0000 Subject: [wxruby-users] Splashscreen showing progress In-Reply-To: References: Message-ID: <4AE6E73B.30705@pressure.to> El Gato wrote: > I'd like to use a splashscreen instead of a progress dialog. I have a > png that I can use with Bitmap.new, and I found that I can write text to > it, but is there any way for me to update that text once the > splashscreen is displayed? I can't see anything in the wxSplashScreen API, but I expect you could do it by defining a subclass of SplashScreen with its own evt_paint handler which just draws the bitmap, and then update it by calling refresh() as required, which will call the paint routine. alex From alex at pressure.to Tue Oct 27 08:44:46 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 12:44:46 +0000 Subject: [wxruby-users] Creating corrent menuitems with xrcise In-Reply-To: <33AD3B39-E6F1-411C-A733-56EBCAF5931D@orangeorb.de> References: <33AD3B39-E6F1-411C-A733-56EBCAF5931D@orangeorb.de> Message-ID: <4AE6EB3E.8040103@pressure.to> Timo Springmann wrote: > actually I'm trying to generate my UI with wxFormBuilder. But I > haven't managed to create correct plattform-independent Quit- and > About-Menuitem with the correct IDs (Wx::ID_EXIT, Wx::ID_ABOUT). Can > anyone tell me how to do this? I haven't used wxFormBuilder. But looking at the screenshots, there is a box in a panel on the right-hand side called "Object Properties". At the top of the yellow tinted section in this list of properties, there is an entry called "id" which I guess has the default value "wxID_ANY". To use one of the standard ids, change this to wxID_EXIT, wxID_ABOUT. Generally to map from C++ constant and class names to Ruby, replace the preceding wx (lower case) with Wx:: (module name). C++ -> Ruby wxWindow -> Wx::Window wxID_EXIT -> Wx::ID_EXIT a From alex at pressure.to Tue Oct 27 09:00:20 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 13:00:20 +0000 Subject: [wxruby-users] problem installing wxruby on linux In-Reply-To: References: Message-ID: <4AE6EEE4.50700@pressure.to> Haris Bogdanovic wrote: > I installed wxruby with 'gem install wxruby' and everything went ok. > Then I installed wxwidgets (wx2.8) and wx-common. > I run irb and write: > require 'rubygems' > require 'wx' > and get the following error: > > #----------------- > LoadError: libwx_gtk2u_stc-2.8.so.0: cannot open shared object file: No > such file or directory - > /home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so > It seems you do not have at least part of the wx-widgets libraries installed. Check in your package manager to make sure you have wx-widgets-2.8 and (after this message) wx-widgets-stc-2.8 installed. On Linux, the gem only installs the ruby interface to the wxWidgets library, not the core wxWidgets library code itself. a From timo at orangeorb.de Tue Oct 27 09:28:27 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 14:28:27 +0100 Subject: [wxruby-users] Images in wxListCtrl Message-ID: <32FCD9D6-2861-4D97-8009-F1FCB70B84CD@orangeorb.de> Hi again, I'm still struggeling with wxRuby/wxWidgets ListCtrl. Now I would like to add images to some specific cells/columns. First problem: API docs are unclear. There is a section about "ListCtrl#set_item_column_image" but it seems that this method does not exist. Actually the text in this section references to "ListCtrl#set_item_image" but it's not clear to me how I can add for example, an image to cells in the third column. Second problem: Calling "ListCtrl#set_item_image(item, image) does not work for me. I always have to use three paremeters when calling set_item_image. Regards, Timo From alex at pressure.to Tue Oct 27 09:38:29 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 13:38:29 +0000 Subject: [wxruby-users] Images in wxListCtrl In-Reply-To: <32FCD9D6-2861-4D97-8009-F1FCB70B84CD@orangeorb.de> References: <32FCD9D6-2861-4D97-8009-F1FCB70B84CD@orangeorb.de> Message-ID: <4AE6F7D5.1050901@pressure.to> Timo Springmann wrote: > API docs are unclear. There is a section about > "ListCtrl#set_item_column_image" but it seems that this method does > not exist. Actually the text in this section references to > "ListCtrl#set_item_image" but it's not clear to me how I can add for > example, an image to cells in the third column. Thanks for the report. It looks like this method should be there in the API but is missing. Since it's documented and necessary we'll aim to fix this bug, but until then I think the only way to have an image other than in the first column is to use LC_VIRTUAL and override on_get_item_column_image, which should be present. > Second problem: > Calling "ListCtrl#set_item_image(item, image) does not work for me. I > always have to use three paremeters when calling set_item_image. Thanks again, the shorter alternative should be there but is missing. http://rubyforge.org/tracker/index.php?func=detail&aid=27358&group_id=35&atid=218 a From timo at orangeorb.de Tue Oct 27 09:42:10 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 14:42:10 +0100 Subject: [wxruby-users] Images in wxListCtrl In-Reply-To: <4AE6F7D5.1050901@pressure.to> References: <32FCD9D6-2861-4D97-8009-F1FCB70B84CD@orangeorb.de> <4AE6F7D5.1050901@pressure.to> Message-ID: <4754B995-F7CC-4D67-AA9F-3DA21024206D@orangeorb.de> Hi Alex, Am 27.10.2009 um 14:38 schrieb Alex Fenton: > Since it's documented and necessary we'll aim to fix this bug, but > until then I think the only way to have an image other than in the > first column is to use LC_VIRTUAL and override > on_get_item_column_image, which should be present. I would like to, but I cannot find a way to get ListCtrl with LC_VIRTUAL sortable by clicking in the header column. Is this intended, a restriction or I'm just missing any secret options? Regards, Timo From alex at pressure.to Tue Oct 27 10:00:23 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 14:00:23 +0000 Subject: [wxruby-users] Virtual ListCtrl not sortable by clicking the header? In-Reply-To: References: Message-ID: <4AE6FCF7.7060808@pressure.to> Timo Springmann wrote: > I just realised, that as soon as I add Wx::LC_VIRTUAL to the style, > the list stops being sortable by clicking on the header. Are virtual > lists always unsortable by clicking on the header? No, they are not unsortable, but you have to do the work yourself. In a "normal" ListCtrl, the control has knowledge of all the contents, so can help you. In a virtual ListCtrl, it doesn't know all the contents as you supply them on demand. You need to handle the events for the clicking of the column headers yourself (*evt_list_col_click etc)*, and then re-order the contents (data to be supplied by the virtual functions). So if you were using a SQL call to populate the underlying data, you might add an ORDER BY clause. This for wxPython, but might be helpful: http://code.activestate.com/recipes/426407/ http://archives.devshed.com/forums/python-122/sorting-wxlistctrl-with-lc-virtual-2218172.html alex From fabio.petrucci at gmail.com Tue Oct 27 10:15:22 2009 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Tue, 27 Oct 2009 15:15:22 +0100 Subject: [wxruby-users] AcceleratorTable In-Reply-To: <4AE6E429.9010608@pressure.to> References: <4AE6E429.9010608@pressure.to> Message-ID: Thank you Alex, However I expect that an accelerator entry would trigger an evt_menu even if > there wasn't actually a real menu item in the Frame's menus, if you wanted > to "cheat": > > evt_menu(SOME_ARBITRARY_ID, :the_function) > AcceleratorTable(....) > > i'll try to use your tip. cheers. bio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timo at orangeorb.de Tue Oct 27 10:16:18 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 15:16:18 +0100 Subject: [wxruby-users] Virtual ListCtrl not sortable by clicking the header? In-Reply-To: <4AE6FCF7.7060808@pressure.to> References: <4AE6FCF7.7060808@pressure.to> Message-ID: <48BBEDA9-C5D7-47D2-BAAE-162D8DCAD04C@orangeorb.de> Hi Alex, hey, that's sound promising. Thanks for pointing me into the right direction. I'll take a deeper look into it. I think it would be usefull if this would be part of the documentation? Regards, Timo Am 27.10.2009 um 15:00 schrieb Alex Fenton: > Timo Springmann wrote: >> I just realised, that as soon as I add Wx::LC_VIRTUAL to the style, >> the list stops being sortable by clicking on the header. Are >> virtual lists always unsortable by clicking on the header? > > No, they are not unsortable, but you have to do the work yourself. > In a "normal" ListCtrl, the control has knowledge of all the > contents, so can help you. In a virtual ListCtrl, it doesn't know > all the contents as you supply them on demand. > > You need to handle the events for the clicking of the column headers > yourself (*evt_list_col_click etc)*, and then re-order the contents > (data to be supplied by the virtual functions). So if you were using > a SQL call to populate the underlying data, you might add an ORDER > BY clause. > > This for wxPython, but might be helpful: > > http://code.activestate.com/recipes/426407/ > http://archives.devshed.com/forums/python-122/sorting-wxlistctrl-with-lc-virtual-2218172.html > > alex > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From timo at orangeorb.de Tue Oct 27 10:34:10 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 15:34:10 +0100 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> <4AE2DE91.8010302@pressure.to> <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> Message-ID: Hi, I did some more testing and I'm quite sure that there's a bug in wx::ListCtrl and/or in wx::ListItem when using ListCtrl#insert_item to insert a ListItem into a List element. I attached the some sample code and two screenshot showing. The code should in my opinion create a 3x3 ListCtrl with every cell filled with some sample text. Screenshot #1 shows the result running the script in a linux box using wxruby 2.0.0 Screenshot #2 shows the result running the script in Mac OS X with wxruby 2.0.1 (same as with 2.0.0) Both result are not what I expected... Timo -------------- n?chster Teil -------------- Ein Dateianhang mit Bin?rdaten wurde abgetrennt... Dateiname : list_text.rb Dateityp : text/x-ruby-script Dateigr??e : 1964 bytes Beschreibung: nicht verf?gbar URL : -------------- n?chster Teil -------------- -------------- n?chster Teil -------------- Ein Dateianhang mit Bin?rdaten wurde abgetrennt... Dateiname : wxListCtrl.png Dateityp : image/png Dateigr??e : 9823 bytes Beschreibung: nicht verf?gbar URL : -------------- n?chster Teil -------------- Ein Dateianhang mit Bin?rdaten wurde abgetrennt... Dateiname : Bild 1.png Dateityp : image/png Dateigr??e : 16520 bytes Beschreibung: nicht verf?gbar URL : From alex at pressure.to Tue Oct 27 11:12:11 2009 From: alex at pressure.to (Alex Fenton) Date: Tue, 27 Oct 2009 15:12:11 +0000 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> <4AE2DE91.8010302@pressure.to> <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> Message-ID: <4AE70DCB.3020902@pressure.to> Timo Springmann wrote: > I did some more testing and I'm quite sure that there's a bug in > wx::ListCtrl and/or in wx::ListItem when using ListCtrl#insert_item to > insert a ListItem into a List element. This has tripped me up before. The wxWidgets default docs are not very clear, I will try to remember to update this evening. insert_item inserts a new row; use set_item to add subsequent columns to the same row: row00 = Wx::ListItem.new row00.set_text("Cell 0,0") # set text row00.set_id(0) # set row row00.set_column(0) # set column self.insert_item row00 row01 = Wx::ListItem.new row01.set_text("Cell 0,1") # set text row01.set_id(0) # set row row01.set_column(1) # set column # SET_ITEM here self.set_item row01 See: http://wiki.wxwidgets.org/WxListCtrl a From timo at orangeorb.de Tue Oct 27 11:34:33 2009 From: timo at orangeorb.de (Timo Springmann) Date: Tue, 27 Oct 2009 16:34:33 +0100 Subject: [wxruby-users] Working with ListCtrl and ListItem In-Reply-To: <4AE70DCB.3020902@pressure.to> References: <1B230390-05AD-426B-AF70-AE3C6C5B3685@orangeorb.de> <4AE2DE91.8010302@pressure.to> <656A579C-1F20-4A41-B58D-4487E4FEC86D@orangeorb.de> <4AE70DCB.3020902@pressure.to> Message-ID: <88FAE367-E172-4E0C-BF91-CE9895B146DE@orangeorb.de> Hi Alex, Am 27.10.2009 um 16:12 schrieb Alex Fenton: > Timo Springmann wrote: >> I did some more testing and I'm quite sure that there's a bug in >> wx::ListCtrl and/or in wx::ListItem when using ListCtrl#insert_item >> to insert a ListItem into a List element. > > This has tripped me up before. The wxWidgets default docs are not > very clear, I will try to remember to update this evening. > > insert_item inserts a new row; use set_item to add subsequent > columns to the same row: That did the trick. Actually you can use ListCtrl#set_item instead of ListCtrl#insert_item all the time. Even for the first column you can use set_item. That's exactly what I was looking for. Thanks. Regards, Timo From mario at ruby-im.net Tue Oct 27 16:02:09 2009 From: mario at ruby-im.net (Mario Steele) Date: Tue, 27 Oct 2009 16:02:09 -0400 Subject: [wxruby-users] Creating corrent menuitems with xrcise In-Reply-To: <4AE6EB3E.8040103@pressure.to> References: <33AD3B39-E6F1-411C-A733-56EBCAF5931D@orangeorb.de> <4AE6EB3E.8040103@pressure.to> Message-ID: Hey guys, Sorry, been busy with RL. Actually, you just need to define wxID_EXIT, and wxID_ABOUT in the wxFormBuilder. On the Ruby side, you need to use Wx::ID_EXIT and Wx::ID_ABOUT to catch it. This is cause of the naming conventions, and how Ruby doesn't allow constants to be formed with a lowercase first letter. EG: All constants, classes, and modules need to start their first character as an Uppercase letter. Ruby will throw a tissy fit when you don't do this. Again, sorry for the late reply. On Tue, Oct 27, 2009 at 8:44 AM, Alex Fenton wrote: > Timo Springmann wrote: > >> actually I'm trying to generate my UI with wxFormBuilder. But I haven't >> managed to create correct plattform-independent Quit- and About-Menuitem >> with the correct IDs (Wx::ID_EXIT, Wx::ID_ABOUT). Can anyone tell me how to >> do this? >> > > I haven't used wxFormBuilder. But looking at the screenshots, there is a > box in a panel on the right-hand side called "Object Properties". At the top > of the yellow tinted section in this list of properties, there is an entry > called "id" which I guess has the default value "wxID_ANY". To use one of > the standard ids, change this to wxID_EXIT, wxID_ABOUT. > > Generally to map from C++ constant and class names to Ruby, replace the > preceding wx (lower case) with Wx:: (module name). > > C++ -> Ruby > wxWindow -> Wx::Window > wxID_EXIT -> Wx::ID_EXIT > > > a > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Oct 28 09:14:13 2009 From: lists at ruby-forum.com (El Gato) Date: Wed, 28 Oct 2009 14:14:13 +0100 Subject: [wxruby-users] Bitmaps for disabled Toolbar buttons Message-ID: <0f6597bb496b3b36a628f980779b61a2@ruby-forum.com> I have a tool bar with some custom icons (png images). I have both enabled and disabled icon versions. Each toolbar item was added in this way: tb.add_tool(ID_ADD, 'add', add_bmp, add_d_bmp, Wx::ITEM_NORMAL, 'Add Item', '') When I launch the app, the icons which have been disabled via: get_tool_bar.enable_tool(ID_ADD, false) show black backgrounds instead of the normal transparency present in the active icons. The disabled versions of the icons have a transparency mask and are just re-colored versions of the active version. In fact, even if I use the active icon for the disabled version, it still shows a black rectangle as the background. Thoughts? Thanks! -- Posted via http://www.ruby-forum.com/. From axel.friedrich at siemens.com Wed Oct 28 05:40:20 2009 From: axel.friedrich at siemens.com (Friedrich, Axel) Date: Wed, 28 Oct 2009 10:40:20 +0100 Subject: [wxruby-users] Installing on openSUSE 11.1 Message-ID: <1BDD6C6D3250C54CA91DD9348C23774F06D2E3ED@DEFTHW99EA4MSX.ww902.siemens.net> Hello, I try to install wxruby on openSUSE 11.1, but do not succeed. I get an error, when trying to compile wxRuby; error message please see at the bottom of this message. Using: * openSuse 11.1 * wxruby: wxruby-2.0.1.tar.gz from rubyforge.org * wxWidget: "wxAll" from wxWidgets.org/downloads, compiled with "configure --with-gtk --enable-unicode" (no problem) * rake version 0.8.7 * SWIG Version 1.3.36 * ruby 1.8.7 (2008-08-11 patchlevel 72) [i586-linux] Unfortunately, I have only very limited knowledge of linux and of compiling and no knowledge of any kind of C... Using the wxRuby-gem and using wxwidgets.rpm from the openSUSE-repository was not successfull. I use Ruby for hardware testing (quite a lot) and need some graphical output of data values now. I would be glad to get some help solving the above problem. Axel ------------------------------------------------------------ Output of rake --trace (partially): rake --trace (in /root/myDir/wx/wxruby-2_0_1_SRC) Enabling DYNAMIC build Enabling RELEASE build Enabling UNICODE build The following wxWidgets features are not available and will be skipped: GCDC GraphicsBrush GraphicsContext GraphicsFont GraphicsMatrix GraphicsObject GraphicsPath GraphicsPen MediaCtrl MediaEvent PrinterDC ** Invoke default (first_time) ** Invoke lib/wxruby2.so (first_time) ** Invoke obj/AboutDialogInfo.o (first_time, not_needed) ** Invoke src/AboutDialogInfo.cpp (first_time, not_needed) ** Invoke swig/classes/AboutDialogInfo.i (first_time, not_needed) [...a lot of successfull stuff...] ** Invoke /root/myDir/wx/wxruby-2_0_1_SRC/swig/classes/include/wxEvtHandler.h (not_needed) ** Invoke /root/myDir/wx/wxruby-2_0_1_SRC/swig/classes/include/wxWindow.h (not_needed) ** Invoke /root/myDir/wx/wxruby-2_0_1_SRC/swig/classes/include/wxGLCanvas.h (first_time, not_needed) ** Execute obj/GLCanvas.o g++ -c -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DwxABI_VERSION=208010 -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i586-linux -o obj/GLCanvas.o src/GLCanvas.cpp In file included from src/GLCanvas.cpp:2321: src/GLCanvas.h:19: error: expected class-name before ',' token src/GLCanvas.cpp: In constructor 'SwigDirector_wxGLCanvas::SwigDirector_wxGLCanvas(VALUE, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, int*, const wxPalette&)': src/GLCanvas.cpp:2323: error: class 'SwigDirector_wxGLCanvas' does not have any field named 'wxGLCanvas' ... ------------------------------------------------------------ Line 19 of GLCanvas.h is: class SwigDirector_wxGLCanvas : public wxGLCanvas, public Swig::Director { From alex at pressure.to Wed Oct 28 16:13:33 2009 From: alex at pressure.to (Alex Fenton) Date: Wed, 28 Oct 2009 20:13:33 +0000 Subject: [wxruby-users] Installing on openSUSE 11.1 In-Reply-To: <1BDD6C6D3250C54CA91DD9348C23774F06D2E3ED@DEFTHW99EA4MSX.ww902.siemens.net> References: <1BDD6C6D3250C54CA91DD9348C23774F06D2E3ED@DEFTHW99EA4MSX.ww902.siemens.net> Message-ID: <4AE8A5ED.6050909@pressure.to> Hi Friedrich Friedrich, Axel wrote: > I try to install wxruby on openSUSE 11.1, but do not succeed. > > ... > * wxWidget: "wxAll" from wxWidgets.org/downloads, compiled with > "configure --with-gtk --enable-unicode" (no problem) > Please could you try configuring wxWidgets with the options listed here: http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets First, 'make clean' in the wxWidgets directory, then 'configure' with the arguments listed on the page, then 'make && sudo make install'. You may need to install packages libmesa and libmesa-dev before configuring wxWidgets to get GLCanvas support. In particular, I think your problem is that wxRuby is trying to build support for GL Canvas, but this isn't available. The build process should detect this and skip this, but clearly this hasn't worked. Sorry for the inconvenience. > * rake version 0.8.7 > * SWIG Version 1.3.36 > * ruby 1.8.7 (2008-08-11 patchlevel 72) [i586-linux] > These all look fine. Please let us know if you're still having problems. alex From axel.friedrich at siemens.com Thu Oct 29 08:55:34 2009 From: axel.friedrich at siemens.com (Friedrich, Axel) Date: Thu, 29 Oct 2009 13:55:34 +0100 Subject: [wxruby-users] Installing on openSUSE 11.1 Message-ID: <1BDD6C6D3250C54CA91DD9348C23774F06D68A6C@DEFTHW99EA4MSX.ww902.siemens.net> Hello Alex, thank you for your help! "make clean" returned "... no such rule ...", so according to a collegue's hint I deleted all o-files in the buildgtk-dir. I installed Mesa-Development (Mesa was already installed) and did your suggested steps. Unfortunately, rake ended up with the following error: [... lot of successfull things...] ruby swig/renamer.rb src/dc.cpp ruby swig/fixplatform.rb src/dc.cpp ruby swig/fixmodule.rb src/dc.cpp Class: dc class wxdc ERROR! swig/fixmodule.rb Didn't find init rake aborted! Command failed with status (1): [ruby swig/fixmodule.rb src/dc.cpp...] Can you give me some help again? Regards, Axel From mario at ruby-im.net Thu Oct 29 17:21:39 2009 From: mario at ruby-im.net (Mario Steele) Date: Thu, 29 Oct 2009 16:21:39 -0500 Subject: [wxruby-users] Installing on openSUSE 11.1 In-Reply-To: <1BDD6C6D3250C54CA91DD9348C23774F06D68A6C@DEFTHW99EA4MSX.ww902.siemens.net> References: <1BDD6C6D3250C54CA91DD9348C23774F06D68A6C@DEFTHW99EA4MSX.ww902.siemens.net> Message-ID: My suggestion, is to delete the entire wxruby_2_0_1_SRC directory, then re-checkout/extract the source code, and try rake again. If that doens't help, then there is some problems, more then likely a chance in the headers, then what we are using. Check to see what version of wxGTK/Base you have installed, and ensure that it is one that we support. If it is, it may be that SUSE made modifications to the headers, that are incompatable with what we use to do the compile. If need be, I'll fire up my Virtual Box, install openSUSE on it, and see if I can get a compile of wxRuby going for openSUSE. On Thu, Oct 29, 2009 at 7:55 AM, Friedrich, Axel wrote: > > Hello Alex, > > thank you for your help! > > "make clean" returned "... no such rule ...", > so according to a collegue's hint I deleted all o-files in > the buildgtk-dir. > > I installed Mesa-Development (Mesa was already installed) and did > your suggested steps. > > Unfortunately, rake ended up with the following error: > > [... lot of successfull things...] > ruby swig/renamer.rb src/dc.cpp > ruby swig/fixplatform.rb src/dc.cpp > ruby swig/fixmodule.rb src/dc.cpp > Class: dc > class wxdc > ERROR! swig/fixmodule.rb Didn't find init > rake aborted! > Command failed with status (1): [ruby swig/fixmodule.rb src/dc.cpp...] > > > Can you give me some help again? > > Regards, > Axel > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Oct 29 20:42:24 2009 From: lists at ruby-forum.com (Steve cd) Date: Fri, 30 Oct 2009 01:42:24 +0100 Subject: [wxruby-users] wxRuby on Ubuntu 9.10 Message-ID: Installing the gem from rubygems, along with the available wxwidgets packages from synaptic, I'd recieve this error: /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: symbol _ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU_2.8.5 not defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so (LoadError) So I went the route of compiling my own wxRuby (still using the wxwidgets libraries from synaptic). Received this error: Class: GLCanvas : Window class wxGLCanvas g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DwxABI_VERSION=208010 -fno-strict-aliasing -g -g -O2 -fPIC -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o obj/GLCanvas.o src/GLCanvas.cpp In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, from src/GLCanvas.cpp:2207: /usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such file or directory /usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such file or directory /usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such file or directory In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, from src/GLCanvas.cpp:2207: /usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: ?GLXContext? does not name a type /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids declaration of ?GLXFBConfig? with no type /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected ?;? before ?*? token rake aborted! Command failed with status (1): [g++ -c -I/usr/lib/wx/include/gtk2-unicod...] Finally I compiled wxWidgets from source following the wxRuby wiki, then compiled wxRuby from source doing the same... And now I'm getting this error: LoadError: /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so: undefined symbol: gst_element_query_duration - /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so from /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib/site_ruby/1.8/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from (irb):1 ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] wxWidgets 2.8.10 compiled from source following the wxRuby wiki. SWIG Version 1.3.36 Not sure where to go from here. -- Posted via http://www.ruby-forum.com/. From axel.friedrich at siemens.com Fri Oct 30 05:01:50 2009 From: axel.friedrich at siemens.com (Friedrich, Axel) Date: Fri, 30 Oct 2009 10:01:50 +0100 Subject: [wxruby-users] Installing on openSUSE 11.1 In-Reply-To: References: <1BDD6C6D3250C54CA91DD9348C23774F06D68A6C@DEFTHW99EA4MSX.ww902.siemens.net> Message-ID: <1BDD6C6D3250C54CA91DD9348C23774F06D68CBF@DEFTHW99EA4MSX.ww902.siemens.net> Hello Mario, > My suggestion, is to delete the entire wxruby_2_0_1_SRC > directory, then re-checkout/extract the source code, and try > rake again. I did it. It gives me an error again: [... lot of successfull lines...] ruby swig/renamer.rb src/dc.cpp ruby swig/fixplatform.rb src/dc.cpp ruby swig/fixmodule.rb src/dc.cpp Class: dc class wxdc ERROR! swig/fixmodule.rb Didn't find init rake aborted! Command failed with status (1): [ruby swig/fixmodule.rb src/dc.cpp...] > Check to see what version of wxGTK/Base you have installed, > and ensure that it is one that we support. Don't know, how to look for this version number. I looked into YAST (repository manager) and found, that wxGTK (description: " ... for development...") was unckecked (= not installed). I installed it from the openSUSE-DVD, deleted wxRuby-SRC, placed a new copy of wxRuby-SRC, and run again 'rake'. This time, rake stopped almost immediately with this error: rake (in /root/.local/share/Trash/files/wxruby-2_1.0.1) Enabling STATIC build Enabling RELEASE build Enabling UNICODE build The following wxWidgets features are not available and will be skipped: MediaCtrl MediaEvent PrinterDC StyledTextCtrl StyledTextEvent g++ -c -I/usr/local/lib/wx/include/gtk2-unicode-release-static-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DwxABI_VERSION=208010 -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i586-linux -oobj/dc.o src/dc.cpp src/dc.cpp: In function 'void Init_wxDC()': src/dc.cpp:7576: error: 'mWxdc' was not declared in this scope rake aborted! Command failed with status (1): [g++ -c -I/usr/local/lib/wx/include/gtk2-...] Not so easy, for Windows users... Axel From lists at ruby-forum.com Fri Oct 30 11:37:58 2009 From: lists at ruby-forum.com (Matteo Picciolini) Date: Fri, 30 Oct 2009 16:37:58 +0100 Subject: [wxruby-users] Problem with form Message-ID: <51bca7dbb3ccb954b843c741762b900e@ruby-forum.com> I, i have a problemi with multiple forms. My problem is i have a form whit 2 text box and a button. After click in button i want destroy this form and create a new form . How destroy the old form (disappear on screen) I work under window -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Oct 30 12:24:17 2009 From: lists at ruby-forum.com (Matteo Picciolini) Date: Fri, 30 Oct 2009 17:24:17 +0100 Subject: [wxruby-users] Problem with form In-Reply-To: <51bca7dbb3ccb954b843c741762b900e@ruby-forum.com> References: <51bca7dbb3ccb954b843c741762b900e@ruby-forum.com> Message-ID: Matteo Picciolini wrote: > I, i have a problemi with multiple forms. My problem is i have a form > whit 2 text box and a button. After click in button i want destroy this > form and create a new form . > How destroy the old form (disappear on screen) > I work under window Ok i'm try to call function close and the form disappears, but when i close the second form i have a segmentation fault. I have two application for the two form, i have mistake? The application is one for the n form that i have ? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Oct 30 13:46:19 2009 From: lists at ruby-forum.com (Matteo Picciolini) Date: Fri, 30 Oct 2009 18:46:19 +0100 Subject: [wxruby-users] Problem with form In-Reply-To: References: <51bca7dbb3ccb954b843c741762b900e@ruby-forum.com> Message-ID: <44e8316ee8576b792c946b8ff44499fe@ruby-forum.com> Matteo Picciolini wrote: > Matteo Picciolini wrote: >> I, i have a problemi with multiple forms. My problem is i have a form >> whit 2 text box and a button. After click in button i want destroy this >> form and create a new form . >> How destroy the old form (disappear on screen) >> I work under window > > Ok i'm try to call function close and the form disappears, but when i > close the second form i have a segmentation fault. I have two > application for the two form, i have mistake? The application is one for > the n form that i have ? thanks for all i resolved ..... the app class can be instantiated only once for every application not for every form -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Oct 30 17:03:49 2009 From: lists at ruby-forum.com (Steve cd) Date: Fri, 30 Oct 2009 22:03:49 +0100 Subject: [wxruby-users] wxRuby on Ubuntu 9.10 In-Reply-To: References: Message-ID: <638c8ca059052271d3ea630a4a1368f2@ruby-forum.com> Steve cd wrote: > Installing the gem from rubygems, along with the available wxwidgets > packages from synaptic, I'd recieve this error: > > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > symbol _ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU_2.8.5 not > defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so > (LoadError) > > So I went the route of compiling my own wxRuby (still using the > wxwidgets libraries from synaptic). Received this error: > > Class: GLCanvas > : Window > class wxGLCanvas > g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.8 > -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ > -DwxABI_VERSION=208010 -fno-strict-aliasing -g -g -O2 -fPIC > -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o > obj/GLCanvas.o src/GLCanvas.cpp > In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, > from src/GLCanvas.cpp:2207: > /usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such > file or directory > /usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such > file or directory > /usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such > file or directory > In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, > from src/GLCanvas.cpp:2207: > /usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: ?GLXContext? does not > name a type > /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids > declaration of ?GLXFBConfig? with no type > /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected ?;? before > ?*? token > rake aborted! > Command failed with status (1): [g++ -c > -I/usr/lib/wx/include/gtk2-unicod...] > > > Finally I compiled wxWidgets from source following the wxRuby wiki, then > compiled wxRuby from source doing the same... > > And now I'm getting this error: > LoadError: /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so: undefined > symbol: gst_element_query_duration - > /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so > from /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from /usr/local/lib/site_ruby/1.8/wx.rb:12 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from (irb):1 > > > ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] > wxWidgets 2.8.10 compiled from source following the wxRuby wiki. > SWIG Version 1.3.36 > > Not sure where to go from here. I finally worked it out. I ended up uninstalling everything, using the package manager's wxwidgets libraries, and compiling wxRuby from source. This time it worked so I assume I was missing some library when I tried this before... maybe libmesa. One odd thing was that rake install may not have copied wxruby2.so to the correct location. I'm not qualified at all to back that up with any certainty, but I received this error: irb(main):001:0> require 'wx' LoadError: no such file to load -- wxruby2 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib/site_ruby/1.8/wx.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from (irb):1 I edited wx.rb's require statment to point at the source directory's lib/wxruby2.so... no idea if that is recommended. -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Fri Oct 30 17:20:13 2009 From: mario at ruby-im.net (Mario Steele) Date: Fri, 30 Oct 2009 16:20:13 -0500 Subject: [wxruby-users] wxRuby on Ubuntu 9.10 In-Reply-To: <638c8ca059052271d3ea630a4a1368f2@ruby-forum.com> References: <638c8ca059052271d3ea630a4a1368f2@ruby-forum.com> Message-ID: That is not recommended, as you may accidentally delete the source directory, and it will loose the wxruby2.so file. The best solution to install wxRuby once you have compiled it, is to do: [eumario at localhost ~/wxruby2/]: WXRUBY_VERSION=2.0.1 rake gem [eumario at localhost ~/wxruby2/]: gem install wxruby-2.0.1-x86-linux.gem This will create the Gem, and install it as a gem, as you provide the exact filename, it will install it from the local directory, instead of going out to the net to grab it. On Fri, Oct 30, 2009 at 4:03 PM, Steve cd wrote: > Steve cd wrote: > > Installing the gem from rubygems, along with the available wxwidgets > > packages from synaptic, I'd recieve this error: > > > > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: > > symbol _ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU_2.8.5 not > > defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference - > > /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so > > (LoadError) > > > > So I went the route of compiling my own wxRuby (still using the > > wxwidgets libraries from synaptic). Received this error: > > > > Class: GLCanvas > > : Window > > class wxGLCanvas > > g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.8 > > -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ > > -DwxABI_VERSION=208010 -fno-strict-aliasing -g -g -O2 -fPIC > > -Wno-unused-function -I. -I /usr/lib/ruby/1.8/i486-linux -o > > obj/GLCanvas.o src/GLCanvas.cpp > > In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, > > from src/GLCanvas.cpp:2207: > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:19:19: error: GL/gl.h: No such > > file or directory > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:20:20: error: GL/glx.h: No such > > file or directory > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:21:20: error: GL/glu.h: No such > > file or directory > > In file included from /usr/include/wx-2.8/wx/glcanvas.h:54, > > from src/GLCanvas.cpp:2207: > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:47: error: ?GLXContext? does not > > name a type > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: ISO C++ forbids > > declaration of ?GLXFBConfig? with no type > > /usr/include/wx-2.8/wx/gtk/glcanvas.h:124: error: expected ?;? before > > ?*? token > > rake aborted! > > Command failed with status (1): [g++ -c > > -I/usr/lib/wx/include/gtk2-unicod...] > > > > > > Finally I compiled wxWidgets from source following the wxRuby wiki, then > > compiled wxRuby from source doing the same... > > > > And now I'm getting this error: > > LoadError: /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so: undefined > > symbol: gst_element_query_duration - > > /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so > > from /usr/local/lib/site_ruby/1.8/i486-linux/wxruby2.so > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `require' > > from /usr/local/lib/site_ruby/1.8/wx.rb:12 > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `gem_original_require' > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `require' > > from (irb):1 > > > > > > ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] > > wxWidgets 2.8.10 compiled from source following the wxRuby wiki. > > SWIG Version 1.3.36 > > > > Not sure where to go from here. > > I finally worked it out. I ended up uninstalling everything, using the > package manager's wxwidgets libraries, and compiling wxRuby from source. > This time it worked so I assume I was missing some library when I tried > this before... maybe libmesa. One odd thing was that rake install may > not have copied wxruby2.so to the correct location. I'm not qualified > at all to back that up with any certainty, but I received this error: > irb(main):001:0> require 'wx' > LoadError: no such file to load -- wxruby2 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from /usr/local/lib/site_ruby/1.8/wx.rb:12 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from (irb):1 > > I edited wx.rb's require statment to point at the source directory's > lib/wxruby2.so... no idea if that is recommended. > -- > 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 http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: