From alex at pressure.to Fri Aug 1 00:07:37 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 01 Aug 2008 05:07:37 +0100 Subject: [wxruby-users] Filling clipboard doesn't work In-Reply-To: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> References: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> Message-ID: <48928C09.3000207@pressure.to> Hi Niklas Niklas Baumstark wrote: > I ran into a bit of trouble with my first wxRuby application. I'm using > ruby 1.8.6 with wxRuby 1.9.7 on x86 Linux (Ubuntu). Didn't test any > other platform yet. In my application, I'm trying to access the > clipboard like this: > > Wx::Clipboard.open do |clip| > clip.set_data Wx::TextDataObject.new("TEST") > clip.flush > end > > This doesn't work. While running the app (after the execution of the > above code), the menu entry "Paste" is enabled in other applications, > but nothing is in the clipboard (at least nothing happens on pasting). > After quitting my application, the menu entry is disabled again and the > clipboard is empty. > > How do I access the clip properly? > This code works fine for me on OS X; both while the app is running and after it's ended the text data is available to other apps via Paste, .I'll try it out on Ubuntu later. > I still got another question: Is it possible to send key-messages to > other apps using wxWidgets? > Not as far as I know, sorry. alex From lists at ruby-forum.com Fri Aug 1 03:47:58 2008 From: lists at ruby-forum.com (Niklas Baumstark) Date: Fri, 1 Aug 2008 09:47:58 +0200 Subject: [wxruby-users] Filling clipboard doesn't work In-Reply-To: <48928C09.3000207@pressure.to> References: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> <48928C09.3000207@pressure.to> Message-ID: Alex Fenton wrote: > This code works fine for me on OS X; I tested it on Windows in the meanwhile and it works aswell. But not under Ubuntu Hardy/GTK > .I'll try it out on Ubuntu later. Thanks, that would be very nice! Greetings, Niklas -- Posted via http://www.ruby-forum.com/. From erubin at valcom.com Fri Aug 1 09:52:36 2008 From: erubin at valcom.com (Eric Rubin) Date: Fri, 1 Aug 2008 09:52:36 -0400 Subject: [wxruby-users] Question about Window#raise Message-ID: <00a401c8f3dd$daf59a30$a50ba8c0@valcom.com> I want to force my Frame to be visible under certain conditions, even if it's currently behind other windows. I am running under Windows XP. I am calling raise to do this, but the Frame doesn't come to the front, though the icon does alert. Isn't this what Window#raise is supposed to do? Is this a Windows issue? Eric Rubin -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at pressure.to Fri Aug 1 10:21:44 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 01 Aug 2008 15:21:44 +0100 Subject: [wxruby-users] Question about Window#raise In-Reply-To: <00a401c8f3dd$daf59a30$a50ba8c0@valcom.com> References: <00a401c8f3dd$daf59a30$a50ba8c0@valcom.com> Message-ID: <48931BF8.8010306@pressure.to> Hi Eric Eric Rubin wrote: > > I want to force my Frame to be visible under certain conditions, even > if it?s currently behind other windows. I am running under Windows XP. > I am calling raise to do this, but the Frame doesn?t come to the > front, though the icon does alert. Isn?t this what Window#raise is > supposed to do? Is this a Windows issue? > Window#raise when applied to a managed (top-level) window should bring it to the front - but only among the Frames of this application, not of all the running desktop applications. It sounds like you actually want to bring the whole application to the front, and I'm not aware of any way of doing this in wxWidgets. You might find Wx::TopLevelWindow#request_user_attention relevant: http://wxruby.rubyforge.org/doc/toplevelwindow.html#TopLevelWindow_requestuserattention (although the docs talk only about GTK and Windows, this also works on OS X) You might also look at this discussion on wxWidgets: http://www.nabble.com/wxMac---Bring-application-to-front-td3851603.html In one of the follow-ups it mentions a Windows-specific API call to bring an application to the front. If this is really necessary, you may find it possible to make this call via Ruby's Win32API. You can get the Windows-native id of a Frame using Wx::Window#get_handle hth alex From bureaux.sebastien at neuf.fr Fri Aug 1 12:21:42 2008 From: bureaux.sebastien at neuf.fr (sebastien) Date: Fri, 1 Aug 2008 18:21:42 +0200 Subject: [wxruby-users] rescencement d'application Message-ID: <7F1A98B7D2164FB3831956B5D85F7527@sebastien> Bonjour ? tous. Je poste ce message pour rescencer toutes les applications cr?es avec wxruby. Pour tous ceux qui ont cr?er des applications avec wxruby, pouvez-vous poster le nom de celles-ci, car j'aimerai voir ce que d'autres personnes ont pu cr?er. merci ? tous. Hello with all. I post this message for rescencer all the applications create with wxruby. For all those which have to create applications with wxruby, can you poster the name of those, because i will like to see what d' other people could create. thank you with all. sebastien http://beusse.liveror.com/ -------------- section suivante -------------- Une pi?ce jointe HTML a ?t? nettoy?e... URL: From lists at ruby-forum.com Sat Aug 2 10:34:11 2008 From: lists at ruby-forum.com (Niklas Baumstark) Date: Sat, 2 Aug 2008 16:34:11 +0200 Subject: [wxruby-users] i18n & l10n samples? Message-ID: <5579dfaf5c3c377785ff263ff199a8b1@ruby-forum.com> hi all, are there any samples or docs available on how to use the wxRuby Localization and Internationalization Features? Greetings, Niklas -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Aug 4 10:26:01 2008 From: alex at pressure.to (Alex Fenton) Date: Mon, 04 Aug 2008 15:26:01 +0100 Subject: [wxruby-users] i18n & l10n samples? In-Reply-To: <5579dfaf5c3c377785ff263ff199a8b1@ruby-forum.com> References: <5579dfaf5c3c377785ff263ff199a8b1@ruby-forum.com> Message-ID: <48971179.1090403@pressure.to> Hi Niklas Baumstark wrote: > are there any samples or docs available on how to use the wxRuby > Localization and Internationalization Features? > Take a look at: samples/text/unicode.rb http://wxruby.rubyforge.org/doc/locale.html Use standard ids (eg Wx::ID_PASTE) wherever possible. For localisation, I can recommend the Ruby-GetText library: http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext cheers alex From lists at ruby-forum.com Mon Aug 4 10:52:02 2008 From: lists at ruby-forum.com (Leonardo Otero) Date: Mon, 4 Aug 2008 16:52:02 +0200 Subject: [wxruby-users] A bug in wxRuby. Segmentation fault in random situations. In-Reply-To: <570d9b010803011001l179dbd0asb6870437847301ed@mail.gmail.com> References: <570d9b010802170815p2750966br89e5d65ce70584f3@mail.gmail.com> <47BA27CA.4000108@pressure.to> <570d9b010802190319r3cb8cfc7gc9bfdf4b51e5bef2@mail.gmail.com> <47BAC628.7060409@pressure.to> <570d9b010802190717x78573832j58331e50fb953a8e@mail.gmail.com> <47BBDA8B.7080906@pressure.to> <570d9b010802281007u18d4d81ap7cbb33299e99ec7c@mail.gmail.com> <47C8BAEF.5010500@pressure.to> <570d9b010803010348w225336e3s672e301b78a00894@mail.gmail.com> <47C94E11.3000408@pressure.to> <570d9b010803011001l179dbd0asb6870437847301ed@mail.gmail.com> Message-ID: Jacek Nowak wrote: > Hi! > > I installed the latest version from svn and there are no crashes > anymore! :) > I have tested my app extensively with gc_stress and now it works fine. > Do you know if this bug is fixed for the wxruby (1.9.7) I'm running the bigdemo.rb in 2 different machines with win XP SP2 obtaining the following error: ----------------------- C:\ruby\lib\ruby\gems\1.8\gems\wxruby-1.9.7-x86-mswin32-60\samples\bigdemo>ruby bigdemo.rb bigdemo.rb:823: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ----------------------- As described by Jacek Nowak: >the crash occurs randomly in different situations, basicly when an >event like pressing a button, opening a window, changing focus, etc. >occurs (it doesn't occur when I don't touch the mouse/keyboard) Thanks in advance. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Aug 4 13:24:01 2008 From: lists at ruby-forum.com (=?utf-8?Q?Magnus_Sj=c3=b6strand?=) Date: Mon, 4 Aug 2008 19:24:01 +0200 Subject: [wxruby-users] set_size and ScrolledWindow Message-ID: Hi, I'm trying to set the size of a panel by using set_size. The size does change, but the scrollbars in my ScrolledWindow does not activate. If I create a panel in wxFormBuilder and set the size there it works, but not when created from code. I've tried both with and without sizers, set_virtual_size and anything else I thought was even remotely related. my code looks like this: custom_panel = MyCustomPanel.new(@scrolled_window) custom_panel.set_size 800, 6000 @scrolled_window is initialized by code from xrcise Which I guessed would work since it works in c++. I've also tried to set the size from MyCustomPanel's constructor. What did I miss? :) regards, Magnus Sj?strand -- Posted via http://www.ruby-forum.com/. From niklas.baumstark at googlemail.com Mon Aug 4 14:24:21 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Mon, 4 Aug 2008 20:24:21 +0200 Subject: [wxruby-users] i18n & l10n samples? In-Reply-To: <48971179.1090403@pressure.to> References: <5579dfaf5c3c377785ff263ff199a8b1@ruby-forum.com> <48971179.1090403@pressure.to> Message-ID: <20080804202421.295ba760@niklaspc> Hello, Alex Fenton wrote: > Hi > > Niklas Baumstark wrote: > > are there any samples or docs available on how to use the wxRuby > > Localization and Internationalization Features? > > > Take a look at: > samples/text/unicode.rb > http://wxruby.rubyforge.org/doc/locale.html > > Use standard ids (eg Wx::ID_PASTE) wherever possible. > > For localisation, I can recommend the Ruby-GetText library: > http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext > > cheers > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users Thanks a lot, i'm going to have a deep look at it! Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From lists at ruby-forum.com Mon Aug 4 20:44:10 2008 From: lists at ruby-forum.com (Zhimin Zhan) Date: Tue, 5 Aug 2008 02:44:10 +0200 Subject: [wxruby-users] Wx::StatusBar set_status_widths returns argument error Message-ID: Hi, I added the following line in samples/wxStatusBar.rbw set_status_widths(1, 100) # Doc: set_status_widths(Integer n, Integer widths) Got error: wxStatusBar.rbw:17:in `set_status_widths': wrong # of arguments(2 for 1) (ArgumentError) wxRuby version: wxruby-1.9.6-x86-mingw32. Thanks in advance. Regards, Zhimin -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Aug 5 07:16:58 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Aug 2008 12:16:58 +0100 Subject: [wxruby-users] Wx::StatusBar set_status_widths returns argument error In-Reply-To: References: Message-ID: <489836AA.80004@pressure.to> Hi Zhimin Zhan wrote: > I added the following line in samples/wxStatusBar.rbw > set_status_widths(1, 100) # Doc: set_status_widths(Integer n, Integer > widths) > > Got error: > wxStatusBar.rbw:17:in `set_status_widths': wrong # of arguments(2 for > 1) (ArgumentError) > It's a mistake in the documentation (which was originally automatically converted from C++). Thanks for reporting this so we can correct it. The propoer argument should simply be an array of widths. Eg, if you wanted two fields of 150px and 250px, call it like this: set_status_widths [150, 250] OR self.status_widths = [150, 250] a From alex at pressure.to Tue Aug 5 13:19:09 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Aug 2008 18:19:09 +0100 Subject: [wxruby-users] A bug in wxRuby. Segmentation fault in random situations. In-Reply-To: References: <570d9b010802170815p2750966br89e5d65ce70584f3@mail.gmail.com> <47BA27CA.4000108@pressure.to> <570d9b010802190319r3cb8cfc7gc9bfdf4b51e5bef2@mail.gmail.com> <47BAC628.7060409@pressure.to> <570d9b010802190717x78573832j58331e50fb953a8e@mail.gmail.com> <47BBDA8B.7080906@pressure.to> <570d9b010802281007u18d4d81ap7cbb33299e99ec7c@mail.gmail.com> <47C8BAEF.5010500@pressure.to> <570d9b010803010348w225336e3s672e301b78a00894@mail.gmail.com> <47C94E11.3000408@pressure.to> <570d9b010803011001l179dbd0asb6870437847301ed@mail.gmail.com> Message-ID: <48988B8D.4040104@pressure.to> Leonardo Otero wrote: > Do you know if this bug is fixed for the wxruby (1.9.7) I'm running the > bigdemo.rb in 2 different machines with win XP SP2 obtaining the > following error: > ----------------------- > C:\ruby\lib\ruby\gems\1.8\gems\wxruby-1.9.7-x86-mswin32-60\samples\bigdemo>ruby > bigdemo.rb > bigdemo.rb:823: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i386-mswin32] > > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information. > > ----------------------- > As described by Jacek Nowak: > > >> the crash occurs randomly in different situations, basicly when an >> event like pressing a button, opening a window, changing focus, etc. >> occurs (it doesn't occur when I don't touch the mouse/keyboard) >> Thanks for the report. The bug that Jacek described was fixed in 1.9.7 so this must be something else. Could you be more specific about where the crash occurs (eg which part of bigdemo.rb is running). We will need to run it under a debugger to pin down the problem. alex From niklas.baumstark at googlemail.com Tue Aug 5 14:36:25 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Tue, 5 Aug 2008 20:36:25 +0200 Subject: [wxruby-users] object allocation during garbage collection phase Message-ID: <20080805203625.23837f94@niklaspc> Hello, when i run the bigdemo sample, the app crashes initially after opening the "tip of the day" (it doesn't when i don't touch mouse and keyboard). can't even get to the main window. i ran it in gdb, it gives me the following trace: Starting program: /usr/local/bin/ruby bigdemo.rb [Thread debugging using libthread_db enabled] [New Thread 0xb7c3ab60 (LWP 7428)] bigdemo.rb:591: [BUG] object allocation during garbage collection phase ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] Program received signal SIGABRT, Aborted. [Switching to Thread 0xb7c3ab60 (LWP 7428)] 0xb7ef2410 in __kernel_vsyscall () (gdb) whe #0 0xb7ef2410 in __kernel_vsyscall () #1 0xb7c66085 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7c67a01 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7e3a1e2 in rb_bug ( fmt=0xb7ec62e8 "object allocation during garbage collection phase") at error.c:213 #4 0xb7e5dbf5 in rb_newobj () at gc.c:444 #5 0xb7e2b197 in bignew_1 (klass=0, len=6, sign=7428) at bignum.c:63 #6 0xb7e2bac9 in rb_uint2big (n=1074221808) at bignum.c:178 #7 0xb7e2bb51 in rb_int2big (n=0) at bignum.c:202 #8 0xb7e2bb98 in rb_int2inum (n=0) at bignum.c:222 #9 0xb7134c7e in ?? () from /usr/local/lib/ruby/gems/1.8/gems/wxruby-1.9.7-x86-linux/lib/wxruby2.so #10 0xb7134c8e in ?? () from /usr/local/lib/ruby/gems/1.8/gems/wxruby-1.9.7-x86-linux/lib/wxruby2.so #11 0xb7e5d6aa in garbage_collect () at gc.c:1275 #12 0xb7e5dbe5 in rb_newobj () at gc.c:446 #13 0xb7e2b197 in bignew_1 (klass=0, len=6, sign=7428) at bignum.c:63 #14 0xb7e2bac9 in rb_uint2big (n=1074225608) at bignum.c:178 #15 0xb7e2bb51 in rb_int2big (n=0) at bignum.c:202 #16 0xb7e2bb98 in rb_int2inum (n=0) at bignum.c:222 #17 0xb73de8ce in ?? () $ ruby -v ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] don't know if this is a bug, maybe its my own fault. i don't really need the bigdemo so it's no problem for me, but maybe the wxruby devs are interested. i remember that it was working when i compiled ruby (same version) without pthread support, maybe this is the prob (ruby 1.8.6 worked even with pthread support). if you need further info, please tell me. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Tue Aug 5 14:49:45 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Aug 2008 19:49:45 +0100 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <20080805203625.23837f94@niklaspc> References: <20080805203625.23837f94@niklaspc> Message-ID: <4898A0C9.6080300@pressure.to> Hi Niklas Niklas Baumstark wrote: > Hello, > > when i run the bigdemo sample, the app crashes initially after opening the "tip of the day" (it doesn't when i don't touch mouse and keyboard). can't even get to the main window. i ran it in gdb, it gives me the following trace: > > Starting program: /usr/local/bin/ruby bigdemo.rb > [Thread debugging using libthread_db enabled] > [New Thread 0xb7c3ab60 (LWP 7428)] > bigdemo.rb:591: [BUG] object allocation during garbage collection phase > ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] > > > Program received signal SIGABRT, Aborted. > [Switching to Thread 0xb7c3ab60 (LWP 7428)] > 0xb7ef2410 in __kernel_vsyscall () > (gdb) whe > #0 0xb7ef2410 in __kernel_vsyscall () > #1 0xb7c66085 in raise () from /lib/tls/i686/cmov/libc.so.6 > #2 0xb7c67a01 in abort () from /lib/tls/i686/cmov/libc.so.6 > #3 0xb7e3a1e2 in rb_bug ( > fmt=0xb7ec62e8 "object allocation during garbage collection phase") > at error.c:213 ... Firstly, thank you for taking the time to report this in detail with a backtrace. It's much appreciated. > $ ruby -v > ruby 1.8.7 (2008-08-02 revision 0) [i686-linux] > > don't know if this is a bug, maybe its my own fault. i don't really need the bigdemo so it's no problem for me, but maybe the wxruby devs are interested. No, it's not your fault, and it's not our fault either. With 1.8.7, the ruby developers chose to change both the public APIs and aspects of the GC/memory management internals. This broke any SWIG-generated ruby libraries that use certain SWIG features (object tracking). IMO this was a sloppy decision on a stable branch that reflects badly on ruby's development process, but - there we are. Anyway, I recently committed a set of patches that I think fixed this problem for Ruby 1.9, which has the same problem. If you're willing to test this out from wxRuby's SVN with ruby 1.8.7 that would be very kind. cheers alex From alex at pressure.to Tue Aug 5 15:26:43 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Aug 2008 20:26:43 +0100 Subject: [wxruby-users] set_size and ScrolledWindow In-Reply-To: References: Message-ID: <4898A973.7060608@pressure.to> Magnus Sj?strand wrote: > I'm trying to set the size of a panel by using set_size. The size does > change, but the scrollbars in my ScrolledWindow does not activate. > > If I create a panel in wxFormBuilder and set the size there it works, > but not when created from code. > > I've tried both with and without sizers, set_virtual_size and anything > else I thought was even remotely related. > > my code looks like this: > > custom_panel = MyCustomPanel.new(@scrolled_window) > custom_panel.set_size 800, 6000 > > @scrolled_window is initialized by code from xrcise > > Which I guessed would work since it works in c++. > > I've also tried to set the size from MyCustomPanel's constructor. > > What did I miss? :) Perhaps you need to call set_scroll_rate? Using sizers is the easiest way. The ScrolledWindow is the parent that owns the sizer, the child panel is added to it. But the scrollbars won't show unless the pixel increment is specified with set_scroll_rate. hth alex From niklas.baumstark at googlemail.com Tue Aug 5 15:41:50 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Tue, 5 Aug 2008 21:41:50 +0200 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <4898A0C9.6080300@pressure.to> References: <20080805203625.23837f94@niklaspc> <4898A0C9.6080300@pressure.to> Message-ID: <20080805214150.793a8127@niklaspc> Hello, Alex Fenton wrote: > Anyway, I recently committed a set of patches that I think fixed this > problem for Ruby 1.9, which has the same problem. If you're willing to > test this out from wxRuby's SVN with ruby 1.8.7 that would be very kind. i did what you told me, compiled wxruby from svn, but it doesn't seem to work: irb(main):001:0> require 'wx' LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 from (irb):1:in `require' from (irb):1 i have no idea of what's going wrong here, i'm not this experienced with the internals of your code and with ruby development at all. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Tue Aug 5 16:25:26 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Aug 2008 21:25:26 +0100 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <20080805214150.793a8127@niklaspc> References: <20080805203625.23837f94@niklaspc> <4898A0C9.6080300@pressure.to> <20080805214150.793a8127@niklaspc> Message-ID: <4898B736.1000502@pressure.to> Niklas Baumstark wrote: > Hello, > > Alex Fenton wrote: > >> Anyway, I recently committed a set of patches that I think fixed this >> problem for Ruby 1.9, which has the same problem. If you're willing to >> test this out from wxRuby's SVN with ruby 1.8.7 that would be very kind. >> > > i did what you told me, compiled wxruby from svn, but it doesn't seem to work: > > irb(main):001:0> require 'wx' > LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so > from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so > from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 > from (irb):1:in `require' > from (irb):1 > > i have no idea of what's going wrong here, i'm not this experienced with the internals of your code and with ruby development at all. Thanks for trying it. You should be able to work around this error by doing rake WXRUBY_EXCLUDED=MediaCtrl,MediaEvent Can I ask what wxWidgets you're compiling against - eg a distro version, or a self-built one? thanks alex From niklas.baumstark at googlemail.com Wed Aug 6 10:07:08 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Wed, 6 Aug 2008 16:07:08 +0200 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <4898B736.1000502@pressure.to> References: <20080805203625.23837f94@niklaspc> <4898A0C9.6080300@pressure.to> <20080805214150.793a8127@niklaspc> <4898B736.1000502@pressure.to> Message-ID: <20080806160708.7ea9e75d@niklaspc> Hello, Alex Fenton wrote: > Thanks for trying it. You should be able to work around this error by doing > > rake WXRUBY_EXCLUDED=MediaCtrl,MediaEvent this leaves me with exactly the same error: niklas at niklaspc:~/ruby-cvs/wxruby/svn/trunk/wxruby2$ rake WXRUBY_EXCLUDED=MediaCtrl,MediaEvent (in /home/niklas/ruby-cvs/wxruby/svn/trunk/wxruby2) Enabling DYNAMIC build Enabling RELEASE build Enabling UNICODE build The following wxWidgets features are not available and will be skipped: MediaCtrl MediaEvent PrinterDC niklas at niklaspc:~/ruby-cvs/wxruby/svn/trunk/wxruby2$ cd / niklas at niklaspc:/$ irb irb(main):001:0> require 'wx' LoadError: /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so: undefined symbol: _ZNK11wxMediaCtrl12GetClassInfoEv - /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so from /usr/local/lib/ruby/site_ruby/1.8/wx.rb:12 from (irb):1:in `require' from (irb):1 irb(main):002:0> quit > Can I ask what wxWidgets you're compiling against - eg a distro version, > or a self-built one? $ wx-config --version-full 2.8.7.1 it's a distro version (libwxbase2.8-dev on ubuntu). compiling wxruby took long enough for me (about 30 minutes), so i didn't try and compile wxwidgets. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Wed Aug 6 10:55:05 2008 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Aug 2008 15:55:05 +0100 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <20080806160708.7ea9e75d@niklaspc> References: <20080805203625.23837f94@niklaspc> <4898A0C9.6080300@pressure.to> <20080805214150.793a8127@niklaspc> <4898B736.1000502@pressure.to> <20080806160708.7ea9e75d@niklaspc> Message-ID: <4899BB49.9020707@pressure.to> Niklas Baumstark wrote: >> Can I ask what wxWidgets you're compiling against - eg a distro version, >> or a self-built one? >> > > $ wx-config --version-full > 2.8.7.1 > > it's a distro version (libwxbase2.8-dev on ubuntu). compiling wxruby took long enough for me (about 30 minutes), so i didn't try and compile wxwidgets. > Fair enough. I haven't tried using the distro packages on Linux myself, but you might check that you also have libwxgtk-2.8 and libwxgtk2.8-dev libwxbase contains only the non GUI classes. Only libwxgtk has libgstreamer as a dependency, and that's where the MediaCtrl code is found. Sorry for the inconvenience but wxwidgets has hundreds of compile-time options and different ways to organise the library files. It's quite tricky to cope with all the variations. alex From niklas.baumstark at googlemail.com Wed Aug 6 14:29:32 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Wed, 6 Aug 2008 20:29:32 +0200 Subject: [wxruby-users] object allocation during garbage collection phase In-Reply-To: <4899BB49.9020707@pressure.to> References: <20080805203625.23837f94@niklaspc> <4898A0C9.6080300@pressure.to> <20080805214150.793a8127@niklaspc> <4898B736.1000502@pressure.to> <20080806160708.7ea9e75d@niklaspc> <4899BB49.9020707@pressure.to> Message-ID: <20080806202932.46bb54b8@niklaspc> Hello, finally solved the problem as described here: http://rubyforge.org/pipermail/wxruby-development/2008-May/001322.html could have sworn that i didn't get this result when i asked google about the problem yesterday, but today i do :) maybe this should be fixed... back to topic: it does now work, bug is gone. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Thu Aug 7 16:21:50 2008 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Aug 2008 21:21:50 +0100 Subject: [wxruby-users] rescencement d'application In-Reply-To: <7F1A98B7D2164FB3831956B5D85F7527@sebastien> References: <7F1A98B7D2164FB3831956B5D85F7527@sebastien> Message-ID: <489B595E.9000607@pressure.to> Bonjour sebastien sebastien wrote: > Bonjour ? tous. > Je poste ce message pour rescencer toutes les applications cr?es avec > wxruby. > Pour tous ceux qui ont cr?er des applications avec wxruby, > pouvez-vous poster le nom de celles-ci, car j'aimerai voir ce que > d'autres personnes ont pu cr?er. > merci ? tous. > > Hello with all. I post this message for rescencer all the applications > create with wxruby. For all those which have to create applications > with wxruby, can you poster the name of those, because i will like to > see what d' other people could create. thank you with all. > sebastien Thanks - you might be interested in this list here: http://wxruby.rubyforge.org/wiki/wiki.pl?OnlineCodeExamples I know of a few others, google might turn these up alex From fabio.petrucci at gmail.com Tue Aug 12 11:29:58 2008 From: fabio.petrucci at gmail.com (Fabio Petrucci) Date: Tue, 12 Aug 2008 17:29:58 +0200 Subject: [wxruby-users] xrc panels using xrcise Message-ID: Hi all, I'm facing a problem generating base classes using xrcise. i've this xrc layout: 300,400 wxnc ..as the xrcise tutorialsay: " Note that whereas the "Class" field of top-level Frames, Dialogs and Panels will become Ruby *classes*, for the controls within a container, the "Class" field is the name of a Ruby *module* used to extend the control." but no classes are generated for the two panels inside wxNotebook (contatti and config) Is there any options to force panel class generation? My platform is ubuntu 7.x - Ruby 1.8.5 - wxruby 1.9.7 - wx_sugar 0.1.20 thank you. f. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at pressure.to Tue Aug 12 12:54:48 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Aug 2008 17:54:48 +0100 Subject: [wxruby-users] xrc panels using xrcise In-Reply-To: References: Message-ID: <48A1C058.90204@pressure.to> Hi Fabio Fabio Petrucci wrote: > I'm facing a problem generating base classes using xrcise. > > i've this xrc layout: > ... > > ..as the xrcise tutorial > say: > > " Note that whereas the "Class" field of top-level Frames, Dialogs and > Panels will become Ruby *classes*, for the controls within a > container, the "Class" field is the name of a Ruby *module* used to > extend the control." > > but no classes are generated for the two panels inside wxNotebook > (contatti and config) > > Is there any options to force panel class generation? > It doesn't really work this way. The class always corresponds to a top-level element in the XRC - in this case, your frame. This limitation comes from WxWidgets. This base class is generated by XRCise. To link ruby code behaviours to contained elements - like your panels - you write a ruby a module with the same name as the 'subclass' attribute in the XRC. Then, when the whole layout is loaded from XRC, the elements will be extend-ed with that module. hth alex From lists at ruby-forum.com Thu Aug 14 05:10:19 2008 From: lists at ruby-forum.com (Kaja Mohaideen) Date: Thu, 14 Aug 2008 11:10:19 +0200 Subject: [wxruby-users] Multithreading Message-ID: <97d1cd0557b529bd17180412188de10a@ruby-forum.com> we people are new team for ruby. we trying to put multithreading in our code. how is it possible? we want to read a message from queue and process that message parellaly and finally insert the message to the DB. Can you give me the Idea please. we want to process 7000 to 10000 message and store it to the Database perminute. we are trying through threads. can you please help me how we do? Regards Kaja Mohaideen.A Trichy -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Aug 14 07:02:44 2008 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Aug 2008 12:02:44 +0100 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: References: Message-ID: <48A410D4.5000103@pressure.to> Christos Vasilakis wrote: > I am relative new to the wxRuby so please bear with me. > > I use Ubuntu Hardy Heron 8.04 release. I have installed the wxwidgets C > libraries > and then did a > > ... > I tried to run a simple example "Hello World" as described in the > tutorial > > http://wxruby.rubyforge.org/wiki/wiki.pl?Hello_World > > The frame is displayed correctly, but when i close the window i get: > > $ruby testwxruby.rb > testwxruby.rb:10: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i486-linux] > Thanks for the report, and apologies for the delay in replying. I've just fixed a bug which could cause crashes on Linux (and possibly Windows) in 1.9.7 when Frames with MenuBars were closed. It could cause problems either on app exit or, if other frames remained open, when garbage collection ran. Hopefully this will address instabilities reported by several users - if anyone has the development set up on Linux and can test this with SVN head, it would be much appreciated. Sorry for the trouble alex From alex at pressure.to Thu Aug 14 07:45:30 2008 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Aug 2008 12:45:30 +0100 Subject: [wxruby-users] Multithreading In-Reply-To: <97d1cd0557b529bd17180412188de10a@ruby-forum.com> References: <97d1cd0557b529bd17180412188de10a@ruby-forum.com> Message-ID: <48A41ADA.4050403@pressure.to> Kaja Mohaideen wrote: > we people are new team for ruby. we trying to put multithreading in our > code. how is it possible? we want to read a message from queue and > process that message parellaly and finally insert the message to the DB. > Can you give me the Idea please. > > we want to process 7000 to 10000 message and store it to the Database > perminute. we are trying through threads. can you please help me how we > do? > I'm not sure if your question is about wxRuby and threads as you seem to have posted this question to numerous forums... Anyway, for threading with wxRuby GUIs, look at the samples/etc/threaded.rb example in the distribution, and search the mailing list archives. This topic has been much discussed before. alex From lists at ruby-forum.com Thu Aug 14 14:02:38 2008 From: lists at ruby-forum.com (Christos Vasilakis) Date: Thu, 14 Aug 2008 20:02:38 +0200 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: <48A410D4.5000103@pressure.to> References: <48A410D4.5000103@pressure.to> Message-ID: <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> Hi Alex and thank you for your replay. All tests run on a clean ubuntu install with no previous wxruby instances(I had to reformat my hard drive some days ago) Here is what I did: I download the svn version of wxruby as described in the wiki: http://wxruby.rubyforge.org/wiki/wiki.pl?InstallingFromSource cvasilak at casper:~$ svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 ... ... Checked out revision 1751. cvasilak at casper:~$ sudo rake ... cvasilak at casper:~$ sudo rake gem WXRUBY_VERSION=1.9.7 (just to make it work, I didn't know what to supply as the wiki unfortunately doesn't specify what, ignore the version tag for now) ... cvasilak at casper:~$ sudo gem install wxruby-1.9.7-x86-linux.gem Tried to run the hello world found here: http://wxruby.rubyforge.org/wiki/wiki.pl?Hello_World cvasilak at casper:/home/cvasilak# ruby helloworld.rb helloworld.rb:4: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux] Aborted The window doesn't even pop up I immediately get a segmentation fault. I tried to run the other example mainly http://wxruby.rubyforge.org/wiki/wiki.pl?Using_Dialogs_To_Talk_To_Users Although it runs fine when I close the window I get cvasilak at casper:/home/cvasilak# ruby okcancel.rb okcancel.rb:36: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux] Aborted I tried to run the minimal example found in the samples directory of the wxruby but I get the same segmentation fault when I exit. Some details: cvasilak at casper:/home/cvasilak# ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux] cvasilak at casper:/home/cvasilak# gem -v 1.2.0 libwxbase2.8-0 2.8.7.1-0ubuntu-3 (default by repository) libwxgtk2.8-0 2.8.7.1-0ubuntu-3 (default by repository) Let me know of any tests you want me to run. Regards, Christos -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Aug 14 15:18:08 2008 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Aug 2008 20:18:08 +0100 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> References: <48A410D4.5000103@pressure.to> <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> Message-ID: <48A484F0.3070100@pressure.to> Hi Christos Thanks for trying this out. Christos Vasilakis wrote: > All tests run on a clean ubuntu install with no previous wxruby > instances(I had to reformat my hard drive some days ago) > > Here is what I did: > > I download the svn version of wxruby as described in the wiki: > > http://wxruby.rubyforge.org/wiki/wiki.pl?InstallingFromSource > > cvasilak at casper:~$ svn co > svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 > ... > ... > Checked out revision 1751. > > cvasilak at casper:~$ sudo rake > ... > cvasilak at casper:~$ sudo rake gem WXRUBY_VERSION=1.9.7 (just to make it > work, I didn't know what to supply as the wiki unfortunately doesn't > specify what, ignore the version tag for now) > ... > cvasilak at casper:~$ sudo gem install wxruby-1.9.7-x86-linux.gem > Here, instead of trying to install the code you built as a gem, run it locally from the directory you built wxruby2 in like this: ruby -Ilib path/to/helloworld.rb This will ensure that you're getting the newly-built SVN HEAD version. I tried running the tests again on a very similar setup (Ubuntu 8.04, built against the 2.8.7 version wx packages) and both run fine for me and exit cleanly. I think what may be happening is that running with rubygems, you're getting the original 1.9.7 with the bugs you first reported. cheers alex From lists at ruby-forum.com Thu Aug 14 17:56:41 2008 From: lists at ruby-forum.com (Christos Vasilakis) Date: Thu, 14 Aug 2008 23:56:41 +0200 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: <48A484F0.3070100@pressure.to> References: <48A410D4.5000103@pressure.to> <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> <48A484F0.3070100@pressure.to> Message-ID: <6a1d5266b69ea928680dd2cc0d33b2b6@ruby-forum.com> Hi Alex, Using your recommentation I tried the following: First I have unistalled the wx-ruby gem root at casper:/home/cvasilak/wxruby/wxruby2# gem uninstall wxruby Successfully uninstalled wxruby-1.9.7-x86-linux <> Then I tried to: root at casper:/home/cvasilak/wxruby/wxruby2# ruby /home/cvasilak/helloworld.rb /home/cvasilak/helloworld.rb:1:in `require': no such file to load -- wx (LoadError) from /home/cvasilak/helloworld.rb:1 Which is OK since the wxruby library is not installed in the system. Then I tried to: root at casper:/home/cvasilak/wxruby/wxruby2# ruby -I lib/ /home/cvasilak/helloworld.rb /home/cvasilak/helloworld.rb:4: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux] Aborted I tried the second example but this time I get a window but upon exit I receive the segmentation fault. That's really weird because as you say I use the same configuration as yours(Ubuntu 8.04, 2.8.7 wxwidgets etc). I don't know if it helps but the only thing that I manually installed as far as ruby is concerned is the rubygem ver 1.2.0 because the rubygem package that comes with ubuntu is quite old(0.9.4) Here is a list of gems installed in the system root at casper:/home/cvasilak/wxruby/wxruby2# gem list --local *** LOCAL GEMS *** hoe (1.7.0) (dependencies) rake (0.8.1) (dependencies) ruby-pg (0.7.9.2008.01.28) (for postgresql access) rubyforge (1.0.0) (dependencies) RubyRRDtool (0.6.0) (for statistics using RRD technology) Let me know if you need more information. Christos PS Tomorrow is a public holiday here in Greece and I would be out of office and home (I will be in my father's village with no net access) so If I don't answer you immediately, bear with me, I would be back on Saturday. -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Aug 14 19:13:59 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Aug 2008 00:13:59 +0100 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: <6a1d5266b69ea928680dd2cc0d33b2b6@ruby-forum.com> References: <48A410D4.5000103@pressure.to> <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> <48A484F0.3070100@pressure.to> <6a1d5266b69ea928680dd2cc0d33b2b6@ruby-forum.com> Message-ID: <48A4BC37.7000605@pressure.to> Christos Vasilakis wrote: > Then I tried to: > > root at casper:/home/cvasilak/wxruby/wxruby2# ruby > /home/cvasilak/helloworld.rb > /home/cvasilak/helloworld.rb:1:in `require': no such file to load -- wx > (LoadError) > from /home/cvasilak/helloworld.rb:1 > OK, this looks good > Then I tried to: > > root at casper:/home/cvasilak/wxruby/wxruby2# ruby -I lib/ > /home/cvasilak/helloworld.rb > /home/cvasilak/helloworld.rb:4: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i486-linux] > > Aborted > > I tried the second example but this time I get a window but upon exit I > receive the segmentation fault. > > That's really weird because as you say I use the same configuration as > yours(Ubuntu 8.04, 2.8.7 wxwidgets etc). I think the only difference is that I'm using a debug build package of wxWidgets from Debian (it has the suffix -dbg) rather than the standard libwx2.8. But that really shouldn't affect this. I'd suggest you try doing updating the sources to ensure you're up to HEAD (svn up) then doing a clean rebuild (rake reswig; rake). Then try running it using the local library (ruby -Ilib ...) If you're still getting the crash, it would be most useful to get a backtrace from gdb debugger. Try doing: gdb --args ruby -Ilib helloworld.rb Then at the gdb prompt: gdb> r < ENTER> If it stops after complaining about threads not found: gdb> c Then wait until it crashes. gdb should throw out some info. To get a full backtrace, do gdb> whe This should give a backtrace of where the crash occurred. thanks for your patience alex From alex at pressure.to Fri Aug 15 07:23:46 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Aug 2008 12:23:46 +0100 Subject: [wxruby-users] Segmentation Fault (GC) In-Reply-To: <53a584f3e1cc7b61b876f7de657e98f2@ruby-forum.com> References: <53a584f3e1cc7b61b876f7de657e98f2@ruby-forum.com> Message-ID: <48A56742.40404@pressure.to> Hi Bryan Bryan Ash wrote: > I've been ignoring a Garbage Collection Segmentation Fault for some time > now with the help of GC.disable in my Wx::App. > > I'm running Windows XP with: > ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] > wxruby (1.9.7) > activerecord (2.1.0) > sqlite3-ruby (1.2.2) > > The application stores the time spent working on tasks in SQLite when > the user starts and stops a task from the TaskBarIcon. > > It uses the following Wx components: Frame, Button, BoxSizer, Grid, > GridTableBase, GridCellAttr, Panel, StaticText, TaskBarIcon, Image, > Bitmap, Menu, MiniFrame, SystemSettings, TextCtrl > > The segfaults occur when I open and close the "Edit time entries" and > "Timesheet" frames. > > I've attached a cut down version that doesn't interface to SQLite or > ActiveRecord that still exhibits the problem. > Thanks for the report, and particularly for taking the time to produce a self-contained runnable version. It really helps investigates these things. I could reproduce your crash on OS X / ruby 1.8.6 with version 1.9.7 (I don't have an XP machine easily to hand right now, but I'd guess it's the same error). I traced the crash to problems with the memory management of destroyed Menus (as popped-up by the TaskBarIcon). However, I also tried it with the latest SVN HEAD and the crashes don't occur. I recently applied a fix for some similar Menu bugs and I think this has resolved the problem you're finding too. Unless you have a compiler set up, there's no workaround for now except to keep using GC.disable. However I'll test on Windows before the next release to confirm this is fixed there too. Hopefully we will have a next release in a week or two. cheers alex From alex at pressure.to Fri Aug 15 13:39:21 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Aug 2008 18:39:21 +0100 Subject: [wxruby-users] Filling clipboard doesn't work In-Reply-To: <48928C09.3000207@pressure.to> References: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> <48928C09.3000207@pressure.to> Message-ID: <48A5BF49.8020007@pressure.to> Alex Fenton wrote: > Niklas Baumstark wrote: >> I ran into a bit of trouble with my first wxRuby application. I'm using >> ruby 1.8.6 with wxRuby 1.9.7 on x86 Linux (Ubuntu). Didn't test any >> other platform yet. In my application, I'm trying to access the >> clipboard like this: >> >> Wx::Clipboard.open do |clip| Does it help to paste to other applications if you add clip.use_primary_selection here? Looking at the wxWidgets drag'n'drop sample, this is needed under X to share with other applications. >> clip.set_data Wx::TextDataObject.new("TEST") >> clip.flush >> end >> >> This doesn't work. While running the app (after the execution of the >> above code), the menu entry "Paste" is enabled in other applications, >> but nothing is in the clipboard (at least nothing happens on pasting). >> After quitting my application, the menu entry is disabled again and the >> clipboard is empty. >> It might be worth checking if the data is at least available within your own application. After doing the set_data, trying retrieving it with something like Wx::Clipboard.open do | clip | data = Wx::TextDataObject.new clip.get_data(data) p data.get_text end > This code works fine for me on OS X; both while the app is running and > after it's ended the text data is available to other apps via Paste, > .I'll try it out on Ubuntu later. I tried it out on Ubuntu and unfortunately I can confirm that neither within-application or inter-application copying via the Clipboard is working for me. However I'm using Ubuntu within a VirtualBox VM at the moment and this has some clipboard integration with the host OS - so I'd like to this out as the source of the problem. thanks alex From niklas.baumstark at googlemail.com Sat Aug 16 07:58:15 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Sat, 16 Aug 2008 13:58:15 +0200 Subject: [wxruby-users] Filling clipboard doesn't work In-Reply-To: <48A5BF49.8020007@pressure.to> References: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> <48928C09.3000207@pressure.to> <48A5BF49.8020007@pressure.to> Message-ID: <20080816135815.3cc1961f@niklaspc> Hello, Alex Fenton wrote: > Does it help to paste to other applications if you add > > clip.use_primary_selection > > here? unfortunately it does not. > It might be worth checking if the data is at least available within your > own application. After doing the set_data, trying retrieving it with > something like > > Wx::Clipboard.open do | clip | > data = Wx::TextDataObject.new > clip.get_data(data) > p data.get_text > end this doesn't work either, this prints out my old clipboard content (before running the app). is there a way i can help finding the source of this problem? Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Sat Aug 16 10:00:33 2008 From: alex at pressure.to (Alex Fenton) Date: Sat, 16 Aug 2008 15:00:33 +0100 Subject: [wxruby-users] Filling clipboard doesn't work In-Reply-To: <20080816135815.3cc1961f@niklaspc> References: <4a262246c56b9d257d2a0729a4b9eed8@ruby-forum.com> <48928C09.3000207@pressure.to> <48A5BF49.8020007@pressure.to> <20080816135815.3cc1961f@niklaspc> Message-ID: <48A6DD81.5000301@pressure.to> Niklas Baumstark wrote: > Alex Fenton wrote: > >> Does it help to paste to other applications if you add >> >> clip.use_primary_selection >> >> here? >> > > unfortunately it does not. > OK. Thanks for trying anyway. >> It might be worth checking if the data is at least available within your >> own application. After doing the set_data, trying retrieving it with >> something like >> >> Wx::Clipboard.open do | clip | >> data = Wx::TextDataObject.new >> clip.get_data(data) >> p data.get_text >> end >> > > this doesn't work either, this prints out my old clipboard content (before running the app). > is there a way i can help finding the source of this problem? You could try adding Wx::Log.add_trace_mask('clipboard') before the Clipboard operations. This may give you some more debugging output. But I tried this already and it all looks in order - the formats are matched etc. It's announcing that STRING_UTF8 and STRING data are available which is correct. Let me know if you see something different. I spent a few hours trying this under gdb and comparing to the wxWidgets dnd sample. My hunch is that it's something to do with the way the C++ classes are mapped onto Ruby. wxWidgets uses a pretty complex structure of virtual methods in DataObject* that are hard to translate. For example TextDataObject#get_data_size always seems to report 0 in wxRuby, which seems wrong. I'll keep looking into it cheers alex From lists at ruby-forum.com Mon Aug 18 06:24:31 2008 From: lists at ruby-forum.com (Christos Vasilakis) Date: Mon, 18 Aug 2008 12:24:31 +0200 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: <48A4BC37.7000605@pressure.to> References: <48A410D4.5000103@pressure.to> <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> <48A484F0.3070100@pressure.to> <6a1d5266b69ea928680dd2cc0d33b2b6@ruby-forum.com> <48A4BC37.7000605@pressure.to> Message-ID: Hi Alex, sorry for taking a bit longer to replay, other things kept me busy during the weekend and I didn't have time to sit in the computer. Anyway, here is the list of things I did. I downloaded the svn version of wxwidgets root at casper:/home/cvasilak/wxruby-svn# svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 .... Checked out revision 1758. Tried to run a program: root at casper:/home/cvasilak/wxruby-svn# ruby /home/cvasilak/helloworld.rb /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- wx (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /home/cvasilak/helloworld.rb:1 It's OK since the wx binding is not installed yet in the system. Tried to launch with the -I lib argument root at casper:/home/cvasilak/wxruby-svn/wxruby2# ruby -I lib/ /home/cvasilak/helloworld.rb /home/cvasilak/helloworld.rb:4: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux] Aborted I get the segmentation fault. Then I tried running it with gdb as you suggested: gdb --args ruby -I lib /home/cvasilak/helloworld.rb .... .... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7d29b60 (LWP 9022)] 0xb5f6bf74 in ?? () from /lib/libselinux.so.1 (gdb) whe #0 0xb5f6bf74 in ?? () from /lib/libselinux.so.1 #1 0xb5f6564e in ?? () from /lib/libselinux.so.1 #2 0xb5f5e100 in ?? () from /lib/libselinux.so.1 #3 0xb5f6d7bc in _fini () from /lib/libselinux.so.1 #4 0xb7fe0fdf in ?? () from /lib/ld-linux.so.2 #5 0xb7d58084 in exit () from /lib/tls/i686/cmov/libc.so.6 #6 0xb7f1ec85 in ruby_stop () from /usr/lib/libruby1.8.so.1.8 #7 0xb7f29cf1 in ruby_run () from /usr/lib/libruby1.8.so.1.8 #8 0x080486bd in main () (gdb) I tried the other example that popups a window first and then segfaults upon exit but I get the same error in gdb gdb --args ruby -I lib /home/cvasilak/okcancel.rb ... ... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7d0ab60 (LWP 9032)] 0xb5f4cf74 in ?? () from /lib/libselinux.so.1 (gdb) whe #0 0xb5f4cf74 in ?? () from /lib/libselinux.so.1 #1 0xb5f4664e in ?? () from /lib/libselinux.so.1 #2 0xb5f3f100 in ?? () from /lib/libselinux.so.1 #3 0xb5f4e7bc in _fini () from /lib/libselinux.so.1 #4 0xb7fc1fdf in ?? () from /lib/ld-linux.so.2 #5 0xb7d39084 in exit () from /lib/tls/i686/cmov/libc.so.6 #6 0xb7effc85 in ruby_stop () from /usr/lib/libruby1.8.so.1.8 #7 0xb7f0acf1 in ruby_run () from /usr/lib/libruby1.8.so.1.8 #8 0x080486bd in main () Let me know if you need more information Regards, Christos -- Posted via http://www.ruby-forum.com/. From niklas.baumstark at googlemail.com Mon Aug 18 17:26:57 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Mon, 18 Aug 2008 23:26:57 +0200 Subject: [wxruby-users] evt_auinotebook_end_drag ? Message-ID: <20080818232657.5ff3402b@niklaspc> Hello, this is my code (in a frame's constructor): self.evt_auinotebook_page_close(@notebook) { puts "page closed!" } self.evt_auinotebook_end_drag(@notebook) { puts "page moved away!" } while the first works as expected, the second does not work at all. the block is never called, when a tab is moved from the target-notebook to another one. is this a bug? if yes, can this be fixed? if want a notebook that adds to itself an empty page if there are no more other tabs (so that it stays usable). therefore i must somehow react on the user closing tabs. is there perhaps another way to work around this? Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From lists at ruby-forum.com Tue Aug 19 04:42:46 2008 From: lists at ruby-forum.com (Maverick Ni) Date: Tue, 19 Aug 2008 10:42:46 +0200 Subject: [wxruby-users] Perl Script Help Message-ID: <2fe1b912fabf3065ff3a9465a9015a89@ruby-forum.com> Can any one send me the perl script that can be helpful for me. The perl script for automatic transfer of our mails to the desired website. _________________________ Anthony Trivia Game Challenge -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Aug 19 07:35:51 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Aug 2008 12:35:51 +0100 Subject: [wxruby-users] Segmentation Fault. In-Reply-To: References: <48A410D4.5000103@pressure.to> <00ebd47a0d7597d5849260c239af18da@ruby-forum.com> <48A484F0.3070100@pressure.to> <6a1d5266b69ea928680dd2cc0d33b2b6@ruby-forum.com> <48A4BC37.7000605@pressure.to> Message-ID: <48AAB017.30305@pressure.to> Hi Christos Vasilakis wrote: > I get the segmentation fault. Then I tried running it with gdb as you > suggested: > > gdb --args ruby -I lib /home/cvasilak/helloworld.rb > .... > .... > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0xb7d29b60 (LWP 9022)] > 0xb5f6bf74 in ?? () from /lib/libselinux.so.1 > (gdb) whe > #0 0xb5f6bf74 in ?? () from /lib/libselinux.so.1 > #1 0xb5f6564e in ?? () from /lib/libselinux.so.1 > #2 0xb5f5e100 in ?? () from /lib/libselinux.so.1 > #3 0xb5f6d7bc in _fini () from /lib/libselinux.so.1 > #4 0xb7fe0fdf in ?? () from /lib/ld-linux.so.2 > #5 0xb7d58084 in exit () from /lib/tls/i686/cmov/libc.so.6 > #6 0xb7f1ec85 in ruby_stop () from /usr/lib/libruby1.8.so.1.8 > #7 0xb7f29cf1 in ruby_run () from /usr/lib/libruby1.8.so.1.8 > #8 0x080486bd in main () > (gdb) > > Thanks for running this. Unfortunately it seems that the debugging information has got truncated - I guess because you are using a release build of wxWidgets, and thus wxRuby tries to compile the smallest, fastest possible. If you were willing to try reproducing the error in a debug build, that should give more information. There is libwx package in Ubuntu with the -dbg suffix. If you install this, then run export WXRUBY_DEBUG=1 rake reswig rake and then try re-running the same process, we should get a more helpful backtrace. This is really puzzling as you have almost exactly the same setup as me, except that i built my own ruby. thanks alex From alex at pressure.to Tue Aug 19 08:39:11 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Aug 2008 13:39:11 +0100 Subject: [wxruby-users] evt_auinotebook_end_drag ? In-Reply-To: <20080818232657.5ff3402b@niklaspc> References: <20080818232657.5ff3402b@niklaspc> Message-ID: <48AABEEF.3000906@pressure.to> Niklas Baumstark wrote: > Hello, > > this is my code (in a frame's constructor): > > self.evt_auinotebook_page_close(@notebook) { puts "page closed!" } > self.evt_auinotebook_end_drag(@notebook) { puts "page moved away!" } > > while the first works as expected, the second does not work at all. the block is never called, when a tab is moved from the target-notebook to another one. I'm a bit puzzled by this too. Unfortunately I can't find documentation in wxWidgets of exactly when these events should occur. However, your query prompted me to look again at the auibook header in Wx. It seems that since version 2.8.5, several new AUI events were added, including EVT_AUINOTEBOOK_DRAG_DONE. I've added support for these events to wxRuby (SVN:1773), and this drag_done event does exactly what you're looking for. So you should be able to resolve this with the next wxRuby release (soon...) cheers alex From niklas.baumstark at googlemail.com Tue Aug 19 10:29:00 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Tue, 19 Aug 2008 16:29:00 +0200 Subject: [wxruby-users] evt_auinotebook_end_drag ? In-Reply-To: <48AABEEF.3000906@pressure.to> References: <20080818232657.5ff3402b@niklaspc> <48AABEEF.3000906@pressure.to> Message-ID: <20080819162900.484914b6@niklaspc> Hello, Alex Fenton wrote: > Niklas Baumstark wrote: > > Hello, > > > > this is my code (in a frame's constructor): > > > > self.evt_auinotebook_page_close(@notebook) { puts "page closed!" } > > self.evt_auinotebook_end_drag(@notebook) { puts "page moved away!" } > > > > while the first works as expected, the second does not work at all. the block is never called, when a tab is moved from the target-notebook to another one. > I'm a bit puzzled by this too. Unfortunately I can't find documentation > in wxWidgets of exactly when these events should occur. > > However, your query prompted me to look again at the auibook header in > Wx. It seems that since version 2.8.5, several new AUI events were > added, including EVT_AUINOTEBOOK_DRAG_DONE. I've added support for these > events to wxRuby (SVN:1773), and this drag_done event does exactly what > you're looking for. So you should be able to resolve this with the next > wxRuby release (soon...) thank you very much! by the way, when is the final version of wxruby going to be released? i love it :) Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Tue Aug 19 10:39:26 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Aug 2008 15:39:26 +0100 Subject: [wxruby-users] evt_auinotebook_end_drag ? In-Reply-To: <20080819162900.484914b6@niklaspc> References: <20080818232657.5ff3402b@niklaspc> <48AABEEF.3000906@pressure.to> <20080819162900.484914b6@niklaspc> Message-ID: <48AADB1E.9060506@pressure.to> Niklas Baumstark wrote: > Alex Fenton wrote: > >> I've added support for these >> events to wxRuby (SVN:1773), and this drag_done event does exactly what >> you're looking for. So you should be able to resolve this with the next >> wxRuby release (soon...) >> > > thank you very much! by the way, when is the final version of wxruby going to be released? i love it :) That's kind of you to say so... as for 2.0 it's up for discussion on the dev- mailing list. Basically I'd like to fix all the bugs that are fixable within wxRuby (some are wxWidgets problems): http://rubyforge.org/tracker/?atid=218&group_id=35&func=browse I would like the next release to be the final, but there's a few instabilities in 1.9.7 so it might be better for us to get another beta out sooner and then chip away at the remaining tricky bugs (GTK clipboard ... ;) cheers alex From niklas.baumstark at googlemail.com Tue Aug 19 11:16:13 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Tue, 19 Aug 2008 17:16:13 +0200 Subject: [wxruby-users] evt_auinotebook_end_drag ? In-Reply-To: <48AADB1E.9060506@pressure.to> References: <20080818232657.5ff3402b@niklaspc> <48AABEEF.3000906@pressure.to> <20080819162900.484914b6@niklaspc> <48AADB1E.9060506@pressure.to> Message-ID: <20080819171613.1e33d03a@niklaspc> Hello, Alex Fenton wrote: > That's kind of you to say so... as for 2.0 it's up for discussion on the > dev- mailing list. Basically I'd like to fix all the bugs that are > fixable within wxRuby (some are wxWidgets problems): > > http://rubyforge.org/tracker/?atid=218&group_id=35&func=browse > > I would like the next release to be the final, but there's a few > instabilities in 1.9.7 so it might be better for us to get another beta > out sooner and then chip away at the remaining tricky bugs (GTK > clipboard ... ;) ok I'm in no hurry :) Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From shs at demosophia.net Sun Aug 24 08:03:52 2008 From: shs at demosophia.net (Svend Haugaard =?ISO-8859-1?Q?S=F8rensen?=) Date: Sun, 24 Aug 2008 14:03:52 +0200 Subject: [wxruby-users] float to_s behavior Message-ID: <20080824140352.69573d3a@cybert.demosophia.net> Does wxruby change the behavior of to_s for float ? If I run this little program a = [1.23,4.56,7.89] puts a.join(' ') I get the following output 1.23 4.56 7.89 As your would expect, but if I add it to a program that uses wxruby the output is 1,23 4,56 7,89 According to danish grammar(I am from Denmark) this is the correct way to write numbers but this charge mess with all data files I write. How can I change it back to the original form ? From alex at pressure.to Sun Aug 24 09:09:51 2008 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Aug 2008 14:09:51 +0100 Subject: [wxruby-users] float to_s behavior In-Reply-To: <20080824140352.69573d3a@cybert.demosophia.net> References: <20080824140352.69573d3a@cybert.demosophia.net> Message-ID: <48B15D9F.9090809@pressure.to> Hi Svend Haugaard S?rensen wrote: > Does wxruby change the behavior of to_s for float ? > > If I run this little program > > a = [1.23,4.56,7.89] > puts a.join(' ') > > I get the following output > 1.23 4.56 7.89 > > As your would expect, but if I add it to a program that uses wxruby the > output is > 1,23 4,56 7,89 > > According to danish grammar(I am from Denmark) this is the correct way > to write numbers but this charge mess with all data files I write. > Interesting. wxRuby itself doesn't do anything to alter the behaviour of Float#to_s. The wxRuby library doesn't change or extend any of Ruby's standard classes; we consider that bad behaviour for a library. What's happening is that wxWidgets somewhere is calling the C setlocale function - I can't quite pin it down in the Wx source at the moment. This affects the way that the C sprintf (and also strftime) functions work. Ruby calls these under the hood to implement methods like Float#to_s and DateTime#strftime. I see something similar to you. In my locale (en_GB) our standard way of writing dates is DD/MM/YY (today is 24/08/2008), whereas in the US, people write months MM/DD/YY (today would be 08/24/2008). When I change wxRuby's locale to be en_GB, it also affects the way that Ruby methods like Time.now.strftime('%x') work. > How can I change it back to the original form ? > > The easiest way is probably to explicitly switch to en_US locale in the startup of your wxRuby application: Wx::Locale.set_locale('en_US') See the documentation http://wxruby.rubyforge.org/doc/locale.html Examples of using Wx::Locale can be found in one of the tests: http://wxruby.rubyforge.org/svn/trunk/wxruby2/tests/test_intl.rb cheers alex From shs at demosophia.net Sun Aug 24 13:31:18 2008 From: shs at demosophia.net (Svend Haugaard =?ISO-8859-1?Q?S=F8rensen?=) Date: Sun, 24 Aug 2008 19:31:18 +0200 Subject: [wxruby-users] Missing ids in documentation Message-ID: <20080824193118.41de2144@cybert.demosophia.net> I notice some link that didn't work in the documentation. By closer inspection I found that some of the headlines missed id-tags. The following grep sequence find them. grep ' > By closer inspection I found that some of the headlines missed > id-tags. > > The following grep sequence find them. > grep ' Hello, I cannot correctly load panel from xrc-file. My test programm is below. Problem is that panel content is drawn not in place of 'DYMMYPANEL', but in upper-left corner. Please, help me to find mistake. #!/usr/bin/ruby -w require 'wx' $ui_dir = File.dirname(__FILE__) class MainFrame < Wx::Frame def initialize(parent = nil) super xrc_file = File.join $ui_dir,'test.xrc' xml = Wx::XmlResource.get xml.flags = Wx::XRC_NO_SUBCLASSING | Wx::XRC_NO_RELOADING xml.init_all_handlers xml.load xrc_file xml.load_frame_subclass(self,parent,'MAINFRAME') @finder = lambda do |x| id = Wx::xrcid(x) Wx::Window.find_window_by_id(id,self) end @splitter = @finder.call 'SPLITTER' @dummy_panel = @finder.call 'DUMMYPANEL' @new_panel = xml.load_panel self,'PANEL' @splitter.replace_window @dummy_panel, @new_panel end end Wx::App.run do MainFrame.new.show end Attachments: http://www.ruby-forum.com/attachment/2605/test.xrc -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Aug 25 09:46:34 2008 From: alex at pressure.to (Alex Fenton) Date: Mon, 25 Aug 2008 14:46:34 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: <9b51180771291530f8308137a19f7493@ruby-forum.com> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> Message-ID: <48B2B7BA.2030601@pressure.to> Hi Max Salov wrote: > Hello, > I cannot correctly load panel from xrc-file. My test programm is below. > Problem is that panel content is drawn not in place of 'DYMMYPANEL', but > in upper-left corner. Please, help me to find mistake. > > #!/usr/bin/ruby -w > require 'wx' > $ui_dir = File.dirname(__FILE__) > class MainFrame < Wx::Frame > def initialize(parent = nil) > super > xrc_file = File.join $ui_dir,'test.xrc' > xml = Wx::XmlResource.get > xml.flags = Wx::XRC_NO_SUBCLASSING | Wx::XRC_NO_RELOADING > xml.init_all_handlers > xml.load xrc_file > xml.load_frame_subclass(self,parent,'MAINFRAME') > @finder = lambda do |x| > id = Wx::xrcid(x) > Wx::Window.find_window_by_id(id,self) > end > @splitter = @finder.call 'SPLITTER' > @dummy_panel = @finder.call 'DUMMYPANEL' > @new_panel = xml.load_panel self,'PANEL' > You're loading the new panel as a child of 'self' - the Frame, when it should be a child of @splitter I think? > @splitter.replace_window @dummy_panel, @new_panel In my experience you probably want to follow this with @dummy_panel.destroy Otherwise you will be left with the old panel hanging around hth alex From lists at ruby-forum.com Mon Aug 25 10:05:33 2008 From: lists at ruby-forum.com (Max Salov) Date: Mon, 25 Aug 2008 16:05:33 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B2B7BA.2030601@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> Message-ID: Alex Fenton wrote: > Hi > > You're loading the new panel as a child of 'self' - the Frame, when it > should be a child of @splitter I think? >> @splitter.replace_window @dummy_panel, @new_panel > In my experience you probably want to follow this with > > @dummy_panel.destroy > > Otherwise you will be left with the old panel hanging around > > hth > alex Hi, Thanks for reply. Sorry for wrong topic subject In such case @new_panel = xml.load_panel @splitter,'PANEL' @splitter.replace_window @dummy_panel, @new_panel @dummy_panel.destroy 'PANEL' content(one static text) is rendered in upper-left corner of splitter (left pane), while it supposed to be on the right Max -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Mon Aug 25 10:12:10 2008 From: alex at pressure.to (Alex Fenton) Date: Mon, 25 Aug 2008 15:12:10 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> Message-ID: <48B2BDBA.8050009@pressure.to> Max Salov wrote: > Thanks for reply. > Sorry for wrong topic subject > In such case > > @new_panel = xml.load_panel @splitter,'PANEL' > @splitter.replace_window @dummy_panel, @new_panel > @dummy_panel.destroy > > 'PANEL' content(one static text) is rendered in upper-left corner of > splitter (left pane), while it supposed to be on the right Hard to say without seeing actual code. With any query like this, a minimal and *runnable* sample that demonstrates the issue is best. At a guess, you may need a Sizer within your Panel to ensure that the child text is placed in the right place. alex From shs at demosophia.net Mon Aug 25 17:02:55 2008 From: shs at demosophia.net (Svend Haugaard =?ISO-8859-1?Q?S=F8rensen?=) Date: Mon, 25 Aug 2008 23:02:55 +0200 Subject: [wxruby-users] Missing ids in documentation In-Reply-To: <48B1A87B.80101@pressure.to> References: <20080824193118.41de2144@cybert.demosophia.net> <48B1A87B.80101@pressure.to> Message-ID: <20080825230255.49e4d66f@cybert.demosophia.net> On Sun, 24 Aug 2008 19:29:15 +0100 Alex Fenton wrote: > Svend Haugaard S?rensen wrote: > > I notice some link that didn't work in the documentation. > > > > By closer inspection I found that some of the headlines missed > > id-tags. > > > > The following grep sequence find them. > > grep ' release (SVN:1776). If you find other mistakes, please do send them > in here or on the bugtracker. We're getting the docs into the best > shape possible for 2.0 Here is a link checker your can use to find missing pages. http://valet.webthing.com/link/ Just write in http://wxruby.rubyforge.org/doc/ and set the recursion depth to 2 and it finds all the missing pages. Now thanks for the help with my program it is working. From lists at ruby-forum.com Tue Aug 26 01:43:34 2008 From: lists at ruby-forum.com (Max Salov) Date: Tue, 26 Aug 2008 07:43:34 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B2BDBA.8050009@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> Message-ID: <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> Alex Fenton wrote: > Hard to say without seeing actual code. With any query like this, a > minimal and *runnable* sample that demonstrates the issue is best. > > At a guess, you may need a Sizer within your Panel to ensure that the > child text is placed in the right place. > > alex Complete project (rb-script, wxFormBuilder project, generated xrc and screenshot) are attached to post. 'GC.disable' is present to avoid random crashes described in http://www.ruby-forum.com/topic/142975 OS Windows XP SP2 ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-mswin32] wxRuby 1.9.7 installed from gem Max Attachments: http://www.ruby-forum.com/attachment/2611/test.zip -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Aug 26 02:07:56 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Aug 2008 07:07:56 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> Message-ID: <48B39DBC.5060704@pressure.to> Max Salov wrote: > Complete project (rb-script, wxFormBuilder project, generated xrc and > screenshot) are attached to post. > I don't think this is very hard to fix - you currently have an intermediate panel as the right-hand-side child of your upper splitter window. I made your DUMMYPANEL the direct second child of the splitter window and then it all works fine. You were attaching your replacement window in the wrong place. Generally a garbled layout with an element in the top left means that something is being attached to thr wrong parent, or added to the wrong sizer, or missing a sizer.add call. I've made this mistake a lot of times doing wxRuby programming (including earlier today...) and they're always fixed by looking closely at the window hierarchy. > 'GC.disable' is present to avoid random crashes described in > http://www.ruby-forum.com/topic/142975 > OK, this should be fixed with the upcoming 1.9.8 release. Sorry for the inconvenience. > OS Windows XP SP2 > ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-mswin32] > wxRuby 1.9.7 installed from gem > a From lists at ruby-forum.com Tue Aug 26 02:51:29 2008 From: lists at ruby-forum.com (Max Salov) Date: Tue, 26 Aug 2008 08:51:29 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B39DBC.5060704@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> Message-ID: Thank You very mush for help. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Aug 26 09:21:33 2008 From: lists at ruby-forum.com (Max Salov) Date: Tue, 26 Aug 2008 15:21:33 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> Message-ID: Hi, Time passes and new questions arise :) If I load panel directly from xrc-file, everything is ok, but if I create a class class NewPanel < Wx::Panel def initialize parent = nil super $xml.load_panel_subclass(self,parent,'PANEL') end end and load it using @new_panel = NewPanel.new @splitter panel content is not shown correctly, it appears only after resizing panel. self.refresh doesn't help. What can be done? Complete project is attached to post. Max Attachments: http://www.ruby-forum.com/attachment/2613/test.zip -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Tue Aug 26 09:41:54 2008 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Aug 2008 14:41:54 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> Message-ID: <48B40822.7060004@pressure.to> Max Salov wrote: > If I load panel directly from xrc-file, everything is ok, but if I > create a class > > class NewPanel < Wx::Panel > def initialize parent = nil > super > Here, you must call super() - with no arguments. Whenever you're loading an XRC layout into a Frame/Panel/Dialog subclass you must call the default initialize with no arguments, then call load_xxx_subclass with the usual arguments. > $xml.load_panel_subclass(self,parent,'PANEL') > end > end > cheers aelx From lists at ruby-forum.com Wed Aug 27 02:07:15 2008 From: lists at ruby-forum.com (Max Salov) Date: Wed, 27 Aug 2008 08:07:15 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B40822.7060004@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> Message-ID: Alex Fenton wrote: > Max Salov wrote: >> If I load panel directly from xrc-file, everything is ok, but if I >> create a class >> >> class NewPanel < Wx::Panel >> def initialize parent = nil >> super >> > Here, you must call super() - with no arguments. Whenever you're loading > an XRC layout into a Frame/Panel/Dialog subclass you must call the > default initialize with no arguments, then call load_xxx_subclass with > the usual arguments. > >> $xml.load_panel_subclass(self,parent,'PANEL') >> end >> end >> > > cheers > aelx Hm, 'super()' call raises error in NewPanel#initalize, while in MainFrame#initialize it works perfectly. c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in `pre_wx_kwctor_init': wrong # of arguments(0 for 1) (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in `initialize' from ./newpanel.rb:3:in `initialize' from test.rb:21:in `new' from test.rb:21:in `initialize' from test.rb:35:in `new' from test.rb:35:in `on_init' from c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/classes/app.rb:16:in `main_loop' from c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/classes/app.rb:16:in `run' from test.rb:29 And one more question regarding events. What happens to events, assosiated to destroyed objects? my_button = Wx::Button.new self evt_button my_button, :my_button_click my_button.destroy Is this code ok, or I have to disconnect event first? my_button = Wx::Button.new self evt_button my_button, :my_button_click disconnect my_button, Wx::ID_ANY, :evt_button my_button.destroy Max -- Posted via http://www.ruby-forum.com/. From mario at ruby-im.net Wed Aug 27 03:16:56 2008 From: mario at ruby-im.net (Mario Steele) Date: Wed, 27 Aug 2008 02:16:56 -0500 Subject: [wxruby-users] xml.load_panel In-Reply-To: References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> Message-ID: Hello Max, On Wed, Aug 27, 2008 at 1:07 AM, Max Salov wrote: > And one more question regarding events. What happens to events, > assosiated to destroyed objects? > > my_button = Wx::Button.new self > evt_button my_button, :my_button_click > my_button.destroy > > Is this code ok, or I have to disconnect event first? > > my_button = Wx::Button.new self > evt_button my_button, :my_button_click > disconnect my_button, Wx::ID_ANY, :evt_button > my_button.destroy This part, you don't have to worry about disconnecting any events, as wxRuby automatically disconnects any associated events from the object, before destruction. Your first example, would work just fine. -- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at pressure.to Wed Aug 27 05:12:13 2008 From: alex at pressure.to (Alex Fenton) Date: Wed, 27 Aug 2008 10:12:13 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> Message-ID: <48B51A6D.5050707@pressure.to> Max Salov wrote: > Hm, 'super()' call raises error in NewPanel#initalize, while in > MainFrame#initialize it works perfectly. > > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in > `pre_wx_kwctor_init': wrong # of arguments(0 for 1) (ArgumentError) > from > c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in > `initialize' > Hmm, I get the same error with 1.9.7. I had originally tried with the current SVN version, which works fine, although I'm not quite sure what's changed. Perhaps someone with the latest development version could confirm that this is fixed there? > And one more question regarding events. What happens to events, > assosiated to destroyed objects? As Mario says, wxRuby, and wxWidgets deal with this internally. alex From lists at ruby-forum.com Wed Aug 27 05:49:26 2008 From: lists at ruby-forum.com (Max Salov) Date: Wed, 27 Aug 2008 11:49:26 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B51A6D.5050707@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> <48B51A6D.5050707@pressure.to> Message-ID: <2b4c76c7ef8ba9e148bbcaa268c8f77a@ruby-forum.com> Alex, Mario, thank You for explanations. Max -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Aug 27 07:36:28 2008 From: lists at ruby-forum.com (Max Salov) Date: Wed, 27 Aug 2008 13:36:28 +0200 Subject: [wxruby-users] Problems loading .xrc file In-Reply-To: <4886FC34.8030504@aoeu.info> References: <9921570db54f295d020503e1df69a4ca@ruby-forum.com> <4886FC34.8030504@aoeu.info> Message-ID: <64501292d9cb59091a5b0c30aea65e2b@ruby-forum.com> Magnus Engstr?m wrote: > Hi Magnus, > > I'm using XRC on both Windows and Linux, and I'm usually building > applications the same way, so I wrote a template to have a quick > starting point. It should work fine on Windows too I think. > Make sure to start it from the right directory though (double-clicking > on wxtemplate should work), currently it looks for ui/ui.xrc relative to > starting directory. > > /Magnus Hi Magnus, I've found Your template very helpful for me. I have few ideas that can be used in wxhelper::map_events def map_events parent parent.instance_variables.each do |variable| object = parent.instance_variable_get(variable) case object when Wx::Button method = variable.gsub(/^@(.+)$/,'\1_click').to_sym parent.evt_button object, method if parent.respond_to? method # and so on end end end Changes are: 1. find controls not by name, but by class 2. associate event handler only if it is present I hope idea is clear. Max -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Aug 28 07:02:20 2008 From: lists at ruby-forum.com (Max Salov) Date: Thu, 28 Aug 2008 13:02:20 +0200 Subject: [wxruby-users] Building wxruby on windows with Visual C++ Express Edition Message-ID: <59f9b15e9b583ee6201b34130994711c@ruby-forum.com> Hello, Sorry for bothering You with so many questions, but I'm trying to build wxruby from svn and wxWindgets 2.8.8 using Visual C++ 2008 Express Edition. I builded wxWindgets following instructions http://wiki.wxwidgets.org/Compiling_WxWidgets and http://wxruby.rubyforge.org/wiki/wiki.pl?HowToBuildWxWidgets It compiled without any errors. But on linking step of wxruby build process error occurs. May be another compiler should be used or I missconfigured something? Configurations that I've made: switched runtime library to "Multi-Threaded (/MT)" for all projects and in 'include/wx/msw/setup.h' defined wxUSE_UNICODE, wxUSE_GLCANVAS and wxUSE_GRAPHICS_CONTEXT to 1 link swig/wx.res obj/AboutDialogInfo.obj ...... c:/ruby /lib/msvcrt-ruby18.lib /dll /out:lib/wxruby2.so Microsoft (R) Incremental Linker Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string< char,struct std::char_traits,class std::allocator >::~basic_string,class std::allocator >(void)" (??1?$basi c_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already defined i n wxmsw28u_core.lib(graphics.obj) msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: unsigned int __thiscall std:: basic_string,class std::allocator >::si ze(void)const " (?size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@s td@@QBEIXZ) already defined in wxmsw28u_core.lib(graphics.obj) msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string< char,struct std::char_traits,class std::allocator >::basic_string,class std::allocator >(char const *)" (?? 0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z) already defined in wxmsw28u_core.lib(graphics.obj) msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: __thiscall std::basic_string< char,struct std::char_traits,class std::allocator >::basic_string,class std::allocator >(class std::basic_s tring,class std::allocator > const &)" (??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV01@@Z) a lready defined in wxmsw28u_core.lib(graphics.obj) msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: char const * __thiscall std:: basic_string,class std::allocator >::c_ str(void)const " (?c_str@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@ @std@@QBEPBDXZ) already defined in wxmsw28u_core.lib(graphics.obj) LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo already defin ed in MSVCRT.lib(MSVCR90.dll) Creating library lib/wxruby2.lib and object lib/wxruby2.exp LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; us e /NODEFAULTLIB:library lib/wxruby2.so : fatal error LNK1169: one or more multiply defined symbols found rake aborted! Command failed with status (145): [link swig/wx.res obj/AboutDialogInfo.obj... ] c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:899:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:906:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:906:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:985:in `sh' ./rake/rakewx.rb:100 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:544:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:544:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_c hain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_c hain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisit es' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_c hain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_c hain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 c:/ruby/bin/rake:16:in `load' c:/ruby/bin/rake:16 Max -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Thu Aug 28 07:36:46 2008 From: alex at pressure.to (Alex Fenton) Date: Thu, 28 Aug 2008 12:36:46 +0100 Subject: [wxruby-users] Building wxruby on windows with Visual C++ Express Edition In-Reply-To: <59f9b15e9b583ee6201b34130994711c@ruby-forum.com> References: <59f9b15e9b583ee6201b34130994711c@ruby-forum.com> Message-ID: <48B68DCE.2090105@pressure.to> Max Salov wrote: > Sorry for bothering You with so many questions, Your questions are welcome; it's what this list is for. > but I'm trying to build > wxruby from svn and wxWindgets 2.8.8 using Visual C++ 2008 Express > Great - it would be good to have more people building from SVN on Windows as though the platform's used a lot, the development team are primarily OS X & Linux based. However, I'm pretty sure you can't build wxRuby (or any other ruby extension) with Visual Studio 2008. I'm assuming you're using a ruby installed from the One-Click or similar (you can check by doing ruby -v). The released ruby builds are built with VS 6, and VS2008 can't be used to compile extensions for this. You'll get the kind of weird errors you seem to be getting. You have two ways to get around this. You could try and get hold of a copy of VS6, but Microsoft don't make it available anywhere. I think I may have tracked down a copy in my University Library. What I would strongly recommend, though, is to look into using MingW - which is gcc for Windows, and therefore free. It will soon be used as the preferred compiler for Ruby, and wxRuby, on Windows. It takes slightly longer to compile, but produces significantly faster-running code. Luis Lavena provides a handy start pack which includes a a Ruby built with mingW, and the compiler. Mario wrote a pretty comprehensive page about setting up wxRuby for use with MingW, from installing MingW to compiling WxWidgets and wxRuby. http://wxruby.rubyforge.org/wiki/wiki.pl?NotesOnMingW Very happy to help further with this - might be more appropriate to follow up on the -dev list if you want: http://rubyforge.org/mailman/listinfo/wxruby-development cheers alex From lists at ruby-forum.com Thu Aug 28 22:53:13 2008 From: lists at ruby-forum.com (Bryan Ash) Date: Fri, 29 Aug 2008 04:53:13 +0200 Subject: [wxruby-users] Segmentation Fault (GC) In-Reply-To: <48A56742.40404@pressure.to> References: <53a584f3e1cc7b61b876f7de657e98f2@ruby-forum.com> <48A56742.40404@pressure.to> Message-ID: <5083265c8d042f85c88bfd2e27268709@ruby-forum.com> RubyForge just told me that 1.9.8 is available. I'd love to test if this bug is fixed, is there a plan to publish a Gem for x86-mswin32? Thanks, Bryan -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Aug 29 03:11:00 2008 From: lists at ruby-forum.com (Max Salov) Date: Fri, 29 Aug 2008 09:11:00 +0200 Subject: [wxruby-users] wxruby-1.9.8-x86-mingw32.gem Message-ID: I've just builded gem that is not present on rubyforge. http://ifile.it/qp8vk7s I have no site to upload to, so I used ifile.it service, so excuse me for inconvenience Some more information: $ rake WXRUBY_VERSION=1.9.8 gem WARNING: RDoc will not be generated (has_rdoc == false) (in c:/wxruby-1.9.8) Enabling UNICODE build The following wxWidgets features are not available and will be skipped: GCDC GLCanvas GraphicsBrush GraphicsContext GraphicsFont GraphicsMatrix GraphicsObject GraphicsPath GraphicsPen MediaCtrl MediaEvent Successfully built RubyGem Name: wxruby Version: 1.9.8 File: wxruby-1.9.8-x86-mingw32.gem $ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-mingw32] $ gcc -v Reading specs from c:/msys/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.5 (mingw special) Max -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Aug 29 03:46:31 2008 From: lists at ruby-forum.com (Max Salov) Date: Fri, 29 Aug 2008 09:46:31 +0200 Subject: [wxruby-users] wxruby-1.9.8-x86-mingw32.gem In-Reply-To: References: Message-ID: <34bee1a250993be639fcfc6780cb1af1@ruby-forum.com> If file size is too big (11.1 MB), or You don't need debug information, here is stripped gem with no debug information (6.14 MB) http://ifile.it/9rg1qm5 Ruby compiled with mingw (2.7 MB) can be downloaded here http://dump.mmediasys.com/installer3/ -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Aug 29 06:55:04 2008 From: lists at ruby-forum.com (Max Salov) Date: Fri, 29 Aug 2008 12:55:04 +0200 Subject: [wxruby-users] xml.load_panel In-Reply-To: <48B51A6D.5050707@pressure.to> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> <48B51A6D.5050707@pressure.to> Message-ID: <40c9f3d1bead570d6c52b7d783495ddd@ruby-forum.com> Alex Fenton wrote: > Max Salov wrote: >> Hm, 'super()' call raises error in NewPanel#initalize, while in >> MainFrame#initialize it works perfectly. >> >> c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in >> `pre_wx_kwctor_init': wrong # of arguments(0 for 1) (ArgumentError) >> from >> c:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.7-i386-mswin32/lib/wx/keyword_ctors.rb:180:in >> `initialize' >> > Hmm, I get the same error with 1.9.7. I had originally tried with the > current SVN version, which works fine, although I'm not quite sure > what's changed. Perhaps someone with the latest development version > could confirm that this is fixed there? > > alex Hello, I don't know my new problem is the same, but now I have the following XRCPanel is generated from xrc-file by xrcise #Works fine class NewPanel < XRCPanel def initialize parent = nil super end end # puts don't get executed and panel content is not updated at all # and is not visible class NewPanel < XRCPanel def initialize parent = nil super() puts 'Hello, World!' end end #Works fine but 'on_init' is optional class NewPanel < XRCPanel def on_init puts "Hello, World!" end end So, please, what is the correct method? -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Fri Aug 29 10:09:15 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Aug 2008 15:09:15 +0100 Subject: [wxruby-users] wxRuby 1.9.8 In-Reply-To: <5083265c8d042f85c88bfd2e27268709@ruby-forum.com> References: <53a584f3e1cc7b61b876f7de657e98f2@ruby-forum.com> <48A56742.40404@pressure.to> <5083265c8d042f85c88bfd2e27268709@ruby-forum.com> Message-ID: <48B8030B.4030901@pressure.to> Bryan Ash wrote: > RubyForge just told me that 1.9.8 is available. > Rubyforge sends out those automatic notices as the first file in a release is uploaded, which was last night. Withthe amount of compiling involved, it can take a few days to have a full collection of binary builds available. > I'd love to test if this bug is fixed, is there a plan to publish a Gem > for x86-mswin32? Yes, I'm just looking for a copy of the MSVC compiler at the moment. You should be able to use the MingW build which is now available. This is really intended for the new, improved windows version of ruby (http://dump.mmediasys.com/installer3/) but in fact I find this build also works with my version of the One-Click Installer (1.8.6) So if you're keen to try, download the -mingw gem and install it - you might need to use --force or something. Your feedback's welcome.. cheers alex From alex at pressure.to Fri Aug 29 10:11:01 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Aug 2008 15:11:01 +0100 Subject: [wxruby-users] wxruby-1.9.8-x86-mingw32.gem In-Reply-To: References: Message-ID: <48B80375.70105@pressure.to> Hi Max Max Salov wrote: > I've just builded gem that is not present on rubyforge. > > http://ifile.it/qp8vk7s > > I have no site to upload to, so I used ifile.it service, so excuse me > for inconvenience Thanks for offering these builds. There's now an official wxRuby binary for mingw32 on the RubyForge project site. It includes the Graphics* and Media* classes. It might take an hour or two to mirror out. cheers alex From alex at pressure.to Fri Aug 29 10:15:31 2008 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Aug 2008 15:15:31 +0100 Subject: [wxruby-users] xml.load_panel In-Reply-To: <40c9f3d1bead570d6c52b7d783495ddd@ruby-forum.com> References: <9b51180771291530f8308137a19f7493@ruby-forum.com> <48B2B7BA.2030601@pressure.to> <48B2BDBA.8050009@pressure.to> <4cffccead406db76dcaa2d8f026a1fec@ruby-forum.com> <48B39DBC.5060704@pressure.to> <48B40822.7060004@pressure.to> <48B51A6D.5050707@pressure.to> <40c9f3d1bead570d6c52b7d783495ddd@ruby-forum.com> Message-ID: <48B80483.1080306@pressure.to> Max Salov wrote: > Alex Fenton wrote: > >> Hmm, I get the same error with 1.9.7. I had originally tried with the >> current SVN version, which works fine, although I'm not quite sure >> what's changed. On going through the ChangeLog, I see this was in fact specifically fixed for version 1.9.8 > I don't know my new problem is the same, but now I have the following > XRCPanel is generated from xrc-file by xrcise > > > #Works fine > class NewPanel < XRCPanel > def initialize parent = nil > super > end > end > Have a look at the code of your XRCPanel. It takes a single-argument, parent, but it calls Wx::Panel.new() with no arguments, which is the way it's done for loading from XRC. So you need to call new in XRCPanel with a correct parent argument; it will deal with the rest. > # puts don't get executed and panel content is not updated at all > # and is not visible > class NewPanel < XRCPanel > def initialize parent = nil > super() > puts 'Hello, World!' > end > end > Here you're telling the Panel it should be attached to +nil+ so it won't display properly, or might even crash. > #Works fine but 'on_init' is optional > class NewPanel < XRCPanel > def on_init > puts "Hello, World!" > end > end > This is deprecated and will be dropped from future versions of XRCise - its use is discouraged. alex From lists at ruby-forum.com Fri Aug 29 14:30:20 2008 From: lists at ruby-forum.com (Bryan Ash) Date: Fri, 29 Aug 2008 20:30:20 +0200 Subject: [wxruby-users] wxRuby 1.9.8 In-Reply-To: <48B8030B.4030901@pressure.to> References: <53a584f3e1cc7b61b876f7de657e98f2@ruby-forum.com> <48A56742.40404@pressure.to> <5083265c8d042f85c88bfd2e27268709@ruby-forum.com> <48B8030B.4030901@pressure.to> Message-ID: Alex, it seems that YOU are the MAN! This issue appears fixed in version 1.9.8. Good work, thanks for your help, Bryan -- Posted via http://www.ruby-forum.com/. From alex at pressure.to Fri Aug 29 22:20:13 2008 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Aug 2008 03:20:13 +0100 Subject: [wxruby-users] wxRuby 1.9.8 Message-ID: <48B8AE5D.9060003@pressure.to> Hi Well, there's a new wxRuby around. == NEW FEATURES * Enable wxRuby to work with Ruby 1.8.7 and 1.9.0-4 - As well as not crashing with these recent ruby releases, there's also some binaries for Ruby 1.9 * Eliminated many bugs, crashers and build problems - Includes fix for a nasty crasher in 1.9.7 affecting closed Windows * Added the context help set of classes (HelpProvider etc) - For example, you can use SimpleHelpProvider to show context help for individual widgets just by calling win#help_text= * Added GCDC and ClipboardTextEvent classes - GCDC permits anti-aliased drawing using the standard DC API * Substantial performance improvements * Many additions and corrections to docs * Builds are now based on wxWidgets-2.8.8 - This latest stable version of wxWidgets include fixes for some bugs reported in wxRuby == INSTALLATION Source and binary gems from: http://rubyforge.org/frs/?group_id=35&release_id=25320 We're working on a mswin-32 binary, but for the moment, Windows users using the One-Click installer Ruby might try installing the mingw32 build. This seems to be compatible; please report any bugs. == CREDITS Thanks to everyone who provided patches, bug reports and feedback. This version includes patches contributed by Cezar Espinola, Chauk-Mean P and Pascal Hurni. == NEXT STEPS Plan is to fix all remaining high-priority bugs and then make the next release a stable 2.0. All reports and requests are welcome on the RubyForge tracker; please give them a high priority (4+) if you want them definitely fixed for the 2.0 release. cheers alex From mario at ruby-im.net Sat Aug 30 01:51:57 2008 From: mario at ruby-im.net (Mario Steele) Date: Sat, 30 Aug 2008 00:51:57 -0500 Subject: [wxruby-users] Release of 1.9.8 x86_64 gem Message-ID: Hello All, I've just uploaded wxruby 1.9.8 x86_64 Gem, for consumption, anyone having any problems feel free to report it to the list, and I will look into it. Please allow for 24 hours, or longer, to pass, to allow the gem to be migrated between all gem repos. -- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From niklas.baumstark at googlemail.com Sat Aug 30 13:03:43 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Sat, 30 Aug 2008 19:03:43 +0200 Subject: [wxruby-users] wxRuby 1.9.8 In-Reply-To: <48B8AE5D.9060003@pressure.to> References: <48B8AE5D.9060003@pressure.to> Message-ID: <20080830190343.250c24da@niklaspc> Hello, Alex Fenton wrote: > == NEXT STEPS > > Plan is to fix all remaining high-priority bugs and then make the next > release a stable 2.0. All reports and requests are welcome on the > RubyForge tracker; please give them a high priority (4+) if you want > them definitely fixed for the 2.0 release. i would very like the clipboard bug in GTK to get fixed by version 2.0 but i can't register with the rubyforge site for some reasons (it says i'm lacking credentials when i login to confirm my email address). can you please set the priority for this to the mentioned level? Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From alex at pressure.to Sun Aug 31 10:26:07 2008 From: alex at pressure.to (Alex Fenton) Date: Sun, 31 Aug 2008 15:26:07 +0100 Subject: [wxruby-users] wxRuby 1.9.8 In-Reply-To: <20080830190343.250c24da@niklaspc> References: <48B8AE5D.9060003@pressure.to> <20080830190343.250c24da@niklaspc> Message-ID: <48BAA9FF.2000705@pressure.to> Niklas Baumstark wrote: > i would very like the clipboard bug in GTK to get fixed by version 2.0 but i can't register with the rubyforge site for some reasons (it says i'm lacking credentials when i login to confirm my email address). can you please set the priority for this to the mentioned level? Sure, I'd see this as something we should fix for 2.0 - it's a core functionality problem that works in wxWidgets. I've marked it MUST FIX for 2.0 cheers alex From niklas.baumstark at googlemail.com Sun Aug 31 16:04:51 2008 From: niklas.baumstark at googlemail.com (Niklas Baumstark) Date: Sun, 31 Aug 2008 22:04:51 +0200 Subject: [wxruby-users] wxRuby 1.9.8 In-Reply-To: <48BAA9FF.2000705@pressure.to> References: <48B8AE5D.9060003@pressure.to> <20080830190343.250c24da@niklaspc> <48BAA9FF.2000705@pressure.to> Message-ID: <20080831220451.3b7ed649@niklaspc> Hello, Alex Fenton wrote: > Niklas Baumstark wrote: > > i would very like the clipboard bug in GTK to get fixed by version 2.0 but i can't register with the rubyforge site for some reasons (it says i'm lacking credentials when i login to confirm my email address). can you please set the priority for this to the mentioned level? > > Sure, I'd see this as something we should fix for 2.0 - it's a core > functionality problem that works in wxWidgets. I've marked it MUST FIX > for 2.0 thank you very much. Greetings, Niklas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: