From mattias.norlander at gmail.com Sun Nov 19 04:54:23 2006 From: mattias.norlander at gmail.com (Mattias Norlander) Date: Sun, 19 Nov 2006 10:54:23 +0100 Subject: [Wxruby-users] TaskBarIcon i wxruby2-preview gem Message-ID: Hi! I would like to use the Wx::TaskBarIcon class, but it does not seem to be present in my installation. I'm using the latest "wxruby2-preview" gem. From browsing the mailing lists it seems as if this class was added quite recently, so I guess it is not yet included in the gem. So my questions are: When will this class be available in the gem package? Until then, do I have any other options to get hold of this feature? Kind regards, Mattias -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20061119/314a38e7/attachment.html From alex at pressure.to Tue Nov 21 03:40:53 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 21 Nov 2006 08:40:53 +0000 Subject: [Wxruby-users] TaskBarIcon i wxruby2-preview gem In-Reply-To: References: Message-ID: <4562BB95.3040103@pressure.to> Hi Mattias Sorry for the delay in replying - have had trouble with internet access. I think the class you want was added between 0.0.36 and 0.0.37. We are looking to put out a 0.0.38 gem soon but need to confirm that it's stable on all platforms (if anyone can report on building from SVN for Windows it'd be esp welcome) In the meantime you can build from SVN (see notes on Wiki). What platform(s) are you using? alex Mattias Norlander wrote: > Hi! > > I would like to use the Wx::TaskBarIcon class, but it does not seem to > be present in my installation. > I'm using the latest "wxruby2-preview" gem. From browsing the mailing > lists it seems as if this class was added > quite recently, so I guess it is not yet included in the gem. > > So my questions are: > > When will this class be available in the gem package? > Until then, do I have any other options to get hold of this feature? > > Kind regards, > > Mattias > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Tue Nov 21 17:39:27 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 21 Nov 2006 22:39:27 +0000 Subject: [Wxruby-users] SWIG 1.3.31 Message-ID: <4563801F.2010009@pressure.to> Just a note for those who build from source/SVN - SWIG 1.3.31 is now out, and seems to work fine with current wxruby2. This should allow us to support Ruby 1.9. If anyone is keen to see this please let us know. Unfortunately at first glance the new release doesn't seem to include several important patches Roy submitted for SWIG bugs that wxruby2 development turned up. alex From roys at mindspring.com Thu Nov 23 01:49:42 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 23 Nov 2006 01:49:42 -0500 Subject: [Wxruby-users] to_s Message-ID: <45654486.90503@mindspring.com> I was toying around with adding a to_s function to wxPoint (and probably to some other classes). I'm wondering if this is a good idea or not and if so, is it best to use %extend or put it into something like wxSugar or the ruby parts of wx? My initial implementation is: %extend wxPoint { VALUE to_s() { char buffer[40]; sprintf(buffer, "%d,%d", self->x, self->y); return rb_str_new2(buffer); } } Thoughts? It might even be better to implement an inspect and use that instead (or in addition). Roy From alex at pressure.to Thu Nov 23 03:59:40 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 23 Nov 2006 08:59:40 +0000 Subject: [Wxruby-users] to_s In-Reply-To: <45654486.90503@mindspring.com> References: <45654486.90503@mindspring.com> Message-ID: <456562FC.3050706@pressure.to> Roy Sutton wrote: > I was toying around with adding a to_s function to wxPoint (and probably > to some other classes). I'm wondering if this is a good idea or not I like the idea. Objects should give an informative string representation where possible (Point, Size). > if so, is it best to use %extend or put it into something like wxSugar > or the ruby parts of wx? > Sounds like a core feature, not sugar. My preference would be to implement a to_s method in the ruby parts of wx (overriding ruby's Object.to_s). > Thoughts? It might even be better to implement an inspect and use that > instead I think the Ruby expectation is that to_s is called by inspect as a default strategy, so maybe just do to_s. PS - thanks for all the bugfixes. I had a good session running Weft QDA on wxruby2 on Linux, and just reporting bugs it turned up. If you don't mind I'm going to move your typemap for get_selections into ListBox.i as it's not used anywhere else. cheers alex From roys at mindspring.com Thu Nov 23 11:14:14 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 23 Nov 2006 11:14:14 -0500 Subject: [Wxruby-users] to_s In-Reply-To: <456562FC.3050706@pressure.to> References: <45654486.90503@mindspring.com> <456562FC.3050706@pressure.to> Message-ID: <4565C8D6.8030203@mindspring.com> Alex Fenton wrote: > PS - thanks for all the bugfixes. I had a good session running Weft QDA > on wxruby2 on Linux, and just reporting bugs it turned up. If you don't > mind I'm going to move your typemap for get_selections into ListBox.i as > it's not used anywhere else. > Sounds good to me. I noticed that, too. Roy From bdelacey at gmail.com Sat Nov 25 15:46:46 2006 From: bdelacey at gmail.com (Brian DeLacey) Date: Sat, 25 Nov 2006 15:46:46 -0500 Subject: [Wxruby-users] Great work on wxRuby2 Message-ID: <9d6af7700611251246x41ed94cdnb538330159671e45@mail.gmail.com> I'm impressed by the latest release of wxRuby2! Thanks to all the developers who worked on making this possible. It's great to have wxWidgets working with Ruby - and the new sample programs are a tremendous help. There is a 700+ page book on wxWidgets - Cross-Platform GUI Programming with wxWidgets(Bruce Perens' Open Source Series), by Julian Smart, Kevin Hock, Stefan Csomor. This book is freely available as a PDF file - at http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf. I also bought the printed book, which includes a CD containing the book's sources/samples etc. Although the book concentrates on the wxWidgets C++ API, I've found it to be an excellent reference for thinking about this with Ruby in mind. Hoping this reference might prove helpful to others who are working with wxRuby2, - Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20061125/b79c12ce/attachment.html From alex at pressure.to Sun Nov 26 05:02:21 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 26 Nov 2006 10:02:21 +0000 Subject: [Wxruby-users] Great work on wxRuby2 In-Reply-To: <9d6af7700611251246x41ed94cdnb538330159671e45@mail.gmail.com> References: <9d6af7700611251246x41ed94cdnb538330159671e45@mail.gmail.com> Message-ID: <4569662D.4070401@pressure.to> Hi Brian DeLacey wrote: > I'm impressed by the latest release of wxRuby2! Thanks for the encouragement; we appreciate positive feedback as well as bug reports... happy to say that there's already lots more good stuff in the pipeline in subversion for the next release. > There is a 700+ page book on wxWidgets - Cross-Platform GUI > Programming with wxWidgets > > (Bruce Perens' Open Source Series), by Julian Smart, Kevin Hock, > Stefan Csomor. Certainly a useful reference on how the API works. We're trying to expand the wxRuby documentation so it includes more explanation as well as a being class reference. The docs are written in lightweight Textile markup, so it's easy to add to - contributions with the kind of detailed info found in the C++ book are welcome. cheers alex From alex at alexspeller.com Wed Nov 29 18:39:15 2006 From: alex at alexspeller.com (Alex Speller) Date: Wed, 29 Nov 2006 23:39:15 +0000 Subject: [Wxruby-users] wxSugar control problem Message-ID: <91D1B8A2-C03E-49C4-948B-6A5A1E286003@alexspeller.com> I'm using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am coming up with an error when trying to create a SpinCtrl (and quite a few others have exactly the same prob.): #file date_picker.rb class DatePicker < Wx::Dialog def initialize super(nil, :title => "Pick a date...") @cal = Wx::CalendarCtrl.new(self) add(@cal) #works fine up to this point, will make a lovely calendar in the window if I comment the next 2 lines out... @month = Wx::SpinCtrl.new(self) # line 9 - doesn't like this! add(@month) end end gives error: ArgumentError: Error initializing # Sent paramters: [#, -1, #, #, 4, -1, #, #, 4096, 0, 100, 0] correct parameters are: id (Fixnum) pos (Wxruby2::Point) size (Wxruby2::Size) style (Fixnum) id (Fixnum) pos (Wxruby2::Point) size (Wxruby2::Size) style (Fixnum) min (Fixnum) max (Fixnum) initial (Fixnum) method initialize in keyword_constructors.rb at line 238 method initialize in date_picker.rb at line 9 method initialize in main_window.rb at line 9 method listen in event_connector.rb at line 125 at top level in - at line 16 Ruby version: ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0] The SpinCtrl is working fine in the Big Demo, and other types of controls can be added in this particular dialog fine. I have tried hacking around in keyword_constructors.rb - my idea was to handle the above error, and instead of raising it the first time, I tried to catch it and then initialize the object just using the parameters passed in - so that you could just revert to the normal wxruby (i.e. c-style) params if there are any problems with wxsugar. Unfortunately this didn't work and lead to some strange recursion stuff that hurt my head. Anyone got any ideas as to what might be going wrong? Thanks, Alex Speller From alex at pressure.to Wed Nov 29 19:17:54 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 30 Nov 2006 00:17:54 +0000 Subject: [Wxruby-users] wxSugar control problem In-Reply-To: <91D1B8A2-C03E-49C4-948B-6A5A1E286003@alexspeller.com> References: <91D1B8A2-C03E-49C4-948B-6A5A1E286003@alexspeller.com> Message-ID: <456E2332.2030302@pressure.to> Hi Alex Alex Speller wrote: > I'm using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am > coming up with an error when trying to create a SpinCtrl Thanks for the report, sorry for the bug. It's down to a wrong definition of the constructor parameters in wx_sugar. I've checked in the correction, but if you want to patch yourself the error is in wx_sugar/lib/keyword_classes.rb Around line 321 there are two definitions of SpinCtrl's constructor; this is a mistake itself, and worse, neither is quite right. Delete them both and replace with: # wxSpinCtrl A spin control - i.e. spin button and text control WxSugar.define_keyword_ctors('SpinCtrl') do wx_ctor_params :value => '' wx_ctor_params :pos, :size, :style => Wx::SP_ARROW_KEYS wx_ctor_params :min => 0 wx_ctor_params :max => 100 wx_ctor_params :initial => 0 wx_ctor_params :name => 'spinCtrl' end > (and quite a > few others have exactly the same prob.): > Oops, please let me know. I had to manually copy these so it's not unlikely I've made some mistakes or omissions. If you get weird 'correct parameters' - eg with two Size arguments, or ArgumentErrors about 'arg 2 of type XXX' please check against the docs, have a look in keyword_classes and report. The docs should be correct as they were translated automatically from the C++ onees. Thanks again Alex > From alex at alexspeller.com Wed Nov 29 20:19:24 2006 From: alex at alexspeller.com (Alex Speller) Date: Thu, 30 Nov 2006 01:19:24 +0000 Subject: [Wxruby-users] wxSugar control problem In-Reply-To: <456E2332.2030302@pressure.to> References: <91D1B8A2-C03E-49C4-948B-6A5A1E286003@alexspeller.com> <456E2332.2030302@pressure.to> Message-ID: Hi Alex, > Oops, please let me know. I had to manually copy these so it's not > unlikely I've made some mistakes or omissions. If you get weird > 'correct > parameters' - eg with two Size arguments, or ArgumentErrors about > 'arg 2 > of type XXX' please check agai Firstly, thank you for your amazingly swift reply. I'm slightly pleased that it wasn't just me doing something really stupid ;) I've gone through most of the controls on the docs index page, and have come up with these changes: line (371 on mine, but then I've fiddled a bit...) change: WxSugar.define_keyword_ctors('RadioBox') do to WxSugar.define_keyword_ctors('RadioButton') do and then both radio boxes and radio buttons will work ;) This helps with SpinButtons: (Missing AFAIK) WxSugar.define_keyword_ctors('SpinButton') do wx_ctor_params :pos, :size, :style => Wx::SP_VERTICAL wx_ctor_params :name => 'spinButton' end Change the Slider to this.... WxSugar.define_keyword_ctors('Slider') do wx_ctor_params :value => 0 wx_ctor_params :min_value, :max_value wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL # wx_ctor_params :validator, :name => 'radioButton' end ... and all of the controls are now working (N.B. I haven't tested the BitmapButton and the StaticBitmap because I'm not in the mood to figure out bitmaps in wx right now ;) Please note that I'm far from a ruby expert and so I have no idea if I'm doing the right thing above. All I can say is that the mods seem to work for me! Would quite like to get involved more in the project - perhaps more on the documentation side than the voodoo coding side - when I have some more free time after Christmas. I've been meaning to write some kind of wxSugar intro / tutorial, simply because it seems so much easier to pick up if you're used to ruby syntax. WxRuby in general is very promising, especially with the nice syntax, and once everything is a little smoother it will be miles ahead of the other toolkits I've looked at. Good work guys ;) Alex From alex at alexspeller.com Wed Nov 29 20:35:04 2006 From: alex at alexspeller.com (Alex Speller) Date: Thu, 30 Nov 2006 01:35:04 +0000 Subject: [Wxruby-users] wxSugar control problem In-Reply-To: References: <91D1B8A2-C03E-49C4-948B-6A5A1E286003@alexspeller.com> <456E2332.2030302@pressure.to> Message-ID: also added: # Window WxSugar.define_keyword_ctors('Window') do wx_ctor_params :pos, :size, :style wx_ctor_params :name => 'window' end Is this not there for a reason (i.e. just creating windows on their own is a "bad thing")? I've just been using them as an area to draw on. Regards, Alex On 30 Nov 2006, at 1:19 am, Alex Speller wrote: > Hi Alex, > >> Oops, please let me know. I had to manually copy these so it's not >> unlikely I've made some mistakes or omissions. If you get weird >> 'correct >> parameters' - eg with two Size arguments, or ArgumentErrors about >> 'arg 2 >> of type XXX' please check agai > > > Firstly, thank you for your amazingly swift reply. I'm slightly > pleased that it wasn't just me doing something really stupid ;) > > I've gone through most of the controls on the docs index page, and > have come up with these changes: > > line (371 on mine, but then I've fiddled a bit...) > change: > WxSugar.define_keyword_ctors('RadioBox') do > > to > WxSugar.define_keyword_ctors('RadioButton') do > > and then both radio boxes and radio buttons will work ;) > > This helps with SpinButtons: (Missing AFAIK) > > WxSugar.define_keyword_ctors('SpinButton') do > wx_ctor_params :pos, :size, :style => Wx::SP_VERTICAL > wx_ctor_params :name => 'spinButton' > end > > > Change the Slider to this.... > > WxSugar.define_keyword_ctors('Slider') do > wx_ctor_params :value => 0 > wx_ctor_params :min_value, :max_value > wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL > # wx_ctor_params :validator, :name => 'radioButton' > end > > ... and all of the controls are now working (N.B. I haven't tested > the BitmapButton and the StaticBitmap because I'm not in the mood to > figure out bitmaps in wx right now ;) > > > Please note that I'm far from a ruby expert and so I have no idea if > I'm doing the right thing above. All I can say is that the mods seem > to work for me! > > Would quite like to get involved more in the project - perhaps more > on the documentation side than the voodoo coding side - when I have > some more free time after Christmas. I've been meaning to write some > kind of wxSugar intro / tutorial, simply because it seems so much > easier to pick up if you're used to ruby syntax. > > WxRuby in general is very promising, especially with the nice syntax, > and once everything is a little smoother it will be miles ahead of > the other toolkits I've looked at. Good work guys ;) > > Alex > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From mattias.norlander at gmail.com Thu Nov 30 04:12:02 2006 From: mattias.norlander at gmail.com (Mattias Norlander) Date: Thu, 30 Nov 2006 10:12:02 +0100 Subject: [Wxruby-users] TaskBarIcon i wxruby2-preview gem (Alex Fenton) Message-ID: I'm using windows, if I find the time I'll try to build it myself. Otherwise I'll just wait for the next gem. Thanks for a great job on wxruby2 btw! Regards, Mattias > > > > Date: Tue, 21 Nov 2006 08:40:53 +0000 > From: Alex Fenton > Subject: Re: [Wxruby-users] TaskBarIcon i wxruby2-preview gem > To: General discussion of wxRuby > Message-ID: <4562BB95.3040103 at pressure.to> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Mattias > > Sorry for the delay in replying - have had trouble with internet access. > > I think the class you want was added between 0.0.36 and 0.0.37. > > We are looking to put out a 0.0.38 gem soon but need to confirm that > it's stable on all platforms (if anyone can report on building from SVN > for Windows it'd be esp welcome) > > In the meantime you can build from SVN (see notes on Wiki). What > platform(s) are you using? > > alex > > Mattias Norlander wrote: > > Hi! > > > > I would like to use the Wx::TaskBarIcon class, but it does not seem to > > be present in my installation. > > I'm using the latest "wxruby2-preview" gem. From browsing the mailing > > lists it seems as if this class was added > > quite recently, so I guess it is not yet included in the gem. > > > > So my questions are: > > > > When will this class be available in the gem package? > > Until then, do I have any other options to get hold of this feature? > > > > Kind regards, > > > > Mattias > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20061130/463ea6d8/attachment.html From alex at alexspeller.com Mon Nov 27 22:21:47 2006 From: alex at alexspeller.com (Alex Speller) Date: Tue, 28 Nov 2006 03:21:47 +0000 Subject: [Wxruby-users] (no subject) Message-ID: <44755A88-0D6A-4052-9902-42EE2CFC6442@alexspeller.com> I'm using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am coming up with a strange error when trying to create a SpinCtrl: class DatePicker < Wx::Dialog def initialize super(nil, :title => "Pick a date...") arrange_vertically(:padding => 5) @month = Wx::SpinCtrl.new(self) # line 19 add(@month) end end gives error: ArgumentError: Error initializing # Sent paramters: [#, -1, #, #, 4, -1, #, #, 4096, 0, 100, 0] correct parameters are: id (Fixnum) pos (Wxruby2::Point) size (Wxruby2::Size) style (Fixnum) id (Fixnum) pos (Wxruby2::Point) size (Wxruby2::Size) style (Fixnum) min (Fixnum) max (Fixnum) initial (Fixnum) method initialize in keyword_constructors.rb at line 246 method initialize in date_picker.rb at line 19 method initialize in main_window.rb at line 9 method listen in event_connector.rb at line 125 at top level in - at line 16 Ruby version: ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0] The SpinCtrl is working fine in the e.g. Big Demo, and other types of controls can be added in this particular dialog fine. Anyone got any ideas as to what might be going wrong? Thanks, Alex Speller