From pedro.delgallego at gmail.com Tue Jan 2 22:18:59 2007 From: pedro.delgallego at gmail.com (Pedro Del Gallego) Date: Wed, 3 Jan 2007 04:18:59 +0100 Subject: [Wxruby-users] instalation problem Message-ID: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> Hi Im testing wxRuby. I have a problem when ruby try to load the load wx. Im newbie to ruby, maybe a make a simple mistake : Best regards. Install wxRuby-------------------------------------------------------------- pedro at la-vaca-azul:~$ sudo gem install wxruby2-preview Need to update 2 gems from http://gems.rubyforge.org .. complete Select which gem to install for your platform (i486-linux) 1. wxruby2-preview 0.0.38 (i686-linux) 2. wxruby2-preview 0.0.38 (powerpc-darwin7.9.0) 3. wxruby2-preview 0.0.38 (i686-darwin8.4.1) 4. wxruby2-preview 0.0.38 (i386-mswin32) 5. wxruby2-preview 0.0.37 (powerpc-darwin7.9.0) 6. wxruby2-preview 0.0.37 (i686-darwin8.4.1) 7. wxruby2-preview 0.0.36 (powerpc-darwin7.9.0) 8. wxruby2-preview 0.0.36 (i386-mswin32) 9. wxruby2-preview 0.0.36 (i686-darwin8.4.1) 10. wxruby2-preview 0.0.36 (i486-linux) 11. wxruby2-preview 0.0.35 (i686-darwin8.4.1) 12. wxruby2-preview 0.0.35 (powerpc-darwin7.9.0) 13. wxruby2-preview 0.0.35 (i486-linux) 14. Cancel installation > 10 Successfully installed wxruby2-preview-0.0.36-i486-linux Executing my class ---------------------------------------------------------- pedro at la-vaca-azul:~/work/rad/gui/wx$ ls hello_world.rb pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby hello_world.rb hello_world.rb:1:in `require': no such file to load -- wx (LoadError) from hello_world.rb:1 Load alone and irb ------------------------------------------------ pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby -rubygems -e "require 'wxruby2'" pedro at la-vaca-azul:~/work/rad/gui/wx$ irb irb(main):001:0> require 'wxruby2' LoadError: no such file to load -- wxruby2 from (irb):1:in `require' from (irb):1 apt-get search libgtk apt-cache search libgtk libglib1.2 - The GLib library of C routines libgtk1.2 - The GIMP Toolkit set of widgets for X libgtk1.2-common - Common files for the GTK+ library libgtk1.2-dbg - Debugging files for the GIMP Toolkit libgtk1.2-dev - Development files for the GIMP Toolkit libgtk1.2-doc - Documentation for the GIMP Toolkit libgtk2-perl - Perl interface to the 2.x series of the Gimp Toolkit library libgtk2-perl-doc - Perl interface to the Gtk 2.x series (documentation files) libgtk2.0-cil - CLI binding for the GTK+ toolkit 2.10 libgtk2.0-0 - The GTK+ graphical user interface library libgtk2.0-0-dbg - The GTK+ libraries and debugging symbols libgtk2.0-bin - The programs for the GTK+ graphical user interface library libgtk2.0-common - Common files for the GTK+ graphical user interface library libgtk2.0-dev - Development files for the GTK+ library libgtk2.0-doc - Documentation for the GTK+ graphical user interface library libgtk+2.0-directfb-dev - gtk+2.0 implementation for the frame buffer, development files libgtk+2.0-directfb0 - gtk+2.0 implementation for the frame buffer libgtk2-ruby - GTK+ bindings for the Ruby language -- ------------------------------------- Pedro Del Gallego Vida Email : pedro.delgallego at gmail.com IM Jabber : pedro.delgallego at jabber.org Telefono VoIP : pedro.delgallego in Skype. From ville.mattila at iki.fi Tue Jan 2 23:37:46 2007 From: ville.mattila at iki.fi (Ville Mattila) Date: Wed, 3 Jan 2007 06:37:46 +0200 Subject: [Wxruby-users] instalation problem In-Reply-To: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> Message-ID: On 1/3/07, Pedro Del Gallego wrote: > Hi > > Im testing wxRuby. I have a problem when ruby try to load the load wx. > > Im newbie to ruby, maybe a make a simple mistake : > > Best regards. > > Install wxRuby-------------------------------------------------------------- > pedro at la-vaca-azul:~$ sudo gem install wxruby2-preview > Need to update 2 gems from http://gems.rubyforge.org > > > Executing my class ---------------------------------------------------------- > pedro at la-vaca-azul:~/work/rad/gui/wx$ ls > hello_world.rb > pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby hello_world.rb > hello_world.rb:1:in `require': no such file to load -- wx (LoadError) > from hello_world.rb:1 > > Load alone and irb ------------------------------------------------ > pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby -rubygems -e "require 'wxruby2'" > pedro at la-vaca-azul:~/work/rad/gui/wx$ irb > irb(main):001:0> require 'wxruby2' > LoadError: no such file to load -- wxruby2 > from (irb):1:in `require' > from (irb):1 > Hello, Here is a example require from bigdemo. begin require 'wx' rescue LoadError => no_wx_err begin require 'rubygems' require 'wx' rescue LoadError raise no_wx_err end end From alex at pressure.to Wed Jan 3 03:50:55 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 03 Jan 2007 08:50:55 +0000 Subject: [Wxruby-users] instalation problem In-Reply-To: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> Message-ID: <459B6E6F.70300@pressure.to> Hi Pedro Thanks for your interest in wxruby. > Select which gem to install for your platform (i486-linux) > > Successfully installed wxruby2-preview-0.0.36-i486-linux > This is quite an old version now - are you able to use the i686-linux version 0.0.38 gem? If not, please say and we will see if we can provide newer i486-linux gem. > Executing my class ---------------------------------------------------------- > pedro at la-vaca-azul:~/work/rad/gui/wx$ ls > hello_world.rb > pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby hello_world.rb > As Ville is suggesting, you don't seem to be requiring rubygems here before you load wxruby. Does it work if you do ruby -rubygems hello_world.rb > pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby -rubygems -e "require 'wxruby2'" > Here you have loaded rubygems and it seems to work. Alex From paul.allton at uk.bnpparibas.com Wed Jan 3 05:04:18 2007 From: paul.allton at uk.bnpparibas.com (paul.allton at uk.bnpparibas.com) Date: Wed, 3 Jan 2007 10:04:18 +0000 Subject: [Wxruby-users] Simple wxRuby Doc Browser In-Reply-To: <45910D51.9080308@pressure.to> Message-ID: Hi, The new wxruby docs are really great :) I wanted a slightly easier way of finding available methods. Below is a quick hack of a documentation browser (apologies its inline, I wasn't sure if this list handled attachments). I'm already finding it quite useful, but there's a few issues to sort out: - On loading the app, I call @narrower.set_focus so that you can start typing to narrow the list of methods. This works fine on windows, but on OS X it will not focus until you physically click into the TextCtrl. Is this a bug, or am doing something dense? - On selecting a method in the list the HtmlWindow redirects to the associated page. This works fine for standard links, but for anchors it always results in the popup box 'Ruby Warning' - 'HTML anchor xxx does not exist.', on both windows and OS X. Again, is this user error or a wxruby issue? (Note: to run it you'll need to change the line 'Dir.chdir('C:\dev\jwx2doc\doc\html')' to the directory containing the wxruby html documentation files. Finally, when you run it the (very lame) html parsing spits out a warning for each file that doesn't include any methods, which might help identify classes where the original documentation generation was a bit iffy. Cheers, Paul ################################################### require 'rubygems' require 'wx' require 'wx_sugar/all' include Wx class WxDocFrame < Frame def initialize(*args) super @splitter = add(SplitterWindow[:style => SP_LIVE_UPDATE]) p1 = @splitter.add(Panel) {|p1| p1.arrange_vertically(:padding => 1) { @narrower = p1.add(TextCtrl, :minsize => true) @methods = p1.add(ListBox, :proportion => 1) } } p2 = @splitter.add(Panel) {|p2| p2.arrange_vertically { @detail = p2.add(HtmlWindow, :proportion => 1) } } init_model create_status_bar(1) listen(:text, @narrower, :on_narrower_change) listen(:listbox, @methods, :on_method_selection) @splitter.minimum_pane_size = 10 @splitter.split_vertically(p1, p2, 350) @splitter.set_sash_gravity(0.5) @narrower.set_focus @narrower.value = '' end private def init_model @model = {} Dir.glob('*.html') {|file| IO.readlines(file).join.scan(/^
  • (.*?)<\/a><\/li>$/) {|url, method| @model[method] = [file, url] } } set_methods(@model.keys.sort) end def on_narrower_change(e) value = @narrower.value.downcase set_methods(@model.keys.sort.select{|m| m.downcase.include?(value) }) end def on_method_selection item = @model[@methods.string_selection] @detail.load_page(item[0] + item[1]) end def set_methods(methods) @methods.set(methods) self.status_text = "#{methods.size} matching methods" end end class WxDocApp < App def on_init WxDocFrame.new(nil, :title => "wxRuby Documentation", :size => [1024, 768]).show end end #temp for latest windows gem GC.disable Dir.chdir('C:\dev\wx2doc\doc\html') WxDocApp.new.main_loop This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ********************************************************************************************** BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070103/6a8bbe46/attachment.html From paul.allton at uk.bnpparibas.com Wed Jan 3 05:20:48 2007 From: paul.allton at uk.bnpparibas.com (paul.allton at uk.bnpparibas.com) Date: Wed, 3 Jan 2007 10:20:48 +0000 Subject: [Wxruby-users] getting url from evt_text_url event In-Reply-To: <458929D3.4010102@pressure.to> Message-ID: >They were originally automatically converted and 'translated' from the >WxWidgets latex sources. They're now held in our SVN in Textile format, >and hand-edited. >Point taken about Grid and HtmlWindow - this is where our latex parser >didn't deal with variations in the structure of the originals. Please do >point do these out, file a bug, or submit a doc patch as you find them. Done ... http://rubyforge.org/tracker/index.php?func=detail&aid=7549&group_id=35&atid=218 This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ********************************************************************************************** BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070103/4a558f4c/attachment.html From alex at pressure.to Wed Jan 3 09:25:06 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 03 Jan 2007 14:25:06 +0000 Subject: [Wxruby-users] Simple wxRuby Doc Browser In-Reply-To: References: Message-ID: <459BBCC2.20803@pressure.to> Hi paul.allton at uk.bnpparibas.com wrote: > I wanted a slightly easier way of finding available methods. Below is > a quick hack of a documentation browser (apologies its inline, I > wasn't sure if this list handled attachments). Looks good; it could be the nugget of a nice demo sample. This list does accept attachments of reasonable size - scripts and patches are normally fine. > - On loading the app, I call @narrower.set_focus so that you can start > typing to narrow the list of methods. This works fine on windows, but > on OS X it will not focus until you physically click into the > TextCtrl. Is this a bug, or am doing something dense? I was wondering the same thing this weekend, where set_focus wasn't working in a TextCtrl within a MiniFrame on OS X. I'll file a bug for it - will need to check whether it's a OS X thing or a wxruby error. > - On selecting a method in the list the HtmlWindow redirects to the > associated page. This works fine for standard links, but for anchors > it always results in the popup box 'Ruby Warning' - 'HTML anchor xxx > does not exist.', on both windows and OS X. The wxruby docs use modern-style HTML anchors (

    ) not old style (

    ...). Unfortunately the generic HTML widget only knows about the latter. This will be hard to fix , but a quicker route is to old-ify the documentation: docs_dir = 'D:\path\to\wxruby-docs-0.0.38\doc\html' Dir.glob(File.join(docs_dir, "*.html") ) do | old | content = File.read(old) content.gsub!(/<(\w+) id="(\w+)"/, %q|<\1 id="\2"|) File.open(old, 'w') { | f | f.write(content) } end cheers alex From ruby at bandkbroom.com Wed Jan 3 09:39:03 2007 From: ruby at bandkbroom.com (Brian C Broom) Date: Wed, 03 Jan 2007 09:39:03 -0500 Subject: [Wxruby-users] instalation problem In-Reply-To: <459B6E6F.70300@pressure.to> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> Message-ID: <459BC007.9000109@bandkbroom.com> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070103/146f9901/attachment.html From pedro.delgallego at gmail.com Wed Jan 3 10:05:09 2007 From: pedro.delgallego at gmail.com (Pedro Del Gallego) Date: Wed, 3 Jan 2007 16:05:09 +0100 Subject: [Wxruby-users] instalation problem In-Reply-To: <459B6E6F.70300@pressure.to> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> Message-ID: <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> hi, If i use the 486 version and Requiring rubygems fixed the problem for me too. > This is quite an old version now - are you able to use the i686-linux > version 0.0.38 gem? If not, please say and we will see if we can provide > newer i486-linux gem. Yes im able to use it. but i have a more strange error on this version i change to the wx-preview to i686-linux then i have this fail (Like Brian said): ruby asd.rb : $ ruby asd.rb (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6736): Gtk-CRITICAL **: gtk_rc_get_style: assertion `GTK_IS_WIDGET (widget)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6736): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (process:6736): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6736): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6736): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- wx_sugar/all (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from asd.rb:3 pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby asd.rb (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6760): Gtk-CRITICAL **: gtk_rc_get_style: assertion `GTK_IS_WIDGET (widget)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6760): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (process:6760): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6760): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6760): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6760): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed pedro at la-vaca-azul:~/work/rad/gui/wx$ clear; pedro at la-vaca-azul:~/work/rad/gui/wx$ ruby asd.rb (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6763): Gtk-CRITICAL **: gtk_rc_get_style: assertion `GTK_IS_WIDGET (widget)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed (process:6763): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (process:6763): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (process:6763): Gtk-CRITICAL **: gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6763): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:6763): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY (display)' failed -- ------------------------------------- Pedro Del Gallego Vida Email : pedro.delgallego at gmail.com IM Jabber : pedro.delgallego at jabber.org Telefono VoIP : pedro.delgallego in Skype. From ruby at bandkbroom.com Wed Jan 3 15:26:04 2007 From: ruby at bandkbroom.com (Brian C Broom) Date: Wed, 03 Jan 2007 15:26:04 -0500 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> Message-ID: <459C115C.8010909@bandkbroom.com> I'm working through some examples (and translating python), so I'm not sure if I'm doing something wrong or what... When I try image = Wx::Image.new('cover.jpg', Wx::BITMAP_TYPE_JPEG) I get an error box with "No image handler for type 17 defined.". I get a similar error for .gif files. (this is using wxRuby 0.6.0 on Ubuntu linux with ruby 1.8.4, if that makes any difference) Brian From alex at pressure.to Wed Jan 3 15:34:43 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 03 Jan 2007 20:34:43 +0000 Subject: [Wxruby-users] instalation problem In-Reply-To: <459BC007.9000109@bandkbroom.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <459BC007.9000109@bandkbroom.com> Message-ID: <459C1363.1010200@pressure.to> Brian C Broom wrote: > I was having the same issue on my linux machine. Requiring rubygems > fixed the problem, but only for the 486 version. If I try to run the > 686 version, I get glibc errors. I am fairly new to linux, so I may > not have things setup correctly. It's very unlikely to be your set up - I think just that the newer 0.0.38 library is not built in a way that's compatible with your system. Could you mention the distro you're using please?. If any of the dev team (Kevin?) are able to provide an i486 gem for 0.0.38, please let me know. Or any info on how to build a backwards-compatible gem. thanks alex From alex at pressure.to Wed Jan 3 15:43:58 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 03 Jan 2007 20:43:58 +0000 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <459C115C.8010909@bandkbroom.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> <459C115C.8010909@bandkbroom.com> Message-ID: <459C158E.1050201@pressure.to> Hi Brian Thanks for the report. > image = Wx::Image.new('cover.jpg', Wx::BITMAP_TYPE_JPEG) > This looks correct. Are you sure you're in the same directory as 'cover.jpg' when you make this call? > I get an error box with "No image handler for type 17 defined.". I get > a similar error for .gif files. > Did you build your own WxWidgets or use the one that comes with the distro? It may be that the WxWidgets you're using doesn't have jpeg support built in. We might be able to tell if you post the output of wx-config --libs > (this is using wxRuby 0.6.0 on Ubuntu linux with ruby 1.8.4, if that > makes any difference) I'm afraid we're very unlikely to investigate or fix any issues reported with wxruby 0.6.0; it's now considered superceded by wxruby2. If you can reproduce the problem with current wxruby2-preview we will be happy to help. The binary builds offered on rubyforge should guarantee jpeg support. cheers alex From alex at pressure.to Wed Jan 3 15:51:14 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 03 Jan 2007 20:51:14 +0000 Subject: [Wxruby-users] instalation problem In-Reply-To: <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> Message-ID: <459C1742.8030302@pressure.to> Pedro Del Gallego wrote: > i change to the wx-preview to i686-linux then i have this fail (Like > Brian said): > You have a couple of different errors and warnings mixed together here: > $ ruby asd.rb > > (process:6736): GLib-GObject-CRITICAL **: gtype.c:2240: initialization > assertion failed, use IA__g_type_init() prior to this function > ... > (process:6736): GLib-GObject-CRITICAL **: g_type_add_interface_static: > assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed > ... > (process:6736): Gtk-CRITICAL **: gtk_rc_get_style: assertion > `GTK_IS_WIDGET (widget)' failed These warnings messages are a known bug - but seem to be harmless. See: http://rubyforge.org/tracker/index.php?func=detail&aid=6633&group_id=35&atid=218 I have just tracked down the source of these annoying messages so it should be fixed in the next release. > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- wx_sugar/all > (LoadError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from asd.rb:3 > This is a fatal ruby error - you are trying to require the 'wx_sugar' library, but it appears you haven't installed it. To fix this, install it: sudo gem install wx_ruby cheers alex From hawleyw at gmail.com Wed Jan 3 22:56:08 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Wed, 3 Jan 2007 22:56:08 -0500 Subject: [Wxruby-users] grid control example doesn't work on osx.4 Message-ID: Hi, I am trying to use wxruby2-preview (0.0.38) on my intel macbook running os10.4.8. I am having a beast of a time running the examples in the tutorials. The super basic frame example worked but the simple grid tutorial bombs with the following message: ------ [WhiteGhost:~/tmp/wxStff] hjw$ ruby ./grid.rb /usr/local/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686- darwin8.4.1/lib/wx/classes/app.rb:10: warning: method redefined; discarding old on_assert ./grid.rb:10: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3] Abort trap --------------- The code is below, line 10 is the call to tgrid = Wx::Grid.new(frame, -1), what the heck am I missing? The bigdemo works (although it usually crashes after I've run a three or four of the demos) so I think that everything's installed properly on my system. I copied the code below from the tutorial---------- #!/usr/bin/env ruby -w require 'rubygems' require 'wx' app = Wx::App.new frame = Wx::Frame.new( nil , -1 , "MiniApp" ) #grid = Wx::Grid.new( frame , 2000, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::WANTS_CHARS,"this the panel name" ) tgrid = Wx::Grid.new(frame, -1) tgrid.create_grid( 19 , 16 ) frame.show() app.main_loop() --------- Any help would be appreciated I have to get a little utility running on my mac and a windows machine before the 18th. Sincerely, Hawley From ruby at bandkbroom.com Wed Jan 3 23:42:24 2007 From: ruby at bandkbroom.com (Brian C Broom) Date: Wed, 03 Jan 2007 23:42:24 -0500 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <459C158E.1050201@pressure.to> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> <459C115C.8010909@bandkbroom.com> <459C158E.1050201@pressure.to> Message-ID: <459C85B0.8000203@bandkbroom.com> These errors were with the distro version of wxWindows (2.6, I think). I loaded some other libwx* bits, with the same result. I also compiled from source for 2.8, also with the same error. $ wx-config --libs -L/usr/local/lib -pthread -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8 running under wxruby2-preview 0.0.36 (the latest one I can install) gives the same error, and some console output App.cpp new Director 0x81f57e4 Calling wxEntry, this=0x81f5780 Our Initialize was called Their Initialize returned 1 OnInitGui before OnInitGui after Image.cpp new Director 0x826c270 Frame.cpp new Director 0x826c6b4 warning box shows "No image handler for type 17 defined", clicking ok exits the program. any ideas? Brian Alex Fenton wrote: > Hi Brian > > Thanks for the report. > >> image = Wx::Image.new('cover.jpg', Wx::BITMAP_TYPE_JPEG) >> >> > This looks correct. Are you sure you're in the same directory as > 'cover.jpg' when you make this call? > >> I get an error box with "No image handler for type 17 defined.". I get >> a similar error for .gif files. >> >> > Did you build your own WxWidgets or use the one that comes with the > distro? It may be that the WxWidgets you're using doesn't have jpeg > support built in. We might be able to tell if you post the output of > wx-config --libs > >> (this is using wxRuby 0.6.0 on Ubuntu linux with ruby 1.8.4, if that >> makes any difference) >> > I'm afraid we're very unlikely to investigate or fix any issues reported > with wxruby 0.6.0; it's now considered superceded by wxruby2. > > If you can reproduce the problem with current wxruby2-preview we will be > happy to help. The binary builds offered on rubyforge should guarantee > jpeg support. > > cheers > alex > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From alex at pressure.to Thu Jan 4 01:29:13 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 04 Jan 2007 06:29:13 +0000 Subject: [Wxruby-users] grid control example doesn't work on osx.4 In-Reply-To: References: Message-ID: <459C9EB9.7090705@pressure.to> Hi Hawley > I am trying to use wxruby2-preview (0.0.38) on my intel macbook > running os10.4.8. I am having a beast of a time running the examples > in the tutorials. Apologies, it appears no-one has reviewed the code in the wiki tutorials for some time, and they have got out of date. Suggest you refer to the samples supplied with wxruby2-preview in preference. > The code is below, line 10 is the call to tgrid = Wx::Grid.new(frame, > -1), what the heck am I missing? The tutorial and the example you give are trying to create widgets (Frames, Grids) outside of the on_init loop of you App. This will definitely cause the kind of problems you're seeing. Try structuring your code like this: require 'wx' class GridApp < Wx::App def on_init frame = Wx::Frame.new(nil, -1, "Grid wxRuby App") grid = Wx::Grid.new(frame, -1) grid.create_grid(5, 5) frame.show() end end GridApp.new.main_loop > Any help would be appreciated I have to get a little utility running > on my mac and a windows machine before the 18th. > Thanks for trying wxruby - but to be honest, if you're up against a deadline right now I'd suggest using Tk or Fox whose ruby bindings are more mature. good luck alex From sean.m.long at gmail.com Thu Jan 4 01:35:12 2007 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 3 Jan 2007 22:35:12 -0800 Subject: [Wxruby-users] grid control example doesn't work on osx.4 In-Reply-To: References: Message-ID: Hawley, Try using this version, you need to subclass Wx::App: #!/usr/bin/env ruby -w require 'rubygems' require 'wx' class MyApp < Wx::App def on_init frame = Wx::Frame.new( nil , -1 , "MiniApp" ) tgrid = Wx::Grid.new(frame, -1) tgrid.create_grid( 19 , 16 ) frame.show() end end MyApp.new().main_loop() This works on intel iMac Sean On 1/3/07, Hawley Waldman wrote: > Hi, > I am trying to use wxruby2-preview (0.0.38) on my intel macbook > running os10.4.8. I am having a beast of a time running the examples > in the tutorials. The super basic frame example worked but the > simple grid tutorial bombs with the following message: > ------ > [WhiteGhost:~/tmp/wxStff] hjw$ ruby ./grid.rb > > /usr/local/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686- > darwin8.4.1/lib/wx/classes/app.rb:10: warning: method redefined; > discarding old on_assert > ./grid.rb:10: [BUG] Bus Error > ruby 1.8.4 (2005-12-24) [i686-darwin8.8.3] > > Abort trap > --------------- > > The code is below, line 10 is the call to tgrid = Wx::Grid.new(frame, > -1), what the heck am I missing? The bigdemo works (although it > usually crashes after I've run a three or four of the demos) so I > think that everything's installed properly on my system. I copied the > code below from the tutorial---------- > > #!/usr/bin/env ruby -w > > require 'rubygems' > require 'wx' > > app = Wx::App.new > frame = Wx::Frame.new( nil , -1 , "MiniApp" ) > #grid = Wx::Grid.new( frame , 2000, Wx::DEFAULT_POSITION, > Wx::DEFAULT_SIZE, Wx::WANTS_CHARS,"this the panel name" ) > tgrid = Wx::Grid.new(frame, -1) > tgrid.create_grid( 19 , 16 ) > frame.show() > app.main_loop() > > --------- > > Any help would be appreciated I have to get a little utility running > on my mac and a windows machine before the 18th. > > Sincerely, > Hawley > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From alex at pressure.to Thu Jan 4 02:14:29 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 04 Jan 2007 07:14:29 +0000 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <459C85B0.8000203@bandkbroom.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> <459C115C.8010909@bandkbroom.com> <459C158E.1050201@pressure.to> <459C85B0.8000203@bandkbroom.com> Message-ID: <459CA955.9030404@pressure.to> Brian C Broom wrote: > These errors were with the distro version of wxWindows (2.6, I think). I > loaded some other libwx* bits, with the same result. I also compiled > from source for 2.8, also with the same error. > The wx-config info you shows suggests wxWidgets was not compiled with built-in jpeg support - otherwise I would expect it to include -lwx_jpeg or similar. Note that at the moment wxruby2 doesn't work with the recently released 2.8.0 - we will be looking to update, probably after 2.8.1 comes out. > running under wxruby2-preview 0.0.36 (the latest one I can install) > gives the same error, and some console output > This is an old alpha release; I'm sorry we can't help using that. Since there is no current binary for your platform, you'll need to build from source. 1) first - build and install wxWidgets *2.6.3*, using the options given here: http://wxruby.rubyforge.org/wiki/wiki.pl?Release_HowTo 2) Then build wxruby2 http://wxruby.rubyforge.org/wiki/wiki.pl?Installation We'll be happy to help with build problems or bugs reported against that set-up. cheers alex From hawleyw at gmail.com Thu Jan 4 09:14:54 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Thu, 4 Jan 2007 09:14:54 -0500 Subject: [Wxruby-users] grid control example doesn't work on osx.4 In-Reply-To: <459C9EB9.7090705@pressure.to> References: <459C9EB9.7090705@pressure.to> Message-ID: Hi Alex, Thanks for explaining the problem. Doing things from within on_init took care of the problem. The project that I'm using this for is just a small display type program(read hack) so, now that I understand why the simplest of things was bombing I can put in a few hours to get things working on my mac and then test it on a windows machine. I'd like to be able to stick with wxRuby because of it's use of native widgets. thanks again, Hawley > Hi Hawley > > >> I am trying to use wxruby2-preview (0.0.38) on my intel macbook >> running os10.4.8. I am having a beast of a time running the examples >> in the tutorials. >> > Apologies, it appears no-one has reviewed the code in the wiki > tutorials > for some time, and they have got out of date. Suggest you refer to the > samples supplied with wxruby2-preview in preference. > >> The code is below, line 10 is the call to tgrid = Wx::Grid.new(frame, >> -1), what the heck am I missing? >> > The tutorial and the example you give are trying to create widgets > (Frames, Grids) outside of the on_init loop of you App. This will > definitely cause the kind of problems you're seeing. Try structuring > your code like this: > > require 'wx' > > class GridApp < Wx::App > def on_init > frame = Wx::Frame.new(nil, -1, "Grid wxRuby App") > grid = Wx::Grid.new(frame, -1) > grid.create_grid(5, 5) > frame.show() > end > end > > GridApp.new.main_loop From ruby at bandkbroom.com Thu Jan 4 12:03:29 2007 From: ruby at bandkbroom.com (Brian C Broom) Date: Thu, 04 Jan 2007 12:03:29 -0500 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <459CA955.9030404@pressure.to> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> <459C115C.8010909@bandkbroom.com> <459C158E.1050201@pressure.to> <459C85B0.8000203@bandkbroom.com> <459CA955.9030404@pressure.to> Message-ID: <459D3361.50408@bandkbroom.com> Ok, I've managed to install these (wasn't too hard, but had to update SWIG also). Wx-config is reporting the correct version, and now lists the image libs. I'm not convinced that the wxRuby I built from source is being used, and not the gem. Is there an easy way to see which version is being loaded? I guess I could gem uninstall (probally should anyway) to make sure I'm getting the correct things. After this, I get the long list of (process:27701): GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function (process:27701): GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function (process:27701): GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function (process:27701): GLib-GObject-CRITICAL **: gtype.c:2215: initialization assertion failed, use IA__g_type_init() prior to this function (process:27701): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed (etc...) that was reported by someone else. Thanks so much for your help. I guess I'll keep on the lookout for the next version. Brian Alex Fenton wrote: > Brian C Broom wrote: > >> These errors were with the distro version of wxWindows (2.6, I think). I >> loaded some other libwx* bits, with the same result. I also compiled >> from source for 2.8, also with the same error. >> >> > The wx-config info you shows suggests wxWidgets was not compiled with > built-in jpeg support - otherwise I would expect it to include -lwx_jpeg > or similar. > > Note that at the moment wxruby2 doesn't work with the recently released > 2.8.0 - we will be looking to update, probably after 2.8.1 comes out. > >> running under wxruby2-preview 0.0.36 (the latest one I can install) >> gives the same error, and some console output >> >> > This is an old alpha release; I'm sorry we can't help using that. Since > there is no current binary for your platform, you'll need to build from > source. > > 1) first - build and install wxWidgets *2.6.3*, using the options given > here: > http://wxruby.rubyforge.org/wiki/wiki.pl?Release_HowTo > > 2) Then build wxruby2 > http://wxruby.rubyforge.org/wiki/wiki.pl?Installation > > We'll be happy to help with build problems or bugs reported against that > set-up. > > cheers > alex > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From slamboy at gmail.com Thu Jan 4 13:03:28 2007 From: slamboy at gmail.com (Jason Mayer) Date: Thu, 4 Jan 2007 12:03:28 -0600 Subject: [Wxruby-users] new user Message-ID: <5ae8cc980701041003o7a701e1csa6bbb872e37960ba@mail.gmail.com> First time using wxruby, and I'm curious if there are searchable archives so I don't post the same old questions - like "where do I file bugs" etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070104/a371b426/attachment.html From alex at pressure.to Thu Jan 4 15:06:48 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 04 Jan 2007 20:06:48 +0000 Subject: [Wxruby-users] new user In-Reply-To: <5ae8cc980701041003o7a701e1csa6bbb872e37960ba@mail.gmail.com> References: <5ae8cc980701041003o7a701e1csa6bbb872e37960ba@mail.gmail.com> Message-ID: <459D5E58.4090403@pressure.to> Jason Mayer wrote: > First time using wxruby, Welcome > and I'm curious if there are searchable archives so I don't post the > same old questions http://rubyforge.org/pipermail/wxruby-users/ http://rubyforge.org/pipermail/wxruby-development/ There's no dedicated search for the archive, but including 'wxruby-users' in a google search and doing 'more results' has much the same effect > - like "where do I file bugs" etc. here: http://rubyforge.org/tracker/?group_id=35 cheers alex From alex at pressure.to Thu Jan 4 15:08:31 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 04 Jan 2007 20:08:31 +0000 Subject: [Wxruby-users] Issue with Wx::Image In-Reply-To: <459D3361.50408@bandkbroom.com> References: <2e93189b0701021918n9d51568t9aec98a90e83060b@mail.gmail.com> <459B6E6F.70300@pressure.to> <2e93189b0701030705u13266b8fgcab7e2b3527faec6@mail.gmail.com> <459C115C.8010909@bandkbroom.com> <459C158E.1050201@pressure.to> <459C85B0.8000203@bandkbroom.com> <459CA955.9030404@pressure.to> <459D3361.50408@bandkbroom.com> Message-ID: <459D5EBF.5050102@pressure.to> Brian C Broom wrote: > Is there an easy way to see which > version is being loaded? puts Wx::WXRUBY_VERSION glad the install went well alex From paul.allton at uk.bnpparibas.com Fri Jan 5 04:25:21 2007 From: paul.allton at uk.bnpparibas.com (paul.allton at uk.bnpparibas.com) Date: Fri, 5 Jan 2007 09:25:21 +0000 Subject: [Wxruby-users] Simple wxRuby Doc Browser In-Reply-To: <459BBCC2.20803@pressure.to> Message-ID: >The wxruby docs use modern-style HTML anchors (

    ) not old >style (

    ...). Unfortunately the generic HTML widget >only knows about the latter. This will be hard to fix , but a quicker >route is to old-ify the documentation: >docs_dir = 'D:\path\to\wxruby-docs-0.0.38\doc\html' >Dir.glob(File.join(docs_dir, "*.html") ) do | old | > content = File.read(old) > content.gsub!(/<(\w+) id="(\w+)"/, %q|<\1 id="\2"|) > File.open(old, 'w') { | f | f.write(content) } >end Nice one, thanks Alex. Are there any plans to include the docs in the gem install rather than a seperate download? This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ********************************************************************************************** BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070105/43f0b010/attachment.html From paul.allton at uk.bnpparibas.com Fri Jan 5 09:18:45 2007 From: paul.allton at uk.bnpparibas.com (paul.allton at uk.bnpparibas.com) Date: Fri, 5 Jan 2007 14:18:45 +0000 Subject: [Wxruby-users] wxRuby GUI driver ... programmatically open and close an app In-Reply-To: <45910D51.9080308@pressure.to> Message-ID: Hi, As part of the ongoing spike to build an API for driving wxruby UI's (as discussed in previous threads) - I'm wondering what the best way is to programmatically open and close an app. Below is sample test using what have so far... but there are some issues I can't seem to get around: (1) In the test setup I'm launching the app, but I have to jump through some hoops to stop the application from blocking (especially on windows). It sort of works if I spawn a thread ... and (this bit really sucks) add a timer to the app that yields every now and then .. like so: @timer = Timer.new(self, -1) @timer.start(10) evt_timer(@timer.id) {|e| self.yield } This seems rather nasty .. is there a better way? Also, whilst this is very snappy on OSX, it seems v. slow on windows. (2) In teardown, I'm trying to stop the app, which seems to work fine (i.e. it disappears). The problem is that if I add a second test case, the second time it enters setup and tries to start the app.main_loop it blows up. On windows with a Segmentation fault, on OS X with a bus error. Clearly, I'm not doing this quite right, any ideas? p. ################################################################# (note: this won't run on its own, its just for info) class CollectTest < Test::Unit::TestCase def setup Thread.critical = false app_thread = Thread.new { @app = GtdApp.new @app.main_loop } app_thread.priority = -1 sleep 1 Thread.critical = true end def test_something type('wibble', in_(GtdFrame::COLLECT_CONTENT)) click(GtdFrame::COLLECT_SAVE) assert_equal('', text(component(in_(GtdFrame::COLLECT_CONTENT)))) selection(in_(GtdFrame::NOTEBOOK)).choose(GtdFrame::PROCESS_PAGE) assert_equal(GtdFrame::PROCESS_PAGE, selection(in_(GtdFrame::NOTEBOOK)).selected_value) assert_equal('wibble', text(component(in_(GtdFrame::PROCESS_CONTENT)))) end def teardown @app.top_window.destroy @app.exit_main_loop @app = nil GC.start end end This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ********************************************************************************************** BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070105/6e04707f/attachment.html From alex at pressure.to Mon Jan 8 03:48:11 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 08 Jan 2007 08:48:11 +0000 Subject: [Wxruby-users] Simple wxRuby Doc Browser In-Reply-To: References: Message-ID: <45A2054B.5040906@pressure.to> > Are there any plans to include the docs in the gem install rather than > a seperate download? There's no technical reason why not; it could be changed. We went for separate download to allow people to unpack the docs somewhere that suited them, rather than a directory deep inside ruby/lib/gem/... a thought on DocBrowser - you might take a look at HtmlHelpController - it would need a few extra files to be generated, but offers keyword search and hierarchical indexes etc for html docs alex From alex at pressure.to Mon Jan 8 04:19:41 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 08 Jan 2007 09:19:41 +0000 Subject: [Wxruby-users] wxRuby GUI driver ... programmatically open and close an app In-Reply-To: References: Message-ID: <45A20CAD.4070501@pressure.to> paul.allton at uk.bnpparibas.com wrote: > (1) In the test setup I'm launching the app, but I have to jump > through some hoops to stop the application from blocking (especially > on windows). Do you mean that once you've entered main_loop no further code is executed? > It sort of works if I spawn a thread ... and (this bit really sucks) > add a timer to the app that yields every now and then .. ... > is there a better way? If you want to execute arbitrary outside code in the context of a running app, you can have the constructor or main_loop accept a block, store it and yield to that at the end of on_init. You could use a module to isolate this from the code under test (adapted from real code but untested) module TestingApp def run_on_init(&block) @run_on_init = block end def on_init(*args) super if @run_on_init @run_on_init.call(self) end true end end app = MyApp.new app.extend(TestingApp) app.run_on_init { # testing code here } app.main_loop > (2) In teardown, I'm trying to stop the app, which seems to work fine > (i.e. it disappears). The problem is that if I add a second test > case, the second time it enters setup and tries to start the > app.main_loop it blows up. This won't work - stick to one instance of Wx::App per script. I asked about this on the wx list recently, and seems no easy way for the wrapper to get round this at the moment. cheers alex From hawleyw at gmail.com Tue Jan 9 11:27:47 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Tue, 9 Jan 2007 11:27:47 -0500 Subject: [Wxruby-users] help w/push_event_handler plus doc update request Message-ID: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> Hi, 1) Can the online api docs get updated? Specifically can the overview pages get added in to the main http://wxruby.rubyforge.org/doc/ index.html page? I happened upon the link to the Event Overview page while browsing some class and wished that it had been listed in the Event section of the index page.I don't know how many other "overview" pages there are but it doesn't make much sense that they aren't visible on the main outline page and that you only find out about them if you read a page on a specific item and it mentions (and links to ) the overview page. I'd be happy to help out with this. 2) I am trying to figure out a best practice method of writing apps using wxRuby. I put the code for creating an application's main frame and setting up it's task bar icon in a separate file which I can require/load when I am writing a wxRuby app but I also need the flexibility to add event handlers to that main frame. push_event_handler's name suggests it's the way to go but I am not clear on how to use it. I know that I can add the method that I want triggered by an event to my frame with class << frameName def added_method ... end end but what are the specifics of making the frame-event-method connection? I want the code to look something like what I've pasted below, should this/ could this work? I'm sorry if I'm going about his all backwards, but most of my Ruby experience is via writing Rails web apps and I'm just starting to dig in to cooking up some non-trivial stand alone ruby apps. ------- #!/usr/bin/env ruby -w # require 'rubygems' require 'wx' load '/Users/hjw/tmp/wxStff/mainframe.wrb' class TinyApp < Wx::App def on_init frame = MainFrame.new("painter") setup_frame(frame) frame.show() end def setup_frame(frame) # setup my application's stuff here frame <----.push_event_handler here----> class << frame def on_paint puts ("handling on_paint") end #end on_paint end #end class< References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> Message-ID: <45A42531.5020905@pressure.to> Hi Hawley Hawley Waldman wrote: > can the overview pages get added in to the main http://wxruby.rubyforge.org/doc/ index.html page? That sounds like a very good idea. > I don't know how many other "overview" pages there are So far I've written the event handling and window styles overview; some of the html and treectrl material has been rolled into the docs for those classes. The WxWidgets docs come with a lot of overviews: http://www.wxwidgets.org/manuals/2.6/wx_overviews.html#overviews But many of these are not relevant to programming wxRuby. I would say the most urgent ones to add are - an 'anatomy of the a wxruby app' - similar to http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started - a sizer overview, similar to > I'd be happy to help out with this. > > > 2) I am trying to figure out a best practice method of writing apps > using wxRuby. I put the code for creating an application's main frame > and setting up it's task bar icon in a separate file which I can > require/load when I am writing a wxRuby app but I also need the > flexibility to add event handlers to that main frame. > push_event_handler's name suggests it's the way to go but I am not > clear on how to use it. I know that I can add the method that I want > triggered by an event to my frame with > class << frameName > def added_method > ... > end > end > > but what are the specifics of making the frame-event-method connection? > > I want the code to look something like what I've pasted below, should > this/ could this work? I'm sorry if I'm going about his all > backwards, but most of my Ruby experience is via writing Rails web > apps and I'm just starting to dig in to cooking up some non-trivial > stand alone ruby apps. > > ------- > #!/usr/bin/env ruby -w > # > require 'rubygems' > require 'wx' > load '/Users/hjw/tmp/wxStff/mainframe.wrb' > > class TinyApp < Wx::App > def on_init > frame = MainFrame.new("painter") > setup_frame(frame) > frame.show() > end > > def setup_frame(frame) # setup my application's stuff here > frame <----.push_event_handler here----> > class << frame > def on_paint > puts ("handling on_paint") > end #end on_paint > end #end class< end #end setup_frame > > end #end TinyApp > > TinyApp.new.main_loop > > ----------------- > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From alex at pressure.to Tue Jan 9 18:52:41 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 09 Jan 2007 23:52:41 +0000 Subject: [Wxruby-users] help w/push_event_handler plus doc update request In-Reply-To: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> Message-ID: <45A42AC9.3030700@pressure.to> Sorry, fingers fumbled onto 'send': Hawley Waldman wrote: > I'd be happy to help out with this. > Great. Best way to start would be to check out the currrent subversion tree svn checkout svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 The docs are kept in doc/textile. You'll need rake and redcloth installed if you want to generate the html docs. If you wanted to add links to the home page to the overviews, the homepage is index.txtl. We'll be very happy to receive patches or updated files for the docs on the mailing list. > 2) I am trying to figure out a best practice method of writing apps > using wxRuby. I put the code for creating an application's main frame > and setting up it's task bar icon in a separate file which I can > require/load when I am writing a wxRuby app but I also need the > flexibility to add event handlers to that main frame. > Perhaps you could say a little bit more about what you're trying to do. Most often you'll want to set up the frame's event handlers within the definition of your MainFrame class, within the initialize method. More generally I'd suggest this is a good coding strategy in wxRuby - encapsulate the behaviours of frames and widgets (how they're drawn, how they can change appearance, what information they yield, how they respond to events etc) within subclasses. So rather than having a 'setup_frame' method within App, the same work is done within the frame's class definition. If you have some behaviour you want to share between Frame types, and some you don't, just create further subclasses as needed. This approach saves a fair bit of typing referring to object instances, and I find it also helps tighten up the purpose and design of the UI elements. > push_event_handler's name suggests it's the way to go but I am not > clear on how to use it. I've never needed to use that method - I think in almost all cases you'll want to use the evt_xxx methods to set up event handlers. They are public methods, so, coming back to your question, you can call them on another object to set up that frame's event handlers; following your example frame = MainFrame.new(...) # set up an event handler from outside a class frame.evt_size { ... } > but what are the specifics of making the frame-event-method connection? > Using evt_xxx - what event are you trying to listen for? > I want the code to look something like what I've pasted below, should > this/ could this work? To me it looks like that code could be a lot simpler - I'm not sure you need all the class << frame stuff. hth alex From hawleyw at gmail.com Wed Jan 10 00:12:26 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Wed, 10 Jan 2007 00:12:26 -0500 Subject: [Wxruby-users] help w/push_event_handler plus doc update request In-Reply-To: <45A42AC9.3030700@pressure.to> References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> <45A42AC9.3030700@pressure.to> Message-ID: Hi Alex, Here's a patch for index.txtl to add the overview pages. From what I saw in the svn tree I'd need to download the source for wxWidgets (or get the SDK, or something like that) if I wanted to help you delve any deeper into helping with updating / porting the docs since they are generated from the latex docs that are a part of wxWidgets. -Hawley --- index.txtl 2007-01-09 23:50:40.000000000 -0500 +++ index.txtl.new 2007-01-09 23:39:07.000000000 -0500 @@ -11,6 +11,9 @@ * There are links to C++ tutorials and topic overviews that are not currently available in this documentation +You can also read the "window styles overview":windowstyles.html for some general information +on windows styles and wxRuby constants. + As the wxRuby API is developed, this documentation will be updated with Ruby-specific information. @@ -162,6 +165,7 @@ An event object contains information about a specific event. Event handlers blocks may optionally receive a single block parameter, which will be an Event object of the appropriate class. +For general information about events, see the "Event handling overview":eventhandlingoverview.html. |ActivateEvent|A window or application activation event| |CalendarEvent|Used with wxCalendarCtrl| From alex at pressure.to Wed Jan 10 05:11:01 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 10 Jan 2007 10:11:01 +0000 Subject: [Wxruby-users] help w/push_event_handler plus doc update request In-Reply-To: References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> <45A42AC9.3030700@pressure.to> Message-ID: <45A4BBB5.9010001@pressure.to> Hawley Waldman wrote: > Here's a patch for index.txtl to add the overview pages. Thanks very much; I'll apply and update the online docs later today. It's even easier for us to apply patches submitted as attachments: http://wxruby.rubyforge.org/wiki/wiki.pl?How_To_Create_And_Submit_Patches > From what I > saw in the svn tree I'd need to download the source for wxWidgets (or > get the SDK, or something like that) if I wanted to help you delve > any deeper into helping with updating / porting the docs since they > are generated from the latex docs that are a part of wxWidgets. > No, the wxruby docs are generated just from the textile sources in SVN. Only redcloth, rake and a working wxruby2 lib are needed. The classes listed on the rendered html home page will reflect the classes actually supported by your wxruby2 library. The latex_parser is in there for reference, and so when we upgrade to wxWidgets 2.8.0 (and beyond) we can translate their latex docs for new wx classes into textile. But the latex sources aren't needed for the day-to-day generation of wxruby docs. cheers alex From hawleyw at gmail.com Wed Jan 10 08:12:47 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Wed, 10 Jan 2007 08:12:47 -0500 Subject: [Wxruby-users] help w/push_event_handler plus doc update request In-Reply-To: <45A4BBB5.9010001@pressure.to> References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> <45A42AC9.3030700@pressure.to> <45A4BBB5.9010001@pressure.to> Message-ID: Hmmn, Sorry I bozo'd the patch. It was late and I didn't think that the mailing list would let attachments through (and I didn't think to look on the site for a how-to patch). > No, the wxruby docs are generated just from the textile sources in > SVN. > Only redcloth, rake and a working wxruby2 lib are needed. The classes > listed on the rendered html home page will reflect the classes > actually > supported by your wxruby2 library. > > The latex_parser is in there for reference, and so when we upgrade to > wxWidgets 2.8.0 (and beyond) we can translate their latex docs for new > wx classes into textile. But the latex sources aren't needed for the > day-to-day generation of wxruby docs. > But if I wanted to help get some more of the overviews ported (you mentioned 'anatomy' and sizer) I'd need the latex source? -Hawley From alex at pressure.to Wed Jan 10 08:37:31 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 10 Jan 2007 13:37:31 +0000 Subject: [Wxruby-users] help w/push_event_handler plus doc update request In-Reply-To: References: <70A6FE78-3741-45A1-881D-F42705463B84@gmail.com> <45A42AC9.3030700@pressure.to> <45A4BBB5.9010001@pressure.to> Message-ID: <45A4EC1B.3040808@pressure.to> > But if I wanted to help get some more of the overviews ported (you > mentioned 'anatomy' and sizer) I'd need the latex source? > For those two specifically I was thinking we could adapt and update the already-written tutorials on the wiki. For the event handling one I started from scratch and just cut'n'pasted from the wxWidgets HTML docs as needed. I just reviewed the wxWidgets tutorials and only a small number seem relevant to wxRuby: - the overviews of control types (Dialogs); - the info on specific controls (eg TreeCtrl) could perhaps be rolled into the docs for that class, if it hasn't already been. - drawing, fonts, bitmaps - printing - character conversion and i18n - clipboard/d'n'd/dataobjects - but these aren't yet avail in wxruby2 anyway but think the best place to start is with the parts of wxruby that you found/find unclear or confusing, and wished there was better doc on... thanks alex From empower at smart.net Sat Jan 13 01:30:24 2007 From: empower at smart.net (Jamal Mazrui) Date: Sat, 13 Jan 2007 01:30:24 -0500 (EST) Subject: [Wxruby-users] wxruby2-preview 0.0.38 released In-Reply-To: <4589097B.7090103@pressure.to> References: <4589097B.7090103@pressure.to> Message-ID: I'm curious how the stability of the latest WxRuby2 preview compares to the previous WxRuby (1) release? Jamal From hawleyw at gmail.com Sun Jan 14 02:30:21 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Sun, 14 Jan 2007 02:30:21 -0500 Subject: [Wxruby-users] ListCtrl help Message-ID: <70C7D79A-BC6F-4A0B-ABCE-3ECC95424408@gmail.com> Is there any sample code around that sorts a virtual listctrl? I have loaded data into a ListCtrl and set things up so that if I click on a column heading on_col_left_click(event) gets called and it in turn sorts / reverses the sort of that column. I am printing out the data for debugging purposes so I know that my internal data representation is getting sorted but I nothing is getting updated in my window. The docs talk about using refresh_item(int) and refresh_items (start_int, end_int) to update the display but I'm getting an error message of: plekdb.rb:80:in `on_col_left_click': undefined method `refresh_item' for # (NoMethodError) I've no clue about what I'm missing and haven't been able to find anything helpful in the wxRuby sample code, the wxPython sample code, or the Cross-Platform GUI Programming with wxWidgets book (which I have access to online through safari) I also don't understand what I should be returning if the ListCtrl requests more rows than I have data for... right now I'm returning " " and ending up with blank lines in my table, but that seems rather inelegant. I'll post / send some sample code for sorting / displaying from a separate data source once I have it working and maybe you can add it to the samples library.... I'd expect that being able to quickly whip up a cross platform data viewer is a popular reason to use wxRuby. -Hawley ------------------- def on_col_left_click(event) @log.write_text("col clicked, id=%d" % event.get_column()) if @sort_column == event.get_column() @the_data.reverse! else @sort_column = event.get_column() @the_data.sort! {|a,b| a[@sort_column]<=>b[@sort_column]} end @the_data.each do |d| @log.write_text( "%s %s" % [d[0], d[4]]) ## just sorting on the d[4] column while debugging end refresh_item(0) #ensure_visible(0) end #--------------------------------------------------- # These methods are callbacks for implementing the # "virtualness" of the list... Normally you would # determine the text, attributes and/or image based # on values from some external data source, but for # this demo we'll just calculate them def on_get_item_text(item, col) #return "Item %d, column %d" % [item,col] begin# return @the_data[item][col] rescue return " " end end -------------------------------------------------------------- From alex at pressure.to Sun Jan 14 06:50:00 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 14 Jan 2007 11:50:00 +0000 Subject: [Wxruby-users] wxruby2-preview 0.0.38 released In-Reply-To: References: <4589097B.7090103@pressure.to> Message-ID: <45AA18E8.3000302@pressure.to> Hi Jamal It depends which platform you look at. IMO, stability for 0.0.38: Windows - worse than wxruby 0.6.0 Linux - similar OS X - similar or better API coverage within classes is much better in wxruby2, so fewer ruby workarounds for missing methods. If you're considering upgrading your text editor app, I'd suggest waiting for 0.0.39 which will include numerous stability fixes. I'm currently working on one for the Windows crashes. alex Jamal Mazrui wrote: > I'm curious how the stability of the latest WxRuby2 preview compares to > the previous WxRuby (1) release? > > Jamal > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From alex at pressure.to Sun Jan 14 07:24:19 2007 From: alex at pressure.to (Alex Fenton) Date: Sun, 14 Jan 2007 12:24:19 +0000 Subject: [Wxruby-users] ListCtrl help In-Reply-To: <70C7D79A-BC6F-4A0B-ABCE-3ECC95424408@gmail.com> References: <70C7D79A-BC6F-4A0B-ABCE-3ECC95424408@gmail.com> Message-ID: <45AA20F3.8050903@pressure.to> Hi Hawley Hawley Waldman wrote: > The docs talk about using refresh_item(int) and refresh_items > (start_int, end_int) to update the display but I'm getting an error > message of: > plekdb.rb:80:in `on_col_left_click': undefined method `refresh_item' > for # (NoMethodError) > Thanks very much for the report. Turns out that refresh_item(s) methods were missing from our wx header files, and so from the ruby API. I've fixed this in SVN and they now work as described. > I also don't understand what I should be returning if the ListCtrl > requests more rows than I have data for... right now I'm returning " > " and ending up with blank lines in my table, but that seems rather > inelegant. > Are you using "set_item_count(@data.length)" to tell the ListCtrl how many data items you have? http://wxruby.rubyforge.org/doc/listctrl.html#ListCtrl_setitemcount > I'll post / send some sample code for sorting / displaying from a > separate data source once I have it working and maybe you can add it > to the samples library.... I'd expect that being able to quickly whip > up a cross platform data viewer is a popular reason to use wxRuby. > We'd be pleased to add it. I agree that with these fixes the virtual ListCtrl seems a nice & versatile feature. alex From hawleyw at gmail.com Sun Jan 14 17:56:09 2007 From: hawleyw at gmail.com (Hawley Waldman) Date: Sun, 14 Jan 2007 17:56:09 -0500 Subject: [Wxruby-users] ListCtrl help In-Reply-To: <45AA20F3.8050903@pressure.to> References: <70C7D79A-BC6F-4A0B-ABCE-3ECC95424408@gmail.com> <45AA20F3.8050903@pressure.to> Message-ID: Thanks Alex, I'll checkout the new version. I installed wxRuby (preview) as a gem and frankly my brain is preoccupied with the two guitars and a bass that I need to finish building by Tuesday, but I'd also like to have this little display thing done before I leave town with these instruments so could you please post here / email me off list with how to get and use the updated version? Sorry that I'm so brain dead right now, I haven't had a day off since the 1st because of the preparations for this trade show. Sincerely, Hawley On 1/14/07, Alex Fenton wrote: > > Hi Hawley > > Hawley Waldman wrote: > > The docs talk about using refresh_item(int) and refresh_items > > (start_int, end_int) to update the display but I'm getting an error > > message of: > > plekdb.rb:80:in `on_col_left_click': undefined method `refresh_item' > > for # (NoMethodError) > > > Thanks very much for the report. Turns out that refresh_item(s) methods > were missing from our wx header files, and so from the ruby API. I've > fixed this in SVN and they now work as described. > > I also don't understand what I should be returning if the ListCtrl > > requests more rows than I have data for... right now I'm returning " > > " and ending up with blank lines in my table, but that seems rather > > inelegant. > > > Are you using "set_item_count(@data.length)" to tell the ListCtrl how > many data items you have? > > http://wxruby.rubyforge.org/doc/listctrl.html#ListCtrl_setitemcount > > I'll post / send some sample code for sorting / displaying from a > > separate data source once I have it working and maybe you can add it > > to the samples library.... I'd expect that being able to quickly whip > > up a cross platform data viewer is a popular reason to use wxRuby. > > > We'd be pleased to add it. I agree that with these fixes the virtual > ListCtrl seems a nice & versatile feature. > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070114/b99f2b49/attachment.html From alex at pressure.to Mon Jan 15 05:16:01 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 15 Jan 2007 10:16:01 +0000 Subject: [Wxruby-users] ListCtrl help In-Reply-To: References: <70C7D79A-BC6F-4A0B-ABCE-3ECC95424408@gmail.com> <45AA20F3.8050903@pressure.to> Message-ID: <45AB5461.40703@pressure.to> Hawley Waldman wrote: > could you please post here / email me off list with how to get and use > the updated version? You'll need to checkout from SVN and build from source. See here: http://wxruby.rubyforge.org/wiki/wiki.pl?Installation and possibly here, if you haven't installed wxWidgets before: http://wxruby.rubyforge.org/wiki/wiki.pl?Release_HowTo If you already have SWIG and wxWidgets and a compiler, it's svn checkout svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 cd wxruby2 rake rake install alex From disha.albaqui at gmail.com Mon Jan 15 13:56:56 2007 From: disha.albaqui at gmail.com (Disha Al Baqui) Date: Mon, 15 Jan 2007 10:56:56 -0800 Subject: [Wxruby-users] wxRuby Installation using gem on windows In-Reply-To: References: Message-ID: <766db0e50701151056t222b637h20795ce65370a3f7@mail.gmail.com> Hi, I am having problems with running wxruby2 on windows. I have installed ruby through cygwin and have also installed the latest version of the wxRuby2 gem [wxruby2-preview (0.0.38)] When I try running this command ruby -rubygems minimal/minimal.rb I get this error message: /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i386-mswin32/lib/wxruby2.so: Permission denied - /usr/lib/ruby/gems/1.8/gems/wxruby2- preview-0.0.38-i386-mswin32/lib/wxruby2.so (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require. rb:33:in `require' from /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i386-mswin32 /lib/wx.rb:12 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require. rb:33:in `gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require. rb:33:in `require' from minimal/minimal.rb:6 So i decided to install the previous stable release of wxruby2 for windows as a gem [wxruby2-preview ( 0.0.36)] and this time i try running the same command again. However, i get this error message. Unable to load wxruby. Searched: /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.36-i386-mswin32/bin /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.36-i386-mswin32/lib /usr/lib/ruby/site_ruby/1.8 /usr/lib/ruby/site_ruby/1.8/i386-cygwin /usr/lib/ruby/site_ruby /usr/lib/ruby/1.8 /usr/lib/ruby/1.8/i386-cygwin I've also tried running ruby -rubygems -e "require 'wxruby2'" /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.36-i386-mswin32/lib/wxruby2.so: Permission denied - /usr/lib/ruby/gems/1.8/gems/wxruby2- preview-0.0.36-i386-mswin32/lib/wxruby2.so (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require' from -e:1 There actually is a file named wxruby2.so, and it's file permission in the lib folder is as follows: total 7.0M drwxr-xr-x+ 2 Owner None 0 Jan 14 22:08 wx/ -rw-r--r-- 1 Owner None 775 Jan 14 22:08 wx.rb -rw-r--r-- 1 Owner None 7.0M Jan 14 22:08 wxruby2.so Can anyone please help me? I'm new to both ruby and wxwidgets but i'd really like to get this working. -- Thanks, Disha Al Baqui -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070115/3002847a/attachment.html From roys at mindspring.com Mon Jan 15 14:28:59 2007 From: roys at mindspring.com (Roy Sutton) Date: Mon, 15 Jan 2007 14:28:59 -0500 Subject: [Wxruby-users] wxRuby Installation using gem on windows In-Reply-To: <766db0e50701151056t222b637h20795ce65370a3f7@mail.gmail.com> References: <766db0e50701151056t222b637h20795ce65370a3f7@mail.gmail.com> Message-ID: <45ABD5FB.7070409@mindspring.com> Disha Al Baqui wrote: > Hi, > > I am having problems with running wxruby2 on windows. > I have installed ruby through cygwin and have also installed the > latest version of the wxRuby2 gem [wxruby2-preview (0.0.38)] Hello Disha, The issue could be that the wxRuby2 gem is created for the native Windows build of Ruby, not the cygwin version. If you want Cygwin support you'll have to compile wxRuby2 yourself, I believe. Otherwise, use the Ruby 1 click installer and then install the gem. Roy From rogboone at yahoo.com Wed Jan 17 10:14:46 2007 From: rogboone at yahoo.com (Roggie Boone) Date: Wed, 17 Jan 2007 07:14:46 -0800 (PST) Subject: [Wxruby-users] Fedora 6 -- can't load wx Message-ID: <524331.28588.qm@web32515.mail.mud.yahoo.com> Hi, I've installed and used wxRuby on Win32, and am trying to install it on Linux for the first time. I'm running Fedora Core 6. Here is what I have installed, but as shown below, when I try to load wx, I'm told it cannot be loaded. I get the same error when trying to run some of the sample wxruby scripts. Sorry for the newbie question, but am I missing something obvious? Thanks in advance. Roggie ----------------------- ruby-rdoc-1.8.5.2-1.fc6 ruby-libs-1.8.5.2-1.fc6 ruby-docs-1.8.5.2-1.fc6 ruby-1.8.5.2-1.fc6 ruby-ri-1.8.5.2-1.fc6 ruby-irb-1.8.5.2-1.fc6 ruby-mode-1.8.5.2-1.fc6 wxGTK-2.6.3-2.6.3.2.3.fc6 wxGTK-gl-2.6.3-2.6.3.2.3.fc6 rubygems-0.9.0 Via gems, Successfully installed wxruby2-preview-0.0.38-i686-linux irb(main):001:0> require 'wx' LoadError: no such file to load -- wx from (irb):1:in `require' from (irb):1 irb(main):002:0> ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 From alex at pressure.to Wed Jan 17 16:41:38 2007 From: alex at pressure.to (Alex Fenton) Date: Wed, 17 Jan 2007 21:41:38 +0000 Subject: [Wxruby-users] Fedora 6 -- can't load wx In-Reply-To: <524331.28588.qm@web32515.mail.mud.yahoo.com> References: <524331.28588.qm@web32515.mail.mud.yahoo.com> Message-ID: <45AE9812.5070505@pressure.to> Hi Roggie Roggie Boone wrote: > Via gems, Successfully installed > wxruby2-preview-0.0.38-i686-linux > > irb(main):001:0> require 'wx' > LoadError: no such file to load -- wx > Does it help if you put require 'rubygems' before this? If you've installed wxruby as a gem, you must ensure that the rubygems library is loaded before you load wx. If this doesn't help, please could you try doing require 'wxruby2' after requiring rubgems, and sending us any error message you get. thanks alex From rogboone at yahoo.com Thu Jan 18 10:02:53 2007 From: rogboone at yahoo.com (Roggie Boone) Date: Thu, 18 Jan 2007 07:02:53 -0800 (PST) Subject: [Wxruby-users] Fedora 6 -- can't load wx Message-ID: <395368.69131.qm@web32505.mail.mud.yahoo.com> As a followup to my earlier post, it was requested that I try loading rubygems first. Here is what I get on Fedora Core 6 (and for additional info, I get the same thing on a Gentoo Linux setup). ------------------------ irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'wx' LoadError: /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so: cannot restore segment prot after reloc: Permission denied - /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so from /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require' from /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wx.rb:12 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require' from (irb):2 irb(main):003:0> ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know. From alex at pressure.to Thu Jan 18 10:14:23 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 18 Jan 2007 15:14:23 +0000 Subject: [Wxruby-users] Fedora 6 -- can't load wx In-Reply-To: <395368.69131.qm@web32505.mail.mud.yahoo.com> References: <395368.69131.qm@web32505.mail.mud.yahoo.com> Message-ID: <45AF8ECF.8030509@pressure.to> Roggie Boone wrote: > Here is what > I get on Fedora Core 6 (and for additional info, > I get the same thing on a Gentoo Linux setup). > > ------------------------ > irb(main):001:0> require 'rubygems' > => true > irb(main):002:0> require 'wx' > LoadError: > /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so: > cannot restore segment prot after reloc: Permission denied > This seems to be the problem. Apparently Fedora comes with SELinux enabled by default, which is what is stopping the wxruby library loading and giving this error message. I have no clue what SELinux is or is meant to do, but searching for "cannot restore segment prot after reloc" Fedora turned up a number of pages with what look to be likely solutions. hth alex From ccthiel at gmail.com Mon Jan 22 00:12:34 2007 From: ccthiel at gmail.com (Chris Thiel) Date: Sun, 21 Jan 2007 22:12:34 -0700 Subject: [Wxruby-users] Adding sizers to other sizers doesn't work Message-ID: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> Hello all, Running this on an Intel Mac OSX 10.4.8 ruby 1.8.4 (2005-12-24) [i686-darwin] wxruby2-preview (0.0.37) using zshell I'm having a heck of a time setting up a GUI with a differing number of widgets per row, resulting in a differing number or widgets per column. At first I tried to simply do something like the following: class CharacterInfoPanel < Wx::Panel def initialize(parent) super(parent) sizer = Wx::BoxSizer.new(Wx::VERTICAL) set_sizer(sizer) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) row_sizer.add(Wx::StaticText.new(self, -1, "Character Name")) row_sizer.add(Wx::Panel.new(self,-1, Wx::DEFAULT_POSITION, Wx::Size.new (10,1))) row_sizer.add(Wx::StaticText.new(self, -1, "Player Name")) sizer.add(row_sizer) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) character_name_text = Wx::TextCtrl.new(self, -1) row_sizer.add(character_name_text) player_name_text = Wx::TextCtrl.new(self, -1) row_sizer.add(player_name_text) sizer.add(row_sizer) end (I know adding the rows is ugly, but I'm not bothering 'ruby-izing' this until I figure this crap out.) This certainly produces the results I want, however when I quit the application I seem to be getting some rather strange errors. 1) gm_aid.rb:35: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin] zsh: abort ruby gm_aid.rb 2) zsh: illegal hardware instruction ruby gm_aid.rb Okay so then I decided to take a different approach, to see if things would work. I tried this without adding sizers to other sizers like so: class CharacterInfoPanel < Wx::Panel def initialize(parent) super(parent) sizer = Wx::BoxSizer.new(Wx::VERTICAL) set_sizer(sizer) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) row_sizer.add(Wx::StaticText.new(self, -1, "Character Name")) row_sizer.add(Wx::Panel.new(self,-1, Wx::DEFAULT_POSITION, Wx::Size.new (10,1))) row_sizer.add(Wx::StaticText.new(self, -1, "Player Name")) sizer.add(row) row = Wx::Panel.new(self,-1) row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) row.set_sizer(row_sizer) character_name_text = Wx::TextCtrl.new(self, -1) row_sizer.add(character_name_text) player_name_text = Wx::TextCtrl.new(self, -1) row_sizer.add(player_name_text) sizer.add(row) end Am I crazy to think this should work? Well, so when I quit the app I get no errors...however, it certainly doesn't set up my world like I expect. It seems when you do this, whenever you add a row, it simply clobbers the old row. So my static texts aren't even showing up, just my text controls...in the first row. It does seem to add a second row, but the row is completely blank. So if I were to copy setting up the two rows and paste it a few times, I'd still only wind up with one row with any actual controls in it...and then several blank rows. Anyone have any ideas here? This is driving me up the wall...and down the other side. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070121/065d1d9d/attachment.html From ccthiel at gmail.com Mon Jan 22 00:18:45 2007 From: ccthiel at gmail.com (Chris Thiel) Date: Sun, 21 Jan 2007 22:18:45 -0700 Subject: [Wxruby-users] Adding sizers to other sizers doesn't work In-Reply-To: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> References: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> Message-ID: <4d25b66d0701212118x7d57f3bak9e035dfb280a9209@mail.gmail.com> On a side note, just upgraded to wxruby2-preview 0.0.38 (i686-darwin8.4.1) and still getting the same behavior. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070121/1d6119e3/attachment.html From alex at pressure.to Mon Jan 22 03:51:07 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 22 Jan 2007 08:51:07 +0000 Subject: [Wxruby-users] Adding sizers to other sizers doesn't work In-Reply-To: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> References: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> Message-ID: <45B47AFB.8040606@pressure.to> Hi Chris > I'm having a heck of a time setting up a GUI with a differing number > of widgets per row, resulting in a differing number or widgets per > column. Yep, sizers are flexible but a bit tricky. > At first I tried to simply do something like the following: You're very close, but you've added extra panels into the hierarchy where they're not needed. If you're nesting sizers, just add the subordinate (horiz) sizer directly to the parent (vert) one. The sub sizer doesn't need to be associated with a Wx::Window. > class CharacterInfoPanel < Wx::Panel > def initialize(parent) > super(parent) > sizer = Wx::BoxSizer.new(Wx::VERTICAL) > set_sizer(sizer) > > row = Wx::Panel.new(self,-1) delete this > row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) > row.set_sizer(row_sizer) and this > row_sizer.add(Wx::StaticText.new(self, -1, "Character Name")) > row_sizer.add(Wx:: Panel.new(self,-1, Wx::DEFAULT_POSITION, > Wx::Size.new(10,1))) > row_sizer.add(Wx::StaticText.new(self, -1, "Player Name")) > sizer.add(row_sizer) > > row = Wx::Panel.new(self,-1) and this > row_sizer = Wx:: BoxSizer.new(Wx::HORIZONTAL) > row.set_sizer(row_sizer) and this > character_name_text = Wx::TextCtrl.new(self, -1) > row_sizer.add(character_name_text) > player_name_text = Wx::TextCtrl.new(self, -1) > row_sizer.add(player_name_text) > sizer.add(row_sizer) > end With those four lines removed it works for me. It doesn't segfault for me on exit using 0.0.38 - there are some similar other bugs now fixed in SVN head causing crash-on-exit so please do report these. Note that to space out widgets within sizers, you can give a numeric fourth argument to Sizer#add to put pixel spacing around members, or alternately use Sizer#insert_spacer. > (I know adding the rows is ugly, but I'm not bothering 'ruby-izing' > this until I figure this crap out.) Yep. You might want to take a look at wxSugar which has a specific module for making working with nested sizers less verbose: panel = Wx::Panel.new(self) panel.arrange_horizontally(:padding => 4) do panel.add(Wx::StaticText[:label => 'Character Name']) panel.add(Wx::StaticText[:label => 'Player Name']) end panel.arrange_horizontally(:padding => 4) do player_name_txt = panel.add(Wx::TextCtrl) char_name_txt = panel.add(Wx::TextCtrl) end hth alex From ccthiel at gmail.com Thu Jan 25 01:58:43 2007 From: ccthiel at gmail.com (Chris Thiel) Date: Wed, 24 Jan 2007 23:58:43 -0700 Subject: [Wxruby-users] Adding sizers to other sizers doesn't work In-Reply-To: <45B47AFB.8040606@pressure.to> References: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> <45B47AFB.8040606@pressure.to> Message-ID: <4d25b66d0701242258q294e6fb5kd930ca63a765a453@mail.gmail.com> Alex, Thanks a bunch...works like a charm now. WxSugar is rockin' like Dokken too. So what's your advice for setting up a GUI with several widgets spanning more than one row or column? Always struggled with this layout in Java, seems as though I'm destined to struggle with it in Ruby as well. Anyhow, thanks for the advice thus far. Chris On 1/22/07, Alex Fenton wrote: > > Hi Chris > > > > I'm having a heck of a time setting up a GUI with a differing number > > of widgets per row, resulting in a differing number or widgets per > > column. > Yep, sizers are flexible but a bit tricky. > > At first I tried to simply do something like the following: > You're very close, but you've added extra panels into the hierarchy > where they're not needed. If you're nesting sizers, just add the > subordinate (horiz) sizer directly to the parent (vert) one. The sub > sizer doesn't need to be associated with a Wx::Window. > > class CharacterInfoPanel < Wx::Panel > > def initialize(parent) > > super(parent) > > sizer = Wx::BoxSizer.new(Wx::VERTICAL) > > set_sizer(sizer) > > > > row = Wx::Panel.new(self,-1) > delete this > > row_sizer = Wx::BoxSizer.new(Wx::HORIZONTAL) > > row.set_sizer(row_sizer) > and this > > row_sizer.add(Wx::StaticText.new(self, -1, "Character Name")) > > row_sizer.add(Wx:: Panel.new(self,-1, Wx::DEFAULT_POSITION, > > Wx::Size.new(10,1))) > > row_sizer.add(Wx::StaticText.new(self, -1, "Player Name")) > > sizer.add(row_sizer) > > > > row = Wx::Panel.new(self,-1) > and this > > row_sizer = Wx:: BoxSizer.new(Wx::HORIZONTAL) > > row.set_sizer(row_sizer) > and this > > character_name_text = Wx::TextCtrl.new(self, -1) > > row_sizer.add(character_name_text) > > player_name_text = Wx::TextCtrl.new(self, -1) > > row_sizer.add(player_name_text) > > sizer.add(row_sizer) > > end > With those four lines removed it works for me. > > It doesn't segfault for me on exit using 0.0.38 - there are some similar > other bugs now fixed in SVN head causing crash-on-exit so please do > report these. > > Note that to space out widgets within sizers, you can give a numeric > fourth argument to Sizer#add to put pixel spacing around members, or > alternately use Sizer#insert_spacer. > > (I know adding the rows is ugly, but I'm not bothering 'ruby-izing' > > this until I figure this crap out.) > Yep. You might want to take a look at wxSugar which has a specific > module for making working with nested sizers less verbose: > > panel = Wx::Panel.new(self) > > panel.arrange_horizontally(:padding => 4) do > panel.add(Wx::StaticText[:label => 'Character Name']) > panel.add(Wx::StaticText[:label => 'Player Name']) > end > > panel.arrange_horizontally(:padding => 4) do > player_name_txt = panel.add(Wx::TextCtrl) > char_name_txt = panel.add(Wx::TextCtrl) > end > > hth > alex > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070124/a89703c0/attachment-0001.html From alex at pressure.to Thu Jan 25 13:15:15 2007 From: alex at pressure.to (Alex Fenton) Date: Thu, 25 Jan 2007 18:15:15 +0000 Subject: [Wxruby-users] Adding sizers to other sizers doesn't work In-Reply-To: <4d25b66d0701242258q294e6fb5kd930ca63a765a453@mail.gmail.com> References: <4d25b66d0701212112m44ad0ccbi798eec5ce466602f@mail.gmail.com> <45B47AFB.8040606@pressure.to> <4d25b66d0701242258q294e6fb5kd930ca63a765a453@mail.gmail.com> Message-ID: <45B8F3B3.1040601@pressure.to> Chris Thiel wrote: > So what's your advice for setting up a GUI with several widgets > spanning more than one row or column? You can nest sizers containing widgets to any depth you like, and that will let you create most 'spanning' type layouts. Just With wxSugar: arrange_horizontally do # a single long widget here, spanning two columns end arrange_horizontally do # a half-width widget # another half-width widget end Use the :proportion argument to add to tell widgets to grow and shrink as the container grows and shrinks. See also: http://rubyforge.org/pipermail/wxruby-users/2006-February/001902.html > Always struggled with this layout in Java, seems as though I'm > destined to struggle with it in Ruby as well. I wouldn't be so pessimistic - this is fairly straightforward once you've got the hang of it. There's also GridBagSizer which isn't yet available in wxruby, but I expect we can add it to an upcoming release. alex From james.homme at highmark.com Mon Jan 29 09:23:25 2007 From: james.homme at highmark.com (james.homme at highmark.com) Date: Mon, 29 Jan 2007 09:23:25 -0500 Subject: [Wxruby-users] WXRuby Documentation Message-ID: Hi, I am very new to Ruby, but I know I can express myself in writing pretty well. If it's OK to contribute to the documentation of WXRuby, How do I do that? I signed up for a membership on Sourceforge, but was not sure what to do after that. Thanks. Jim James D Homme, Usability Engineering Highmark Inc. james.homme at highmark.com 412-544-8177 "If you think you can, or if you think you can't, you are right." From alex at pressure.to Mon Jan 29 17:42:08 2007 From: alex at pressure.to (Alex Fenton) Date: Mon, 29 Jan 2007 22:42:08 +0000 Subject: [Wxruby-users] WXRuby Documentation In-Reply-To: References: Message-ID: <45BE7840.50003@pressure.to> Hi Jim > If it's OK to contribute to the documentation of WXRuby, How do I do > that? That would be very welcome. Take a look at this thread for info on getting the document sources and submitting contributions http://rubyforge.org/pipermail/wxruby-users/2007-January/002873.html cheers alex From mikejaysteiner at gmail.com Mon Jan 29 23:40:21 2007 From: mikejaysteiner at gmail.com (Mike Steiner) Date: Mon, 29 Jan 2007 21:40:21 -0700 Subject: [Wxruby-users] error finding library when running test program Message-ID: I'm new to Ruby and wxRuby, and I just installed Ruby 185-21 (I run WinXP), then used gem to install wxRuby2. When I try to run a short test program (included below), I get this error: C:\Documents and Settings\Mike\Desktop>ruby test.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- wxruby (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from test.rb:1 Here's the test program: ----- START OF PROGRAM require "wxruby" ID_ICON = 1000 class IconFrame < Wx::Frame def initialize super(nil, -1, "Changing Icons!", Wx::DEFAULT_POSITION, Wx::Size.new (225,150)) panel = Wx::Panel.new(self, -1) iconNames = ["wxwin", "mondrian", "ogl", "smiley"] icons = Wx::RadioBox.new(panel, ID_ICON, "&Icons", Wx::Point.new (20,5), Wx::DEFAULT_SIZE, iconNames, 1, Wx::RA_SPECIFY_COLS) evt_radiobox(ID_ICON) {|event| on_change_icon(event)} if Wx::RUBY_PLATFORM == "WXMSW" set_icon(Wx::Icon.new("./icons/wxwin.ico")) else set_icon(Wx::Icon.new("./icons/wxwin16x16.xpm")) end show(true) #true is the default value, so it may be left off end def on_change_icon(event) if Wx::RUBY_PLATFORM == "WXMSW" case event.get_int when 0 set_icon(Wx::Icon.new("./icons/wxwin.ico")) when 1 set_icon(Wx::Icon.new("./icons/mondrian.ico")) when 2 set_icon(Wx::Icon.new("./icons/ogl.ico")) when 3 set_icon(Wx::Icon.new("./icons/smiley.ico")) end else case event.get_int when 0 set_icon(Wx::Icon.new("./icons/wxwin16x16.xpm")) when 1 set_icon(Wx::Icon.new("./icons/mondrian.xpm")) when 2 set_icon(Wx::Icon.new("./icons/ogl.xpm")) when 3 set_icon(Wx::Icon.new("./icons/smiley.xpm")) end end end end class MinimalApp < Wx::App def on_init IconFrame.new end end MinimalApp.new.main_loop ----- END OF PROGRAM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070129/72a5e9cb/attachment.html From alex at pressure.to Tue Jan 30 04:33:49 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 30 Jan 2007 09:33:49 +0000 Subject: [Wxruby-users] error finding library when running test program In-Reply-To: References: Message-ID: <45BF10FD.9010301@pressure.to> Hi Mike Steiner wrote: > I'm new to Ruby and wxRuby, Welcome > and I just installed Ruby 185-21 (I run WinXP), then used gem to > install wxRuby2. > ----- START OF PROGRAM > require "wxruby" # This should be require 'wx' Please let us know where you saw the old style 'require "wxruby"'. The samples (which will be installed in somewhere like C:/ruby/lib/gem/1.8/wxruby2-preview/samples) are a good place to start. Also, if you're using XP, you will probably want to add GC.disable at the start of your scripts or you will probably experience crashes with the current preview gem. cheers alex From mikejaysteiner at gmail.com Tue Jan 30 11:09:49 2007 From: mikejaysteiner at gmail.com (Mike Steiner) Date: Tue, 30 Jan 2007 09:09:49 -0700 Subject: [Wxruby-users] error finding library when running test program In-Reply-To: <45BF10FD.9010301@pressure.to> References: <45BF10FD.9010301@pressure.to> Message-ID: Thanks for the help. I noticed that the sample script was also looking for some icon files, so I gave up on that one. After looking at (again) http://wxruby.rubyforge.org/wiki/wiki.pl?Installation I ran minimal.rb and it worked great! So at the end I have something that works, which I can now build on, so I'm happy. Mike On 1/30/07, Alex Fenton wrote: > > Hi > > Mike Steiner wrote: > > I'm new to Ruby and wxRuby, > Welcome > > and I just installed Ruby 185-21 (I run WinXP), then used gem to > > install wxRuby2. > > > ----- START OF PROGRAM > > require "wxruby" > # This should be > > require 'wx' > > > Please let us know where you saw the old style 'require "wxruby"'. The > samples (which will be installed in somewhere like > C:/ruby/lib/gem/1.8/wxruby2-preview/samples) are a good place to start. > > Also, if you're using XP, you will probably want to add > > GC.disable > > at the start of your scripts or you will probably experience crashes > with the current preview gem. > > cheers > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20070130/b137656b/attachment.html From james.homme at highmark.com Tue Jan 30 15:08:23 2007 From: james.homme at highmark.com (james.homme at highmark.com) Date: Tue, 30 Jan 2007 15:08:23 -0500 Subject: [Wxruby-users] WXRuby Documentation In-Reply-To: <45BE7840.50003@pressure.to> Message-ID: Hi, What Subversion client is best to get? Thanks. Jim James D Homme, Usability Engineering Highmark Inc. james.homme at highmark.com 412-544-8177 "If you think you can, or if you think you can't, you are right." "Alex Fenton" To Sent by: "General discussion of wxRuby" wxruby-users-boun ces at rubyforge.org cc Subject 01/29/2007 05:42 Re: [Wxruby-users] WXRuby PM Documentation Please respond to "General discussion of wxRuby" Hi Jim > If it's OK to contribute to the documentation of WXRuby, How do I do > that? That would be very welcome. Take a look at this thread for info on getting the document sources and submitting contributions http://rubyforge.org/pipermail/wxruby-users/2007-January/002873.html cheers alex _______________________________________________ wxruby-users mailing list wxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Tue Jan 30 16:36:17 2007 From: alex at pressure.to (Alex Fenton) Date: Tue, 30 Jan 2007 21:36:17 +0000 Subject: [Wxruby-users] WXRuby Documentation In-Reply-To: References: Message-ID: <45BFBA51.1050507@pressure.to> james.homme at highmark.com wrote: > Hi, > What Subversion client is best to get? > Depends on taste and what platform you're on. If you're using Windows I hear very good things about TortoiseSVN, which integrates SVN into Explorer: http://tortoisesvn.tigris.org/ I don't think there's one single popular GUI on OS X and Linux; many people use the command-line client. I personally use emacs's svn-mode, which works nicely if you happen to use that editor. cheers alex