From roys at mindspring.com Fri Sep 1 00:51:39 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 01 Sep 2006 00:51:39 -0400 Subject: [Wxruby-users] Help with URL drop In-Reply-To: <5582C2250AE6184B9723289FDFD92C38285B@mail.johnpur.com> References: <5582C2250AE6184B9723289FDFD92C38285B@mail.johnpur.com> Message-ID: <44F7BC5B.9030908@mindspring.com> John, Is this with wxRuby2? Can you send us some sample code to look at? A brief look at the docs indicates you'll need to derive your own DropTarget descendant. We're all pretty caught up in getting the alpha release out so if you can save us all some time with some sample code it would help. Roy John Purrier (JunqBox) wrote: > > Hello, I am trying to implement a drag from the browser address bar > (favicon) and drop onto a wxRuby app. I cannot for the life of me > figure out how to set the drop target to accept the URL data type? Any > help or pointers appreciated? I implemented file drop with no issues > but the url thing has me stumped. > > //John Purrier// > > //email:// john at junqbox.com > > //web: //www.junqbox.com > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From wxruby at qualitycode.com Fri Sep 1 01:40:23 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Fri, 01 Sep 2006 01:40:23 -0400 Subject: [Wxruby-users] include.zip (and classes.zip) In-Reply-To: <44F74707.5020806@mindspring.com> References: <44F4FDF6.309@mindspring.com> <1156992291.9073.68.camel@localhost.localdomain> <44F6EE77.3060709@mindspring.com> <44F741C9.5030005@qualitycode.com> <44F74707.5020806@mindspring.com> Message-ID: <44F7C7C7.2050800@qualitycode.com> Roy Sutton wrote: > Kevin Smith wrote: >> The problem is that if a function really is virtual in wx, but we claim >> that it is not, we can also get into problems. Possibly even crashes, >> although I'm not certain. Ok. I thought this through, and I think I agree with you. The dangerous case I was thinking of is more complicated and less common. > Does it rub me the wrong way that these functions are misdeclared? Yes, > it does. Here's a proposal, then: Instead of removing the virtual keyword, let's replace it with a SHOULD_BE_VIRTUAL placeholder which can be #define'd to nothing. As we fix each one, we can restore the correct virtual keyword. > AFAIK > there is no need to declare a method virtual more than once in its > parent's hierarchy. SWIG will generate a wrapper at each level for any > virtual function. It only has to be declared virtual once. The problems I encountered mostly had to do with "missing" layers, where we were wrapping the top-level class and the bottom-level, but not the one in the middle. Now that I understand the issues, I can go back through your patches and deal with them, if you want. It would save me some time to get new versions from you, but if you are short of time I can do it this weekend. Thanks, Kevin From alex at pressure.to Fri Sep 1 04:25:28 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 01 Sep 2006 09:25:28 +0100 Subject: [Wxruby-users] Help with URL drop In-Reply-To: <5582C2250AE6184B9723289FDFD92C38285B@mail.johnpur.com> References: <5582C2250AE6184B9723289FDFD92C38285B@mail.johnpur.com> Message-ID: <44F7EE78.6070005@pressure.to> Hi John John Purrier (JunqBox) wrote: > > I cannot for the life of me figure out how to set the drop target to > accept the URL data type? Any help or pointers appreciated? I > implemented file drop with no issues but the url thing has me stumped. > There is an example in the WxWidgets book of creating a custom drop target that accepts URLs. The book is available as a free download, and the reference is on pp299-300 http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf The code is in C++ but I hope it might give you some ideas of how to proceed. Basically you create a DropTarget that accepts an URLDataObject (you may have to create such a class yourself - it appears to be new in WxWidgets 2.7.0). I assume that you're using wxruby 0.6.0 since drag'n'drop and clipboard isn't yet in wxruby2. Still, as Roy says, it'd be great if you could forward a simple example to help us add these features to the development version. I've been chipping away at adding these features sporadically for a month or two but some way from being ready. If anyone is interested at having a shot I can forward my progress to date. It'd be good stuff to include, and needed for wxruby2's completeness relative to 0.6.0 cheers alex From john at junqbox.com Fri Sep 1 14:13:47 2006 From: john at junqbox.com (John Purrier (JunqBox)) Date: Fri, 1 Sep 2006 11:13:47 -0700 Subject: [Wxruby-users] Help with URL drop Message-ID: <5582C2250AE6184B9723289FDFD92C38285C@mail.johnpur.com> Thanks, this is just the info I was looking for. I am using 0.6.0 and was hoping that someone had already implemented the URLDataObject class. The example referenced below from the WxWidgets book is the model I am trying to implement :-). If anyone has code showing a custom drop target class I would appreciate it. When I get the URL stuff working I'll let you guys know and post the code. John >Hi John > >John Purrier (JunqBox) wrote: >> >> I cannot for the life of me figure out how to set the drop target to >> accept the URL data type? Any help or pointers appreciated... I >> implemented file drop with no issues but the url thing has me stumped. >> >There is an example in the WxWidgets book of creating a custom drop >target that accepts URLs. The book is available as a free download, and >the reference is on pp299-300 > >http://www.phptr.com/content/images/0131473816/downloads/0131473816_boo k.pdf > >The code is in C++ but I hope it might give you some ideas of how to >proceed. Basically you create a DropTarget that accepts an URLDataObject >(you may have to create such a class yourself - it appears to be new in >WxWidgets 2.7.0). > >I assume that you're using wxruby 0.6.0 since drag'n'drop and clipboard >isn't yet in wxruby2. Still, as Roy says, it'd be great if you could >forward a simple example to help us add these features to the >development version. > >I've been chipping away at adding these features sporadically for a >month or two but some way from being ready. If anyone is interested at >having a shot I can forward my progress to date. It'd be good stuff to >include, and needed for wxruby2's completeness relative to 0.6.0 > >cheers >alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20060901/ad041fad/attachment.html From alex at pressure.to Fri Sep 1 14:37:37 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 01 Sep 2006 19:37:37 +0100 Subject: [Wxruby-users] Help with URL drop In-Reply-To: <5582C2250AE6184B9723289FDFD92C38285C@mail.johnpur.com> References: <5582C2250AE6184B9723289FDFD92C38285C@mail.johnpur.com> Message-ID: <44F87DF1.9080605@pressure.to> John Purrier (JunqBox) wrote: > Thanks, this is just the info I was looking for. I am using 0.6.0 > and was hoping that someone had already implemented the URLDataObject > class. I had a look at the wxWidgets source and also the wxPython URLDataObject implementation. It looks like UDO is just a TextDataObject, with the method GetURL an alias for GetText. TDO is supported in 0.6.0 - so you may be able to get to where you want by getting a TDO from the DropTarget and extracting the URL from it. Or this may not work at all - either way it would be interesting to know. Sorry I can't be more help trying stuff out right now - but this is up on my priorities for wxruby2 development. cheers a From roys at mindspring.com Fri Sep 1 20:15:26 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 01 Sep 2006 20:15:26 -0400 Subject: [Wxruby-users] One step forward, one step back Message-ID: <44F8CD1E.30705@mindspring.com> Doing some comparison to older builds of wxRuby2 I see that some things work better now and some worse. I wish I could pin down exactly where things went wrong in one case. I will try doing some comparison to recent changes to see if I can find a solution to those problems. I'd really like to get this alpha release done ASAP. Roy From alex at pressure.to Sat Sep 2 06:33:04 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 02 Sep 2006 11:33:04 +0100 Subject: [Wxruby-users] One step forward, one step back In-Reply-To: <44F8CD1E.30705@mindspring.com> References: <44F8CD1E.30705@mindspring.com> Message-ID: <44F95DE0.5070505@pressure.to> Roy Sutton wrote: > Doing some comparison to older builds of wxRuby2 I see that some things > work better now and some worse. I hear you... > I wish I could pin down exactly where > things went wrong in one case. With rubygems we can each have different versions installed in parallel and require specific versions to isolate when something broke. > I will try doing some comparison to > recent changes to see if I can find a solution to those problems. I'd > really like to get this alpha release done ASAP. > If no-one objects, I'm gonna update the version strings in lib/wx.rb and rakepackage, tag what we have as 0.0.35 and look to upload gems to rubyforge. No fanfare at this point. It would be useful if you know of major problems with the samples if you could post them here so they can go in README for this release. cheers alex From roys at mindspring.com Sat Sep 2 16:15:16 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 02 Sep 2006 16:15:16 -0400 Subject: [Wxruby-users] OK, I was wrong... Message-ID: <44F9E654.1050109@mindspring.com> You -do- have to still declare something virtual in the derived class for SWIG to wrap it properly. Let's not apply any of my patches yet until I rework them. Roy From roys at mindspring.com Sat Sep 2 18:57:43 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 02 Sep 2006 18:57:43 -0400 Subject: [Wxruby-users] OK, I was wrong... In-Reply-To: <44F9E654.1050109@mindspring.com> References: <44F9E654.1050109@mindspring.com> Message-ID: <44FA0C67.4060903@mindspring.com> The example is GetDefaultAttributes for wxTextCtrl under Windows. This somehow was wrapped properly before. Now, we get grey backgrounds for the TextCtrl's. GetDefaultAttributes wasn't exposed in wxWindow.h before. It seems several new ones were added to wxWindow.h that are now causing some headaches. I'll see what can be done about that. Roy Roy Sutton wrote: > You -do- have to still declare something virtual in the derived class > for SWIG to wrap it properly. Let's not apply any of my patches yet > until I rework them. > > Roy > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Sun Sep 3 00:07:44 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 00:07:44 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus Message-ID: <44FA5510.1030904@mindspring.com> These files add the virtual function AcceptFocus that was missing from wxWindow.h. In order to make things right I had to make sure it was also declared in all the places where wxWindows also changes it. Also, in wxTextCtrl on Windows GetDefaultAttributes needs to be redeclared. I haven't downloaded the Unix and Mac headers for 2.6.3 so I couldn't see if it also applies to other installs. You should check. In a couple places AcceptFocus is #ifdef'ed to only affect Windows, for the same reason. I don't -think- there's any harm in redeclaring it even if it's not redeclared but I didn't want to chance it. I'm trying to keep these patches more bite-sized and focused on a specific problem area. If we can get this applied I can work on the next set. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxGauge.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0001.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxRadioBox.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0002.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSpinButton.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSpinCtrl.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticBitmap.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticBox.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0003.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticLine.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticText.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0005.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStatusBar.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0006.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxTextCtrl.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0007.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxToolBar.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b1fd503f/attachment-0008.pl From roys at mindspring.com Sun Sep 3 02:32:35 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 02:32:35 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FA5510.1030904@mindspring.com> References: <44FA5510.1030904@mindspring.com> Message-ID: <44FA7703.5060404@mindspring.com> Well, I see the patch files are all hosed up. I'll redo them and resubmit. Roy Sutton wrote: > These files add the virtual function AcceptFocus that was missing from > wxWindow.h. In order to make things right I had to make sure it was > also declared in all the places where wxWindows also changes it. > Also, in wxTextCtrl on Windows GetDefaultAttributes needs to be > redeclared. I haven't downloaded the Unix and Mac headers for 2.6.3 > so I couldn't see if it also applies to other installs. You should > check. In a couple places AcceptFocus is #ifdef'ed to only affect > Windows, for the same reason. I don't -think- there's any harm in > redeclaring it even if it's not redeclared but I didn't want to chance > it. I'm trying to keep these patches more bite-sized and focused on a > specific problem area. If we can get this applied I can work on the > next set. > > Roy > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxWindow.h > Index: wxruby2/swig/classes/include/wxWindow.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxWindow.h,v > retrieving revision 1.13 > diff -b -u -r1.13 wxWindow.h > --- wxruby2/swig/classes/include/wxWindow.h 26 Aug 2006 03:58:57 -0000 1.13 > +++ wxruby2/swig/classes/include/wxWindow.h 3 Sep 2006 04:01:53 -0000 > @@ -38,6 +38,8 @@ > * \param wxWindow* > */ > > + virtual bool AcceptsFocus() const; > + > virtual void AddChild(wxWindow* child ) ; > /** > * \brief Directs all mouse input to this window. Call to > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxGauge.h > Index: wxruby2/swig/classes/include/wxGauge.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxGauge.h,v > retrieving revision 1.3 > diff -b -u -r1.3 wxGauge.h > --- wxruby2/swig/classes/include/wxGauge.h 31 Jan 2005 04:18:52 -0000 1.3 > +++ wxruby2/swig/classes/include/wxGauge.h 3 Sep 2006 01:47:38 -0000 > @@ -89,6 +89,7 @@ > */ > > void SetValue(int pos ) ; > + virtual bool AcceptsFocus() const { return false; } > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxRadioBox.h > Index: wxruby2/swig/classes/include/wxRadioBox.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxRadioBox.h,v > retrieving revision 1.5 > diff -b -u -r1.5 wxRadioBox.h > --- wxruby2/swig/classes/include/wxRadioBox.h 21 Apr 2006 01:56:04 -0000 1.5 > +++ wxruby2/swig/classes/include/wxRadioBox.h 3 Sep 2006 01:57:02 -0000 > @@ -30,6 +30,9 @@ > virtual bool Show(bool show = true); > virtual bool Show(int item, bool show = true); > virtual wxString GetString(int n ) const; > +#if defined(__WXMSW__) > + virtual bool AcceptsFocus() const { return true; } > +#endif > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxSpinButton.h > Index: wxruby2/swig/classes/include/wxSpinButton.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxSpinButton.h,v > retrieving revision 1.3 > diff -b -u -r1.3 wxSpinButton.h > --- wxruby2/swig/classes/include/wxSpinButton.h 31 Jan 2005 04:18:52 -0000 1.3 > +++ wxruby2/swig/classes/include/wxSpinButton.h 3 Sep 2006 01:57:44 -0000 > @@ -69,6 +69,9 @@ > */ > > void SetValue(int value ) ; > +#if defined(__WXMSW__) > + virtual bool AcceptsFocus() const { return false; } > +#endif > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxSpinCtrl.h > Index: wxruby2/swig/classes/include/wxSpinCtrl.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxSpinCtrl.h,v > retrieving revision 1.3 > diff -b -u -r1.3 wxSpinCtrl.h > --- wxruby2/swig/classes/include/wxSpinCtrl.h 31 Jan 2005 04:18:52 -0000 1.3 > +++ wxruby2/swig/classes/include/wxSpinCtrl.h 3 Sep 2006 01:57:57 -0000 > @@ -91,6 +91,9 @@ > */ > > int GetMax() const; > +#if defined(__WXMSW__) > + virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); } > +#endif > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxStaticBitmap.h > Index: wxruby2/swig/classes/include/wxStaticBitmap.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxStaticBitmap.h,v > retrieving revision 1.4 > diff -b -u -r1.4 wxStaticBitmap.h > --- wxruby2/swig/classes/include/wxStaticBitmap.h 31 Jan 2005 04:18:52 -0000 1.4 > +++ wxruby2/swig/classes/include/wxStaticBitmap.h 3 Sep 2006 01:48:02 -0000 > @@ -48,6 +48,8 @@ > */ > > virtual void SetBitmap(const wxBitmap& label ) ; > + virtual bool AcceptsFocus() const { return false; } > + virtual bool HasTransparentBackground() { return true; } > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxStaticBox.h > Index: wxruby2/swig/classes/include/wxStaticBox.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxStaticBox.h,v > retrieving revision 1.3 > diff -b -u -r1.3 wxStaticBox.h > --- wxruby2/swig/classes/include/wxStaticBox.h 31 Jan 2005 04:18:52 -0000 1.3 > +++ wxruby2/swig/classes/include/wxStaticBox.h 3 Sep 2006 01:41:12 -0000 > @@ -43,6 +43,8 @@ > */ > > bool Create(wxWindow* parent , wxWindowID id , const wxString& label , const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxT("staticBox")) ; > + virtual bool AcceptsFocus() const { return false; } > + virtual bool HasTransparentBackground() { return true; } > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxStaticLine.h > Index: wxruby2/swig/classes/include/wxStaticLine.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxStaticLine.h,v > retrieving revision 1.4 > diff -b -u -r1.4 wxStaticLine.h > --- wxruby2/swig/classes/include/wxStaticLine.h 3 Sep 2005 20:07:43 -0000 1.4 > +++ wxruby2/swig/classes/include/wxStaticLine.h 3 Sep 2006 01:39:51 -0000 > @@ -48,6 +48,7 @@ > */ > > int GetDefaultSize() ; > + virtual bool AcceptsFocus() const { return false; } > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxStaticText.h > Index: wxruby2/swig/classes/include/wxStaticText.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxStaticText.h,v > retrieving revision 1.4 > diff -b -u -r1.4 wxStaticText.h > --- wxruby2/swig/classes/include/wxStaticText.h 21 Apr 2006 01:56:04 -0000 1.4 > +++ wxruby2/swig/classes/include/wxStaticText.h 3 Sep 2006 01:37:46 -0000 > @@ -49,6 +49,10 @@ > virtual void SetLabel(const wxString& label ) ; > // the following were missing from the xml > virtual ~wxStaticText(); > + > + virtual bool AcceptsFocus() const { return false; } > + virtual bool HasTransparentBackground() { return true; } > + > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxStatusBar.h > Index: wxruby2/swig/classes/include/wxStatusBar.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxStatusBar.h,v > retrieving revision 1.4 > diff -b -u -r1.4 wxStatusBar.h > --- wxruby2/swig/classes/include/wxStatusBar.h 20 Jul 2005 00:56:02 -0000 1.4 > +++ wxruby2/swig/classes/include/wxStatusBar.h 3 Sep 2006 01:41:33 -0000 > @@ -109,6 +109,7 @@ > */ > > virtual void SetStatusWidths(int n , int * widths ) ; > + virtual bool AcceptsFocus() const { return false; } > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxTextCtrl.h > Index: wxruby2/swig/classes/include/wxTextCtrl.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxTextCtrl.h,v > retrieving revision 1.9 > diff -b -u -r1.9 wxTextCtrl.h > --- wxruby2/swig/classes/include/wxTextCtrl.h 25 Aug 2006 04:22:34 -0000 1.9 > +++ wxruby2/swig/classes/include/wxTextCtrl.h 3 Sep 2006 03:58:39 -0000 > @@ -169,6 +169,13 @@ > virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); > > virtual bool ShouldInheritColours() const; > + > +#if defined(__WXMSW__) > + protected: > + virtual wxVisualAttributes GetDefaultAttributes() const; > + virtual bool AcceptsFocus() const; > +#endif > + > }; > > > > ------------------------------------------------------------------------ > > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby login > Logging in to :pserver:anonymous at rubyforge.org:2401:/var/cvs/wxruby > > C:\RubyDev>cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby diff -b -u wxruby2/swig/classes/include/wxToolBar.h > Index: wxruby2/swig/classes/include/wxToolBar.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxToolBar.h,v > retrieving revision 1.4 > diff -b -u -r1.4 wxToolBar.h > --- wxruby2/swig/classes/include/wxToolBar.h 31 Jan 2005 04:18:52 -0000 1.4 > +++ wxruby2/swig/classes/include/wxToolBar.h 3 Sep 2006 01:43:14 -0000 > @@ -367,6 +367,8 @@ > void ToggleTool(int toolId , const bool toggle ) ; > // the following were missing from the xml > void SetRows(int rows); > + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE) ; > + virtual bool AcceptsFocus() const { return false; } > }; > > > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Sun Sep 3 02:35:55 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 02:35:55 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FA5510.1030904@mindspring.com> References: <44FA5510.1030904@mindspring.com> Message-ID: <44FA77CB.6010209@mindspring.com> Try these instead. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0012.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxGauge.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0013.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxRadioBox.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0014.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSpinButton.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0015.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSpinCtrl.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0016.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticBitmap.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0017.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticBox.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0018.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticLine.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0019.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticText.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0020.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStatusBar.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0021.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxTextCtrl.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0022.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxToolBar.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/b00efc25/attachment-0023.pl From roys at mindspring.com Sun Sep 3 02:45:27 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 02:45:27 -0400 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h Message-ID: <44FA7A07.8040604@mindspring.com> This patch file will allow the MDI example to run. We'll need to revisit it later. There's still a crash but it's the same crash as from the scrolled window example. I'll send a patch later that fixes the problem with DrawLines. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxMDIParentFrame.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/7d1de245/attachment.pl From roys at mindspring.com Sun Sep 3 12:49:55 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 12:49:55 -0400 Subject: [Wxruby-users] Patch for DrawLines Message-ID: <44FB07B3.6070006@mindspring.com> These enable DrawLines and DrawPolygons. I disable the wxList one since the WX docs indicate that the list is now 'type-safe' requiring a derived class to send a wxList of Points. Since we're unlikely to do this I just blocked it off so it doesn't interfere with internal functions that may call that one. Note: MemoryDC doesn't inherit from DC.h. Not sure if we should try fixing it or even if we have an example that uses it. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: WindowDC.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/42d7f554/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DC.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/42d7f554/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: PaintDC.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/42d7f554/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ScreenDC.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/42d7f554/attachment-0003.pl From alex at pressure.to Sun Sep 3 13:10:57 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 03 Sep 2006 18:10:57 +0100 Subject: [Wxruby-users] 0.0.35 [was: One step forward, one step back} In-Reply-To: <44F8CD1E.30705@mindspring.com> References: <44F8CD1E.30705@mindspring.com> Message-ID: <44FB0CA1.3090608@pressure.to> Roy Sutton wrote: > I'd really like to get this alpha release done ASAP. > I've tagged 0.0.35 in the repository and am just now watching it recompile to an OS X gem which I'll upload to rubyforge. I'd be pleased to upload other platform gems - send me a note with a download link. To build from clean sources, I just did something like: cvs -d :pserver:anonymous at rubyforge.org:/var/cvs/wxruby export -r v0_0_35 -d wxruby2_0_0_35 wxruby2 cd wxruby2_0_0_35 rake gem RELEASE=1 # or rake gem In the future I guess we should do our gems using release builds at wx but I think not so important right now. On OS X, doing 'strip -x lib/wxruby2.bundle' reduces the size of the binary with no apparent ill-effects, but I'll see if there are any problems with others installing it via gems before committing. cheers alex From alex at pressure.to Sun Sep 3 13:36:42 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 03 Sep 2006 18:36:42 +0100 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h In-Reply-To: <44FA7A07.8040604@mindspring.com> References: <44FA7A07.8040604@mindspring.com> Message-ID: <44FB12AA.8090302@pressure.to> Roy Sutton wrote: > This patch file will allow the MDI example to run. Applied, thank you. > We'll need to revisit it later. The mdi sample now doesn't crash on OS X either, and displays a frame, but can't create child windows. > There's still a crash but it's the same crash as from the scrolled > window example. What action provokes the crash? a From alex at pressure.to Sun Sep 3 14:34:48 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 03 Sep 2006 19:34:48 +0100 Subject: [Wxruby-users] Patch for DrawLines In-Reply-To: <44FB07B3.6070006@mindspring.com> References: <44FB07B3.6070006@mindspring.com> Message-ID: <44FB2048.30002@pressure.to> Roy Sutton wrote: > These enable DrawLines and DrawPolygons. Committed, thanks > Note: MemoryDC doesn't inherit from DC.h. Not sure if we should try > fixing it or even if we have an example that uses it. It's used in the controls.rb sample, on the bitmap tab, to draw a green circle round the button bitmap. cheers alex From alex at pressure.to Sun Sep 3 14:43:00 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 03 Sep 2006 19:43:00 +0100 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FA77CB.6010209@mindspring.com> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> Message-ID: <44FB2234.10901@pressure.to> Roy Sutton wrote: > Try these instead. Thank you. Just trying them out now. Are these to fix a problem by which static items (eg StaticLine) are incorrectly receiving focus? Is there a sample which demonstrates the before-and-after? alex From alex at pressure.to Sun Sep 3 15:00:25 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 03 Sep 2006 20:00:25 +0100 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FA77CB.6010209@mindspring.com> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> Message-ID: <44FB2649.6020300@pressure.to> All seems to work fine, except I am getting an error compiling StaticText.cpp /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h: In function `VALUE _wrap_wxStaticText_AcceptsFocus(int, VALUE*, long unsigned int)': /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h:48: error: `virtual bool wxStaticText::AcceptsFocus() const' is protected src/StaticText.cpp:3947: error: within this context relevant line: result = (bool)((wxStaticText const *)arg1)->AcceptsFocus(); how the method is declared in the carbon headers: protected : virtual wxSize DoGetBestSize() const ; virtual bool AcceptsFocus() const { return FALSE; } Have not committed anything yet alex From roys at mindspring.com Sun Sep 3 16:10:23 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:10:23 -0400 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h In-Reply-To: <44FB12AA.8090302@pressure.to> References: <44FA7A07.8040604@mindspring.com> <44FB12AA.8090302@pressure.to> Message-ID: <44FB36AF.4050501@mindspring.com> Alex Fenton wrote: > The mdi sample now doesn't crash on OS X either, and displays a frame, > but can't create child windows. > >> There's still a crash but it's the same crash as from the scrolled >> window example. >> > What action provokes the crash? > > > No action at all. It appears to crash pretty much right after it draws the scrolled window. I haven't tracked it down but I'll bet it's a virtual/not virtual problem. From roys at mindspring.com Sun Sep 3 16:12:44 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:12:44 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FB2649.6020300@pressure.to> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> <44FB2649.6020300@pressure.to> Message-ID: <44FB373C.7070009@mindspring.com> You'll need to put an #ifdef in there to make them protected for Mac. The simplest solution may be to just not add AcceptFocus to wxWindow.h. My fear is it will rear its ugly head again when someone adds it. I'll go with whatever you want on this. Roy Alex Fenton wrote: > All seems to work fine, except I am getting an error compiling > StaticText.cpp > > /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h: In function `VALUE > _wrap_wxStaticText_AcceptsFocus(int, VALUE*, long unsigned int)': > /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h:48: error: `virtual bool > wxStaticText::AcceptsFocus() const' is protected > src/StaticText.cpp:3947: error: within this context > > relevant line: > result = (bool)((wxStaticText const *)arg1)->AcceptsFocus(); > > how the method is declared in the carbon headers: > > protected : > > virtual wxSize DoGetBestSize() const ; > virtual bool AcceptsFocus() const { return FALSE; } > > Have not committed anything yet > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Sun Sep 3 16:13:29 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:13:29 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FB2234.10901@pressure.to> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> <44FB2234.10901@pressure.to> Message-ID: <44FB3769.6090200@mindspring.com> Well, the problem was I added more functions to wxWindow.h. If you don't declare the virtual AcceptFocus in wxWindow.h you don't need these. Alex Fenton wrote: > Roy Sutton wrote: > >> Try these instead. >> > Thank you. Just trying them out now. Are these to fix a problem by which > static items (eg StaticLine) are incorrectly receiving focus? Is there a > sample which demonstrates the before-and-after? > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From wxruby at qualitycode.com Sun Sep 3 16:14:09 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 16:14:09 -0400 Subject: [Wxruby-users] MemoryDC (was: Patch for DrawLines) In-Reply-To: <44FB07B3.6070006@mindspring.com> References: <44FB07B3.6070006@mindspring.com> Message-ID: <44FB3791.808@qualitycode.com> Roy Sutton wrote: > Note: MemoryDC doesn't inherit from DC.h. Not sure if we should try > fixing it or even if we have an example that uses it. I'm not sure what you mean by that. On Linux/GTK, wxMemoryDC inherits from wxWindowDC, and indirectly from wxDC. On MSW and Cocoa, it directly inherits from wxDC. I couldn't find wxMemoryDC on Mac at all, so I'm not sure what is going on there. Our wxMemoryDC.h does have it inheriting from wxDC, currently. MemoryDC is pretty important for apps that need to do a lot of drawing quickly (like SpaceMonkeys). Kevin From wxruby at qualitycode.com Sun Sep 3 16:16:59 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 16:16:59 -0400 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h In-Reply-To: <44FA7A07.8040604@mindspring.com> References: <44FA7A07.8040604@mindspring.com> Message-ID: <44FB383B.4080107@qualitycode.com> Roy Sutton wrote: > - virtual wxToolBar* GetToolBar() const; > + // TODO: Was virtual. Causes a crash if left virtual. > + wxToolBar* GetToolBar() const; I would still prefer: SHOULD_BE_VIRTUAL wxTollBar* GetToolBar const; or, at a minimum, using a FIXME commant instead of TODO. Not a showstopper for now...just a strong preference for the long run. Kevin From roys at mindspring.com Sun Sep 3 16:19:10 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:19:10 -0400 Subject: [Wxruby-users] MemoryDC In-Reply-To: <44FB3791.808@qualitycode.com> References: <44FB07B3.6070006@mindspring.com> <44FB3791.808@qualitycode.com> Message-ID: <44FB38BE.4030509@mindspring.com> Kevin Smith wrote: > Roy Sutton wrote: > >> Note: MemoryDC doesn't inherit from DC.h. Not sure if we should try >> fixing it or even if we have an example that uses it. >> > > I'm not sure what you mean by that. On Linux/GTK, wxMemoryDC inherits > from wxWindowDC, and indirectly from wxDC. On MSW and Cocoa, it directly > inherits from wxDC. I couldn't find wxMemoryDC on Mac at all, so I'm not > sure what is going on there. > > Our wxMemoryDC.h does have it inheriting from wxDC, currently. > > MemoryDC is pretty important for apps that need to do a lot of drawing > quickly (like SpaceMonkeys). > > > Sorry, I was unclear. wxDC.h is not %imported into MemoryDC.i Roy From roys at mindspring.com Sun Sep 3 16:26:36 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:26:36 -0400 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h In-Reply-To: <44FB383B.4080107@qualitycode.com> References: <44FA7A07.8040604@mindspring.com> <44FB383B.4080107@qualitycode.com> Message-ID: <44FB3A7C.502@mindspring.com> Kevin Smith wrote: > Roy Sutton wrote: > >> - virtual wxToolBar* GetToolBar() const; >> + // TODO: Was virtual. Causes a crash if left virtual. >> + wxToolBar* GetToolBar() const; >> > > I would still prefer: > SHOULD_BE_VIRTUAL wxTollBar* GetToolBar const; > > or, at a minimum, using a FIXME commant instead of TODO. > > Not a showstopper for now...just a strong preference for the long run. > > Oh, my bad. You did mention that before and I just blanked on it. Chasing these header file errors really drives me nuts. I think we need to look at what wxPython did. Here's a relevant link that showed up on the SWIG mailing list recently: > A similar way that I use to rename classes and functions is to parse > everything with swig -xml and then run an xml parser on this to extract > the necessary symbols. You could use this to generate the proper #defines > into another file. > My script is basically a customized version of this one here (credits to > Robin Dunn from wxPython): > http://cvs.wxwidgets.org/viewcvs.cgi/*checkout*/wxWidgets/wxPython/config.py?rev=1.71.2.19&content-type=text/plain > . Just search for "processXML" (at the very bottom) in there to get the > function which extracts the proper xml data. > > -Matthias Roy From roys at mindspring.com Sun Sep 3 16:40:33 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:40:33 -0400 Subject: [Wxruby-users] small fix to wxStaticText.rbw Message-ID: <44FB3DC1.3080002@mindspring.com> This removes an extraneous colon and changes the text to match the actual background color -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxStaticText.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/27ec962b/attachment.pl From roys at mindspring.com Sun Sep 3 16:52:59 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 16:52:59 -0400 Subject: [Wxruby-users] wxListBox.rbw Message-ID: <44FB40AB.6010701@mindspring.com> This patch fixes a bug in the third list box (Who knew there were three?) that does a prefix match as you type (who knew that's what it meant?). I changed the label to be a little more explanatory. We should really make the sample window bigger and/or put a scrollbar on there. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxListBox.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/bfac4214/attachment.pl From roys at mindspring.com Sun Sep 3 17:03:03 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 17:03:03 -0400 Subject: [Wxruby-users] Status Update Message-ID: <44FB4307.4030303@mindspring.com> I feel like I've mostly been banging my head against header file issues for the last couple weeks. I don't feel like I've gotten any actual 'work' done on fixing wrapping problems, adding new classes or improving the samples. I'm searching for any but haven't found 'em. Some things I've noticed: 1) Some controls look a lot better in the wxPython examples. Maybe we're not setting the correct window style flags? I vaguely recall someone posting about setting some flag for Windows that caused it to use the XP look. 2) the tip of the day opens in the wrong place now. 3) 'random' crashes 4) Layout problems. Controls that are supposed to be near each other have wide gaps. e.g. the TextCtrl example, compare wxPython and wxRuby. There are probably some others as well. Roy From wxruby at qualitycode.com Sun Sep 3 18:23:04 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 18:23:04 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FB373C.7070009@mindspring.com> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> <44FB2649.6020300@pressure.to> <44FB373C.7070009@mindspring.com> Message-ID: <44FB55C8.1050108@qualitycode.com> That looks like an upstream bug to me. If it's public in wxWindow, I can't think of any reason it should be protected in wxStaticText. For now, I could see leaving AcceptsFocus out of wxruby, with a comment saying why, or trying the #if that Roy mentions. But I think there might be a chance that the #if option could cause weird problems if anyone actually tried to use that method on wxruby-mac. I also have not committed any of this. Maybe at this point the safest and least-effort option would be to omit it from Window, with a comment. Kevin Roy Sutton wrote: > You'll need to put an #ifdef in there to make them protected for Mac. > The simplest solution may be to just not add AcceptFocus to wxWindow.h. > My fear is it will rear its ugly head again when someone adds it. I'll > go with whatever you want on this. > > Roy > > Alex Fenton wrote: >> All seems to work fine, except I am getting an error compiling >> StaticText.cpp >> >> /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h: In function `VALUE >> _wrap_wxStaticText_AcceptsFocus(int, VALUE*, long unsigned int)': >> /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h:48: error: `virtual bool >> wxStaticText::AcceptsFocus() const' is protected >> src/StaticText.cpp:3947: error: within this context >> >> relevant line: >> result = (bool)((wxStaticText const *)arg1)->AcceptsFocus(); >> >> how the method is declared in the carbon headers: >> >> protected : >> >> virtual wxSize DoGetBestSize() const ; >> virtual bool AcceptsFocus() const { return FALSE; } >> >> Have not committed anything yet >> >> alex >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> >> > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Sun Sep 3 18:37:04 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 18:37:04 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FB55C8.1050108@qualitycode.com> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> <44FB2649.6020300@pressure.to> <44FB373C.7070009@mindspring.com> <44FB55C8.1050108@qualitycode.com> Message-ID: <44FB5910.3000205@mindspring.com> Something like this? Kevin Smith wrote: > That looks like an upstream bug to me. If it's public in wxWindow, I > can't think of any reason it should be protected in wxStaticText. > > For now, I could see leaving AcceptsFocus out of wxruby, with a comment > saying why, or trying the #if that Roy mentions. But I think there might > be a chance that the #if option could cause weird problems if anyone > actually tried to use that method on wxruby-mac. > > I also have not committed any of this. Maybe at this point the safest > and least-effort option would be to omit it from Window, with a comment. > > Kevin > > > Roy Sutton wrote: > >> You'll need to put an #ifdef in there to make them protected for Mac. >> The simplest solution may be to just not add AcceptFocus to wxWindow.h. >> My fear is it will rear its ugly head again when someone adds it. I'll >> go with whatever you want on this. >> >> Roy >> >> Alex Fenton wrote: >> >>> All seems to work fine, except I am getting an error compiling >>> StaticText.cpp >>> >>> /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h: In function `VALUE >>> _wrap_wxStaticText_AcceptsFocus(int, VALUE*, long unsigned int)': >>> /usr/local/include/wx-2.6/wx/mac/carbon/stattext.h:48: error: `virtual bool >>> wxStaticText::AcceptsFocus() const' is protected >>> src/StaticText.cpp:3947: error: within this context >>> >>> relevant line: >>> result = (bool)((wxStaticText const *)arg1)->AcceptsFocus(); >>> >>> how the method is declared in the carbon headers: >>> >>> protected : >>> >>> virtual wxSize DoGetBestSize() const ; >>> virtual bool AcceptsFocus() const { return FALSE; } >>> >>> Have not committed anything yet >>> >>> alex >>> _______________________________________________ >>> wxruby-users mailing list >>> wxruby-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wxruby-users >>> >>> >>> >>> >>> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/e17a3639/attachment.pl From alex at pressure.to Sun Sep 3 19:21:09 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 04 Sep 2006 00:21:09 +0100 Subject: [Wxruby-users] SpaceMonkeys Message-ID: <44FB6365.5050303@pressure.to> Hi I just played (and won) my first ever game of SpaceMonkeys, using wxruby2. Seems totally crash-free on OS X a From wxruby at qualitycode.com Sun Sep 3 19:49:31 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 19:49:31 -0400 Subject: [Wxruby-users] Patch to wxMDIParentFrame.h In-Reply-To: <44FB3A7C.502@mindspring.com> References: <44FA7A07.8040604@mindspring.com> <44FB383B.4080107@qualitycode.com> <44FB3A7C.502@mindspring.com> Message-ID: <44FB6A0B.2070001@qualitycode.com> Roy Sutton wrote: > Chasing these header file errors really drives me nuts. Me too! Especially across different platforms, where the inheritance chains are different. > I think we need > to look at what wxPython did. Here's a relevant link that showed up on > the SWIG mailing list recently: >> A similar way that I use to rename classes and functions is to parse >> everything with swig -xml and then run an xml parser on this to extract >> the necessary symbols. You could use this to generate the proper #defines >> into another file. That is certainly an option. Even if we don't use it to generate the actual headers, we might be able to use it as a reference point to compare with our headers for correctness. I mentioned doxygen as another option. This would be a great project for a non-core wxruby volunteer to take on (hint! hint!) Kevin From wxruby at qualitycode.com Sun Sep 3 19:54:38 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 19:54:38 -0400 Subject: [Wxruby-users] SpaceMonkeys In-Reply-To: <44FB6365.5050303@pressure.to> References: <44FB6365.5050303@pressure.to> Message-ID: <44FB6B3E.5050504@qualitycode.com> Alex Fenton wrote: > I just played (and won) my first ever game of SpaceMonkeys, using > wxruby2. Seems totally crash-free on OS X Cool! I'm curious what you thought, but I have always been impressed at how strong the opponents are, considering their strategy is VERY crude. I don't think I have ever actually lost, but there have certainly been games where I have been frustrated by the opponents, and it has taken a long time to win. Of course, that's with only the bare minimum of game rules implemented. As soon as Technology Points are implemented, it would become very difficult to write a strong computer opponent program. Kevin From wxruby at qualitycode.com Sun Sep 3 20:05:49 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 20:05:49 -0400 Subject: [Wxruby-users] 0.0.35 [was: One step forward, one step back} In-Reply-To: <44FB0CA1.3090608@pressure.to> References: <44F8CD1E.30705@mindspring.com> <44FB0CA1.3090608@pressure.to> Message-ID: <44FB6DDD.8050508@qualitycode.com> Alex Fenton wrote: > I've tagged 0.0.35 in the repository and am just now watching it > recompile to an OS X gem which I'll upload to rubyforge. I just uploaded the Linux gem to rubyforge. > In the future I guess we should do our gems using release builds at wx > but I think not so important right now. Yes, we'll have to find the right balance between RELEASE/DEBUG and VERBOSE/NOT > On OS X, doing 'strip -x lib/wxruby2.bundle' reduces the size of the > binary with no apparent ill-effects, but I'll see if there are any > problems with others installing it via gems before committing. I also stripped the Linux version. I would be very surprised if doing so caused any problems. Thanks for pushing forward with this, Alex! Kevin From wxruby at qualitycode.com Sun Sep 3 20:15:25 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 20:15:25 -0400 Subject: [Wxruby-users] Gem testing (Linux) In-Reply-To: <44F325F0.3020408@xs4all.nl> References: <44F325F0.3020408@xs4all.nl> Message-ID: <44FB701D.2080705@qualitycode.com> Jonathan Maasland wrote: > I just tried to start a bit of testing of the binary Linux gem (Kevin > sent me a link) and I quickly ran into a problem: > ----- > jonathan at weatherlight ~/ruby-dev/wxruby/cvs_current/wxruby2/samples $ > ruby test.rb > /usr/lib/ruby/gems/1.8/gems/wxruby-1.9.0-i486-linux/lib/wx.rb:22: > uninitialized constant Wxruby2 (NameError) > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:182:in `activate' > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:181:in `activate' > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26:in `require' > from test.rb:4 > ----- Definitely looks like a ruby/gem installation problem. It is finding wx.rb, which is the little loader that pulls in wxruby.so. First, try downloading the new gem I just put on rubyforge. It will probably be the same, but perhaps not. Then, try running: gemwhich wx gemwhich wxruby2 I have discovered on my system that if I ever had the non-gem version of wxruby installed ("rake install"), it makes the gem version unable to run. > After gem-testing I tried to grab the latest cvs and ran into a small > issue I already fixed once. Just thought you might like to know about. > I have both Wx-2.4 and Wx-2.6 installed, however wx-config is linked to 2.4 > After changing `wx-config` ...' to `wx-config-2.6 ...` everything worked > fine, up until the linking which failed: My system doesn't have wx-config-2.6, so that might be a gentoo packaging thing. But if/when we have the wxWidgets version checking in our rakefile, at least you would quickly and clearly be told what the problem is. Solving it might be harder. At a minimum, we should probably extract "wx-config" out as an easily configurable parameter. A patch to do that would be welcome, although I haven't yet thought through where it should be defined (rakefile, environment, or somewhere else). > -- > ld: cannot find -lwx_gtk2ud_xrc-2.6 > -- > > If I list the libs for wx with wx-config-2.6 --libs, it of course lists > the above library. And the library-file exists in /usr/lib. Any ideas? > 'Cause I really don't have a clue. I thought I might try to recompile wx. I don't know. The very latest (in cvs and 0.0.35 source tarball) attempts to build statically vs. dynamically, so maybe that will work around the problem for you. > Thank you all (Kevin, Roy, Sean and Alex) very very much for all the > hard work and free time you spent on this project. I can't say nothing > more than: You guys ROCK! Thanks for the words of encouragement! Kevin From wxruby at qualitycode.com Sun Sep 3 20:20:51 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 20:20:51 -0400 Subject: [Wxruby-users] Patch files to implement AcceptFocus In-Reply-To: <44FB5910.3000205@mindspring.com> References: <44FA5510.1030904@mindspring.com> <44FA77CB.6010209@mindspring.com> <44FB2649.6020300@pressure.to> <44FB373C.7070009@mindspring.com> <44FB55C8.1050108@qualitycode.com> <44FB5910.3000205@mindspring.com> Message-ID: <44FB7163.5070808@qualitycode.com> Roy Sutton wrote: > Something like this? Perfect. Applied, thanks. Kevin From wxruby at qualitycode.com Sun Sep 3 20:23:05 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 20:23:05 -0400 Subject: [Wxruby-users] small fix to wxStaticText.rbw In-Reply-To: <44FB3DC1.3080002@mindspring.com> References: <44FB3DC1.3080002@mindspring.com> Message-ID: <44FB71E9.1030904@qualitycode.com> Roy Sutton wrote: > This removes an extraneous colon and changes the text to match the > actual background color Looks good to me. Applied. Kevin From wxruby at qualitycode.com Sun Sep 3 20:26:45 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 03 Sep 2006 20:26:45 -0400 Subject: [Wxruby-users] wxListBox.rbw In-Reply-To: <44FB40AB.6010701@mindspring.com> References: <44FB40AB.6010701@mindspring.com> Message-ID: <44FB72C5.3090103@qualitycode.com> Roy Sutton wrote: > This patch fixes a bug in the third list box (Who knew there were > three?) that does a prefix match as you type (who knew that's what it > meant?). I changed the label to be a little more explanatory. Nice. Applied. > We should really make the sample window bigger and/or put a scrollbar on > there. Yup. Kevin From roys at mindspring.com Sun Sep 3 22:26:30 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 22:26:30 -0400 Subject: [Wxruby-users] SpaceMonkeys In-Reply-To: <44FB6365.5050303@pressure.to> References: <44FB6365.5050303@pressure.to> Message-ID: <44FB8ED6.7040007@mindspring.com> I can't seem to get that far on Windows. In my previous version I could click the 'build' button but it would hang up there and not go to the next step. The gem I just built from the .35 version crashes with a segmentation fault. The version I have from my own files crashes any time I click. I guess I need to track those down. Roy Alex Fenton wrote: > Hi > > I just played (and won) my first ever game of SpaceMonkeys, using > wxruby2. Seems totally crash-free on OS X > > a > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Sun Sep 3 23:19:05 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 03 Sep 2006 23:19:05 -0400 Subject: [Wxruby-users] FlexGridSizer patch Message-ID: <44FB9B29.9010304@mindspring.com> The one consistent crash I get is when Layout is called on the FlexGridSizer. In tracking that down I saw that the header file for it could use some tweaking. Find it attached. Didn't fix the problem but it might prevent another later. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxFlexGridSizer.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060903/3fada0b1/attachment.pl From alex at pressure.to Mon Sep 4 14:39:17 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 04 Sep 2006 19:39:17 +0100 Subject: [Wxruby-users] SpaceMonkeys In-Reply-To: <44FB6B3E.5050504@qualitycode.com> References: <44FB6365.5050303@pressure.to> <44FB6B3E.5050504@qualitycode.com> Message-ID: <44FC72D5.3060805@pressure.to> Kevin Smith wrote: > Alex Fenton wrote: > >> I just played (and won) my first ever game of SpaceMonkeys, using >> wxruby2. Seems totally crash-free on OS X >> Oh dear. Turns out that I was using wxruby 0.6.0 from a gem, which gem uninstall wxruby had 'uninstalled' but failed to clean up all the binary files. It didn't work out quite so well with wxruby2 after all. Well I very much enjoyed playing the game anyway. > I'm curious what you thought, but I have always been impressed at how > strong the opponents are, considering their strategy is VERY crude. I > don't think I have ever actually lost, but there have certainly been > games where I have been frustrated by the opponents, and it has taken a > long time to win. > Yes, it's challenging, especially the defensive-minded AI. I got stuck in a stalemate for a long time until I figured how to manoeuvre into a position where the AI concentrated on invading each other's plants and left me alone. > Of course, that's with only the bare minimum of game rules implemented. > As soon as Technology Points are implemented, it would become very > difficult to write a strong computer opponent program. > I've always thought this is a really interesting area, but I have no experience in it. Do post any updates to the game to the list. cheers alex From alex at pressure.to Mon Sep 4 14:48:43 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 04 Sep 2006 19:48:43 +0100 Subject: [Wxruby-users] Status Update In-Reply-To: <44FB4307.4030303@mindspring.com> References: <44FB4307.4030303@mindspring.com> Message-ID: <44FC750B.8080102@pressure.to> Roy Sutton wrote: > I feel like I've mostly been banging my head against header file issues > for the last couple weeks. I think it's the most frustrating bit of wxruby2 development and for me I really appreciate the time you put in on it. My own progress with the difficult classes is inchingly slow or non-existent. But even if one step forward is one step back, at least we learn something from it, and all the SWIG bugs you've turned up will hopefully have fed into fixes in 1.3.30. Some things I've noticed: > 1) Some controls look a lot better in the wxPython examples. Maybe > we're not setting the correct window style flags? I vaguely recall > someone posting about setting some flag for Windows that caused it to > use the XP look. > You add a manifest file to your ruby.exe: http://rubyforge.org/pipermail/wxruby-users/2006-April/002003.html > 4) Layout problems. Controls that are supposed to be near each other > have wide gaps. e.g. the TextCtrl example, compare wxPython and wxRuby. > I never really warmed to python, but it sounds like it is worth trying out wxPython at some stage to compare - assuming you are looking at bigdemo? alex From roys at mindspring.com Mon Sep 4 20:17:42 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 04 Sep 2006 20:17:42 -0400 Subject: [Wxruby-users] Status Update In-Reply-To: <44FC750B.8080102@pressure.to> References: <44FB4307.4030303@mindspring.com> <44FC750B.8080102@pressure.to> Message-ID: <44FCC226.2060109@mindspring.com> >> 1) Some controls look a lot better in the wxPython examples. Maybe >> we're not setting the correct window style flags? I vaguely recall >> someone posting about setting some flag for Windows that caused it to >> use the XP look. >> >> > You add a manifest file to your ruby.exe: > > http://rubyforge.org/pipermail/wxruby-users/2006-April/002003.html > I think we should put this in the README file. Or include it as a file in an extras directory. >> 4) Layout problems. Controls that are supposed to be near each other >> have wide gaps. e.g. the TextCtrl example, compare wxPython and wxRuby. >> >> > I never really warmed to python, but it sounds like it is worth trying > out wxPython at some stage to compare - assuming you are looking at bigdemo? > > Yes. Bigdemo is their main demo application. They have about 4x the number of samples. I forgot to add that I would like to compile in wxScintilla when we do a Beta release. I don't -think- we need it for Alpha, but I'd be happy to build it into the Windows version. Roy From alex at pressure.to Tue Sep 5 03:28:05 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 05 Sep 2006 08:28:05 +0100 Subject: [Wxruby-users] Status Update In-Reply-To: <44FCC226.2060109@mindspring.com> References: <44FB4307.4030303@mindspring.com> <44FC750B.8080102@pressure.to> <44FCC226.2060109@mindspring.com> Message-ID: <44FD2705.1070801@pressure.to> > I think we should put this in the README file. Or include it as a file > in an extras directory. > Good idea. Will do. > I forgot to add that I would like to compile in wxScintilla when we do a > Beta release. I don't -think- we need it for Alpha, but I'd be happy to > build it into the Windows version. I think Scintilla is an important widget. For now any windows binary would be good and maybe best to have them similar across platforms. If you have a wrapper for Scintilla I'd be happy to try it on OS X with a view to getting it checked in for beta. thanks alex From roys at mindspring.com Tue Sep 5 10:46:37 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 05 Sep 2006 10:46:37 -0400 Subject: [Wxruby-users] Status Update In-Reply-To: <44FD2705.1070801@pressure.to> References: <44FB4307.4030303@mindspring.com> <44FC750B.8080102@pressure.to> <44FCC226.2060109@mindspring.com> <44FD2705.1070801@pressure.to> Message-ID: <44FD8DCD.1050600@mindspring.com> I forgot to mention I have a gem for Windows. I'll upload it somewhere so you can grab it if you want. Alex Fenton wrote: > I think Scintilla is an important widget. For now any windows binary > would be good and maybe best to have them similar across platforms. If > you have a wrapper for Scintilla I'd be happy to try it on OS X with a > view to getting it checked in for beta. > > Let me check to be sure it's still working with the latest build and snag the latest header file off the development site. Roy From roys at mindspring.com Tue Sep 5 17:50:04 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 05 Sep 2006 17:50:04 -0400 Subject: [Wxruby-users] Status Update In-Reply-To: <44FB4307.4030303@mindspring.com> References: <44FB4307.4030303@mindspring.com> Message-ID: <44FDF10C.5050100@mindspring.com> Roy Sutton wrote: > 1) Some controls look a lot better in the wxPython examples. Maybe > we're not setting the correct window style flags? I vaguely recall > someone posting about setting some flag for Windows that caused it to > use the XP look. > Fixed with the ruby.exe.manifest file. Although with the manifest I am getting some background color problems with StaticText controls, which I think I may be able to fix. > 4) Layout problems. Controls that are supposed to be near each other > have wide gaps. e.g. the TextCtrl example, compare wxPython and wxRuby. > Fixed with -something- I just did. I think it was commenting out a virtual function in Windows.h. I will make a patch and compare. From roys at mindspring.com Tue Sep 5 18:16:47 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 05 Sep 2006 18:16:47 -0400 Subject: [Wxruby-users] Patch to wxChoice.rbw Message-ID: <44FDF74F.4020504@mindspring.com> This patch removes a little whitespace at the end of the text before the choice box. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxChoice.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060905/42dde239/attachment.pl From roys at mindspring.com Tue Sep 5 23:21:20 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 05 Sep 2006 23:21:20 -0400 Subject: [Wxruby-users] Patch to wxWindow.h Message-ID: <44FE3EB0.2020708@mindspring.com> This patch fixes background color problems (at least on Windows). It uses the dreaded 'FIXME' My plan for next weekend is to try building wxPython from the source to see how they manage to achieve several things with SWIG that we're not (yet) able to. If I'm successful it might lead to wrapping a significant portion of wxWidgets more correctly than we've been able to. Hint to Ruby lurkers: There are some classes implemented in wxRuby that do not have corresponding demos in bigdemo. You can almost exactly copy the source from the wxPython demo program to wxRuby. Doing this can help reveal shortcomings and bugs that we haven't even had time to discover yet. Here's a link to the source for the wxPython demo program: http://prdownloads.sourceforge.net/wxpython/wxPython2.6-win32-docs-demos-2.6.3.3.exe Final note in case anyone is reading this far: The version of wxRuby I made into a gem uses ANSI strings. Does anyone have a strong preference for or against Unicode? I don't use it so it just didn't occur to me to build it. Should we make both available? Roy From roys at mindspring.com Wed Sep 6 00:28:30 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 06 Sep 2006 00:28:30 -0400 Subject: [Wxruby-users] wxPython Demo (was: Patch to wxWindow.h) In-Reply-To: <44FE3EB0.2020708@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> Message-ID: <44FE4E6E.8000409@mindspring.com> Roy Sutton wrote: > Hint to Ruby lurkers: There are some classes implemented in wxRuby that > do not have corresponding demos in bigdemo. You can almost exactly copy > the source from the wxPython demo program to wxRuby. Doing this can > help reveal shortcomings and bugs that we haven't even had time to > discover yet. Here's a link to the source for the wxPython demo program: > > http://prdownloads.sourceforge.net/wxpython/wxPython2.6-win32-docs-demos-2.6.3.3.exe > > Use this link instead: http://www.wxpython.org/download.php#binaries There are demo binaries (as well as the executable for wxPython if you actually want to try it out) for each platform there. Roy From alex at pressure.to Wed Sep 6 03:33:23 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Sep 2006 08:33:23 +0100 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FE3EB0.2020708@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> Message-ID: <44FE79C3.5010008@pressure.to> Hi Roy Sutton wrote: > This patch fixes background color problems (at least on Windows). It > uses the dreaded 'FIXME' > Should there be an attachment with this please? > Final note in case anyone is reading this far: The version of wxRuby I > made into a gem uses ANSI strings. Does anyone have a strong preference > for or against Unicode? I would prefer unicode. i18n is one of the main things I want to use wxruby2 for. A unicode build should be able to do everything an ANSI one can? > I don't use it so it just didn't occur to me to > build it. Should we make both available? > We could. I think it would be better to decide that one or other is the standard for our binary distributions at least. What do others think? a From alex at pressure.to Wed Sep 6 03:38:49 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Sep 2006 08:38:49 +0100 Subject: [Wxruby-users] Patch to wxChoice.rbw In-Reply-To: <44FDF74F.4020504@mindspring.com> References: <44FDF74F.4020504@mindspring.com> Message-ID: <44FE7B09.80505@pressure.to> Roy Sutton wrote: > This patch removes a little whitespace at the end of the text before > the choice box. committed, thank you alex From roys at mindspring.com Wed Sep 6 07:54:12 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 06 Sep 2006 07:54:12 -0400 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FE79C3.5010008@pressure.to> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> Message-ID: <44FEB6E4.9080102@mindspring.com> Yes, it should. I replied immediately to my own message but, apparently, it went only to me. Alex Fenton wrote: > Should there be an attachment with this please? > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060906/f1545286/attachment.pl From alex at pressure.to Wed Sep 6 17:53:16 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Sep 2006 22:53:16 +0100 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FEB6E4.9080102@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> Message-ID: <44FF434C.2090108@pressure.to> Thank you. I tried applying this patch, but it seems to cause lots of fairly ordinary code to crash (inc samples, eg listbook.rb, bigdemo/wxButton.rbw) on OS X at least. This is because get_default_attributes is not available. It seems this method is called internally in a lot of cases. Is there some other way to avoid the background colour bug? Thanks alex Roy Sutton wrote: > Yes, it should. I replied immediately to my own message but, > apparently, it went only to me. From roys at mindspring.com Wed Sep 6 18:06:59 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 06 Sep 2006 18:06:59 -0400 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FF434C.2090108@pressure.to> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> <44FF434C.2090108@pressure.to> Message-ID: <44FF4683.9040902@mindspring.com> I don't see how removing this from SWIG prevents it from being called internally. Those two were fairly recent additions. Are you certain it's that change that's causing the crashing? I suppose it could be because the internal functions are calling back to some -other- function that shouldn't be wrapped or is wrapped for the wrong object. The only other way to fix the background color bug is to redeclare that function (sometimes protected!) in all the base classes that override it. We'd have to do that for each platform. Roy Alex Fenton wrote: > Thank you. I tried applying this patch, but it seems to cause lots of > fairly ordinary code to crash (inc samples, eg listbook.rb, > bigdemo/wxButton.rbw) on OS X at least. This is because > get_default_attributes is not available. It seems this method is called > internally in a lot of cases. > > Is there some other way to avoid the background colour bug? > > Thanks > alex > > > > > Roy Sutton wrote: > >> Yes, it should. I replied immediately to my own message but, >> apparently, it went only to me. >> > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From alex at pressure.to Wed Sep 6 18:18:36 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 06 Sep 2006 23:18:36 +0100 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FF4683.9040902@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> <44FF434C.2090108@pressure.to> <44FF4683.9040902@mindspring.com> Message-ID: <44FF493C.7070803@pressure.to> Roy Sutton wrote: > I don't see how removing this from SWIG prevents it from being called > internally. Nor do I. > Those two were fairly recent additions. Are you certain > it's that change that's causing the crashing? I have just double-checked. listbook.rb runs fine before the patch, but when I apply the patch and recompile I get: ruby -Ilib samples/listbook/listbook.rb Our Initialize was called Their Initialize returned 1 samples/listbook/listbook.rb:21:in `load_frame_subclass': undefined method `get_default_attributes' for # (NoMethodError) from samples/listbook/listbook.rb:21:in `initialize' from samples/listbook/listbook.rb:167:in `new' from samples/listbook/listbook.rb:167:in `on_init' from samples/listbook/listbook.rb:175:in `main_loop' from samples/listbook/listbook.rb:175 > I suppose it could be > because the internal functions are calling back to some -other- function > that shouldn't be wrapped or is wrapped for the wrong object. > Sorry I can't help here - it reminds me of the bug with get_text_extent, which would crash when it was called implicitly when starting editing a Grid cell, even though the ruby code didn't mention that method. alex From roys at mindspring.com Wed Sep 6 18:28:10 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 06 Sep 2006 18:28:10 -0400 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FF493C.7070803@pressure.to> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> <44FF434C.2090108@pressure.to> <44FF4683.9040902@mindspring.com> <44FF493C.7070803@pressure.to> Message-ID: <44FF4B7A.10501@mindspring.com> I bet you didn't do a clean and recompile. About a bazillion files %import wxWindow.h. Try doing a clean build Alex Fenton wrote: > Roy Sutton wrote: > >> I don't see how removing this from SWIG prevents it from being called >> internally. >> > Nor do I. > >> Those two were fairly recent additions. Are you certain >> it's that change that's causing the crashing? >> > I have just double-checked. listbook.rb runs fine before the patch, but > when I apply the patch and recompile I get: > > ruby -Ilib samples/listbook/listbook.rb > Our Initialize was called > Their Initialize returned 1 > samples/listbook/listbook.rb:21:in `load_frame_subclass': undefined > method `get_default_attributes' for # (NoMethodError) > from samples/listbook/listbook.rb:21:in `initialize' > from samples/listbook/listbook.rb:167:in `new' > from samples/listbook/listbook.rb:167:in `on_init' > from samples/listbook/listbook.rb:175:in `main_loop' > from samples/listbook/listbook.rb:175 > > >> I suppose it could be >> because the internal functions are calling back to some -other- function >> that shouldn't be wrapped or is wrapped for the wrong object. >> >> > Sorry I can't help here - it reminds me of the bug with get_text_extent, > which would crash when it was called implicitly when starting editing a > Grid cell, even though the ruby code didn't mention that method. > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From alex at pressure.to Wed Sep 6 20:05:56 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Sep 2006 01:05:56 +0100 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FF4B7A.10501@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> <44FF434C.2090108@pressure.to> <44FF4683.9040902@mindspring.com> <44FF493C.7070803@pressure.to> <44FF4B7A.10501@mindspring.com> Message-ID: <44FF6264.2040107@pressure.to> Roy Sutton wrote: > I bet you didn't do a clean and recompile. About a bazillion files > %import wxWindow.h. Try doing a clean build > Thanks. I didn't realise that was needed. It works now. Will commit tomorrow. alex From alex at pressure.to Thu Sep 7 03:39:27 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Sep 2006 08:39:27 +0100 Subject: [Wxruby-users] Patch to wxWindow.h In-Reply-To: <44FEB6E4.9080102@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> <44FE79C3.5010008@pressure.to> <44FEB6E4.9080102@mindspring.com> Message-ID: <44FFCCAF.2000200@pressure.to> Roy Sutton wrote: > Yes, it should. I replied immediately to my own message but, > apparently, it went only to me. Committed (eventually). Thank you a From wxruby at qualitycode.com Thu Sep 7 09:19:39 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Thu, 07 Sep 2006 09:19:39 -0400 Subject: [Wxruby-users] Unicode? (was: Patch to wxWindow.h) In-Reply-To: <44FE3EB0.2020708@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> Message-ID: <45001C6B.4070300@qualitycode.com> Roy Sutton wrote: > Final note in case anyone is reading this far: The version of wxRuby I > made into a gem uses ANSI strings. Does anyone have a strong preference > for or against Unicode? I don't use it so it just didn't occur to me to > build it. Should we make both available? As a huge fan of unicode, and as a believer in consistency where possible, I would strongly prefer to have all wxruby binary gems use unicode. I think it will greatly minimize confusion when trying to run wxruby apps on multiple platforms. Kevin From wxruby at qualitycode.com Thu Sep 7 09:33:32 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Thu, 07 Sep 2006 09:33:32 -0400 Subject: [Wxruby-users] FlexGridSizer patch In-Reply-To: <44FB9B29.9010304@mindspring.com> References: <44FB9B29.9010304@mindspring.com> Message-ID: <45001FAC.70201@qualitycode.com> Roy Sutton wrote: > The one consistent crash I get is when Layout is called on the > FlexGridSizer. In tracking that down I saw that the header file for it > could use some tweaking. Find it attached. Didn't fix the problem but > it might prevent another later. Agreed. Applied. Thanks. Kevin From roys at mindspring.com Thu Sep 7 10:22:01 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 07 Sep 2006 10:22:01 -0400 Subject: [Wxruby-users] Unicode? In-Reply-To: <45001C6B.4070300@qualitycode.com> References: <44FE3EB0.2020708@mindspring.com> <45001C6B.4070300@qualitycode.com> Message-ID: <45002B09.1010304@mindspring.com> I'll rebuild with Unicode and see how it works out. You don't have to do anything different with Ruby, I assume, just because you compiled with Unicode. Roy Kevin Smith wrote: > Roy Sutton wrote: > >> Final note in case anyone is reading this far: The version of wxRuby I >> made into a gem uses ANSI strings. Does anyone have a strong preference >> for or against Unicode? I don't use it so it just didn't occur to me to >> build it. Should we make both available? >> > > As a huge fan of unicode, and as a believer in consistency where > possible, I would strongly prefer to have all wxruby binary gems use > unicode. > > I think it will greatly minimize confusion when trying to run wxruby > apps on multiple platforms. > > Kevin > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From alex at pressure.to Thu Sep 7 10:30:02 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Sep 2006 15:30:02 +0100 Subject: [Wxruby-users] Unicode? In-Reply-To: <45002B09.1010304@mindspring.com> References: <44FE3EB0.2020708@mindspring.com> <45001C6B.4070300@qualitycode.com> <45002B09.1010304@mindspring.com> Message-ID: <45002CEA.90602@pressure.to> Roy Sutton wrote: > I'll rebuild with Unicode and see how it works out. You don't have to > do anything different with Ruby, I assume, just because you compiled > with Unicode. > You don't have to change anything about ruby. You don't need to change scripts either, unless you actually want to use unicode characters in them. If you do, you need to tell ruby what encoding the script is written in, and ensure non-ASCII characters are passed to WxRuby in UTF-8. The text/unicode.rb sample is a decent guide to this (using Arabic, Chinese, accented Latin etc in the same GUI - which couldn't be done w/o a unicode build). Thanks - let me know when you have a gem available alex From alex at pressure.to Thu Sep 7 15:14:41 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Sep 2006 20:14:41 +0100 Subject: [Wxruby-users] A little bit of sugar Message-ID: <45006FA1.6000507@pressure.to> Hi Do a search on 'wxruby' and you'll see that people's main gripes are 1) stability 2) development progress 3) documentation and 4) syntax. We're making great progress on 1-3 so thought it seemed like a good time to start looking at 4). So here's announcing a first release of WxSugar. It can be downloaded via gems (gem install wx_sugar) or from http://rubyforge.org/frs/?group_id=665 . If you install the gem it will automatically build docs for you. This package is a set of pure ruby extensions to wxRuby that are meant to make the syntax: - more expressive - more 'rubyish' and less C++ish - shorter The main idea is to get a discussion going about how we want to develop the wxRuby syntax. The extensions are designed to be modular (you can use one and not the other) and to complement rather than replace the existing syntax (so you can run existing wxRuby code with them). You can require 'wx_sugar/all' to load all the behaviours, or select particular ones including * 'accessors' : creates ruby-style accessors (foo instead of get_foo, foo= instead of set_foo, foo? instead of is_foo). If there's a consensus that we want to follow WxPython in doing this, I'll submit a patch that implements this at the C API level. * 'keyword_constructors' : For example, Wx::Button.new(:label => 'press me'); this extension allows you to avoid typing Wx::DEFAULT_POSITION or having to remember what order arguments go in ever again. You can mix positional and keyword arguments (in case you hate the latter, Kevin ;) ) * 'layout' : simplifies using sizers, and combines instantiating widgets with adding them to sizers (which has to be two steps in wxRuby). Especially useful for nested sizers. Still under development * 'menus' : never deal with tedious menu ids again. Needs documenting and integrating with core classes. * 'itemdata' : simulates itemdata, but using any ruby object. Not fully integrated yet. This is very much alpha - some of it is stuff that's ripped from applications I've written, and not properly generalised yet. But hopefully it's of interest. Please see the attached example of the kind of syntax it produces. Sweet! alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sugar-sample.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060907/8afc947d/attachment.pl From alex at pressure.to Thu Sep 7 15:38:48 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 07 Sep 2006 20:38:48 +0100 Subject: [Wxruby-users] A little bit of sugar In-Reply-To: <45006FA1.6000507@pressure.to> References: <45006FA1.6000507@pressure.to> Message-ID: <45007548.9070905@pressure.to> > You can require 'wx_sugar/all' to load all the behaviours, or select > particular ones including oops, forgot to mention one more quite important one: * 'event_connector' : tries to make the ruby event handling syntax neater, more flexible and more consistent. It uses a single method 'listen', where you specify the type of events you're interested in, optionally, a source of events, and a block or method name that should handle the events. The key aim is to hide some of the inconsistency between the way CommandEvents and other events are fired, and to remove some of the tedium of passing event objects about with code like evt_button(my_button.get_id) { | event | on_click_my_button(event) } and write instead listen(:button, my_button, :on_click_my_button) It works on the principle that if the event handler method wants the event object, it can ask for it. cheers alex From roys at mindspring.com Fri Sep 8 12:03:32 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 08 Sep 2006 12:03:32 -0400 Subject: [Wxruby-users] A little bit of sugar In-Reply-To: <45006FA1.6000507@pressure.to> References: <45006FA1.6000507@pressure.to> Message-ID: <45019454.2090508@mindspring.com> Alex, Nice work! I'll have to play around with it some to see how it all feels. Certainly there are a lot better ways we could these things. Roy Alex Fenton wrote: > Hi > > Do a search on 'wxruby' and you'll see that people's main gripes are > 1) stability 2) development progress 3) documentation and 4) syntax. > > We're making great progress on 1-3 so thought it seemed like a good > time to start looking at 4). So here's announcing a first release of > WxSugar. It can be downloaded via gems (gem install wx_sugar) or from > http://rubyforge.org/frs/?group_id=665 . If you install the gem it > will automatically build docs for you. > > This package is a set of pure ruby extensions to wxRuby that are meant > to make the syntax: > > - more expressive > - more 'rubyish' and less C++ish > - shorter > > The main idea is to get a discussion going about how we want to > develop the wxRuby syntax. The extensions are designed to be modular > (you can use one and not the other) and to complement rather than > replace the existing syntax (so you can run existing wxRuby code with > them). > > You can require 'wx_sugar/all' to load all the behaviours, or select > particular ones including > > * 'accessors' : creates ruby-style accessors (foo instead of get_foo, > foo= instead of set_foo, foo? instead of is_foo). If there's a > consensus that we want to follow WxPython in doing this, I'll submit a > patch that implements this at the C API level. > > * 'keyword_constructors' : For example, Wx::Button.new(:label => > 'press me'); this extension allows you to avoid typing > Wx::DEFAULT_POSITION or having to remember what order arguments go in > ever again. You can mix positional and keyword arguments (in case you > hate the latter, Kevin ;) ) > > * 'layout' : simplifies using sizers, and combines instantiating > widgets with adding them to sizers (which has to be two steps in > wxRuby). Especially useful for nested sizers. Still under development > > * 'menus' : never deal with tedious menu ids again. Needs documenting > and integrating with core classes. > > * 'itemdata' : simulates itemdata, but using any ruby object. Not > fully integrated yet. > > This is very much alpha - some of it is stuff that's ripped from > applications I've written, and not properly generalised yet. But > hopefully it's of interest. Please see the attached example of the > kind of syntax it produces. > > Sweet! > alex > > ------------------------------------------------------------------------ > > require 'wx' > require 'wx_sugar/all' > > class MyButton < Wx::Button > def on_button() > p "clicked my button" > end > end > > class SugaryFrame < Wx::Frame > def initialize(*args) > super > # binds evt_close automatically to self#on_close > listen(:close) > > arrange_vertically(:padding => 5) > # This panel and contents should expand to fit > add( Wx::Panel, :proportion => 1 ) do | panel | > # a text control > panel.background_colour = Wx::Colour.new(200, 150, 100) > panel.add( Wx::TextCtrl[ :value => 'initial value', > :style => Wx::TE_MULTILINE, > :size => [200, 300] ] ) > end > > # use a nested grid sizer to arrange bottom area > arrange_grid( :cols => 2, :rows => 2, :proportion => 0, > :vgap => 2, :minsize => true, :padding => 1 ) do > # a custom button subclass > add( MyButton[ :label => 'baz' ], :proportion => 1 ) do | button | > listen(:button, button, :on_baz_button) > end > > # a drop down > choices = %w[ nasty nice ] > add( Wx::Choice[ :choices => choices ], :padding => 4) > > # another button > add( Wx::Button[ :label => 'foo' ] ) do | button | > # handle using a method > listen(:button, button, :on_foo_button) > # handle using a block > listen(:button, button) { | e | p "clicked in a block"; e.skip } > end > add( Wx::TextCtrl[ :value => 'foo' ], :align => 'right' ) > end > end > > def on_close(event) > puts "CLOSING" > event.skip() > end > > def on_button(event) > p event > end > > def on_foo_button(e) > p "FOO" > e.skip() > end > > # you aren't required to receive the event > def on_baz_button() > p "baZ" > end > end > > class SugaryApp < Wx::App > def on_init > frame = SugaryFrame.new( nil, :title => "Arranger Application" ) > frame.show() > end > end > > SugaryApp.new.main_loop() > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Mon Sep 11 19:05:25 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 00:05:25 +0100 Subject: [Wxruby-users] ruby method names Message-ID: <4505EBB5.1070101@pressure.to> Hi Attached is a patch that adds aliases to the API for methods that look like attribute accessors. So a_frame.set_title('The title') # currently a_frame.title = 'The title' # now an alternative textctrl.get_value # currently textctrl.value # now an alternative Also, C++ methods named 'IsXXX' are now exposed in ruby with the alternative name 'xxx?', eg tree_item_id.is_ok # currently tree_item_id.ok? # now an alternative a_checkbox.is_checked a_checkbox.checked? Note these are simply aliases - existing code can remain unchanged. I think this would do a lot to make the API feel more ruby-like (or pythonesque - WxPython follows this style) - but is pretty cheap and straightforward. There is no speed hit, and the resulting binary is only marginally larger (<1% on my build). I will follow this patch with updates to the doc translator if needed. What do people think? alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: renamer.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060912/96930037/attachment.pl From alex at pressure.to Mon Sep 11 19:18:16 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 00:18:16 +0100 Subject: [Wxruby-users] next steps - public alpha? Message-ID: <4505EEB8.9070003@pressure.to> Seems the gems and tarball have been downloaded a bit with no reported problems. I suggest we do an alpha release incorporating Roy's useful recent fixes and announce it more publicly e.g. on the mailing list. It's not perfect, but again we have made a lot of progress since late July and we should build on it; it was our dev goal. I now personally have to put some effort into other projects for a few weeks, though still around to help building, troubleshooting and committing. I don't know of anything in the works that will radically improve wxruby2 in the short term - SWIG 1.3.30 may help a lot if it includes Roy's patches, but there's no release schedule I can see. So maybe it's a good time to get some wider feedback and let people know the project is very much alive. A few things maybe to fix for a first public alpha release (maybe-views?) - move to SVN (or just after the release) - bundled documentation (I can have a go at this if desired) - ruby method names?? - checking windows binary gems work OK cheers alex From sean.m.long at gmail.com Mon Sep 11 19:38:48 2006 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 11 Sep 2006 16:38:48 -0700 Subject: [Wxruby-users] ruby method names In-Reply-To: <4505EBB5.1070101@pressure.to> References: <4505EBB5.1070101@pressure.to> Message-ID: Alex, That looks good to me, less typing required. :) I have not tried the patch but the code looks like it will work and I can't think of any corner cases off the top of my head. Sean On 9/11/06, Alex Fenton wrote: > Hi > > Attached is a patch that adds aliases to the API for methods that look > like attribute accessors. So > > a_frame.set_title('The title') # currently > a_frame.title = 'The title' # now an alternative > > textctrl.get_value # currently > textctrl.value # now an alternative > > Also, C++ methods named 'IsXXX' are now exposed in ruby with the > alternative name 'xxx?', eg > > tree_item_id.is_ok # currently > tree_item_id.ok? # now an alternative > > a_checkbox.is_checked > a_checkbox.checked? > > Note these are simply aliases - existing code can remain unchanged. I > think this would do a lot to make the API feel more ruby-like (or > pythonesque - WxPython follows this style) - but is pretty cheap and > straightforward. There is no speed hit, and the resulting binary is only > marginally larger (<1% on my build). > > I will follow this patch with updates to the doc translator if needed. > > What do people think? > alex > > > > > > Index: wxruby2/swig/renamer.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/renamer.rb,v > retrieving revision 1.4 > diff -b -u -r1.4 renamer.rb > --- wxruby2/swig/renamer.rb 3 Sep 2005 21:03:47 -0000 1.4 > +++ wxruby2/swig/renamer.rb 11 Sep 2006 22:51:32 -0000 > @@ -45,6 +45,18 @@ > new_method_name = '"' + un_camelcase(method_name) + '"' > line[quoted_method_name] = new_method_name > #puts(line) > + if new_method_name =~ /^"([gs]et|is)_(.*)"$/ > + line2 = line.dup > + case $1 > + when 'get' > + line2[new_method_name] = "\"#{$2}\"" > + when 'set' > + line2[new_method_name] = "\"#{$2}=\"" > + when 'is' > + line2[new_method_name] = "\"#{$2}?\"" > + end > + line << "\n" << line2 > + end > end > return line > end > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From roys at mindspring.com Mon Sep 11 23:05:40 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 11 Sep 2006 23:05:40 -0400 Subject: [Wxruby-users] next steps - public alpha? In-Reply-To: <4505EEB8.9070003@pressure.to> References: <4505EEB8.9070003@pressure.to> Message-ID: <45062404.6070102@mindspring.com> I got wxScintilla working again. Not sure if we want to plug this in or not. I think it would be great to get the public alpha out ASAP. I don't know what else really needs to get done right now. I like the ruby method names patch you sent in recently, though I haven't tested it. I know I tried this before but I think I took a different route. I haven't yet gotten to the point of trying to build wxPython to see how they manage to wrap everything. Roy Alex Fenton wrote: > Seems the gems and tarball have been downloaded a bit with no reported > problems. I suggest we do an alpha release incorporating Roy's useful > recent fixes and announce it more publicly e.g. on the mailing list. > > It's not perfect, but again we have made a lot of progress since late > July and we should build on it; it was our dev goal. I now personally > have to put some effort into other projects for a few weeks, though > still around to help building, troubleshooting and committing. > > I don't know of anything in the works that will radically improve > wxruby2 in the short term - SWIG 1.3.30 may help a lot if it includes > Roy's patches, but there's no release schedule I can see. So maybe it's > a good time to get some wider feedback and let people know the project > is very much alive. > > A few things maybe to fix for a first public alpha release (maybe-views?) > - move to SVN (or just after the release) > - bundled documentation (I can have a go at this if desired) > - ruby method names?? > - checking windows binary gems work OK > > cheers > alex > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From alex at pressure.to Tue Sep 12 01:58:31 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 06:58:31 +0100 Subject: [Wxruby-users] next steps - public alpha? In-Reply-To: <45062404.6070102@mindspring.com> References: <4505EEB8.9070003@pressure.to> <45062404.6070102@mindspring.com> Message-ID: <45064C87.7090905@pressure.to> Roy Sutton wrote: > I got wxScintilla working again. Not sure if we want to plug this in or > not. > Nice work. I would favour plugging this in and bundling it in the first gem, so long as we don't run into any very tricky platform problems. I think it should be optional for source builds. Please post a patch whenever you're ready. > I like the ruby method names patch you sent in recently, though I haven't tested it. I > know I tried this before but I think I took a different route. > Like Sean said, I tried but can't think of any edge cases here (eg classes which already have methods Foo and GetFoo that do different things). It could be done in the .i interface files, but since the SWIG output the patch modifies are standard Ruby C API calls rather than SWIG wrapper code I think it's a fairly stable target. > I haven't yet gotten to the point of trying to build wxPython to see how > they manage to wrap everything. > Nor have I - thank you for the reminder as I ought to look here for some inspiration on the Clipboard etc classes. alex From wxruby at qualitycode.com Tue Sep 12 09:51:42 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 09:51:42 -0400 Subject: [Wxruby-users] ruby method names In-Reply-To: <4505EBB5.1070101@pressure.to> References: <4505EBB5.1070101@pressure.to> Message-ID: <4506BB6E.90908@qualitycode.com> Alex Fenton wrote: > Attached is a patch that adds aliases to the API for methods that look > like attribute accessors. > > Note these are simply aliases - existing code can remain unchanged. Generally this looks reasonable. My only concern is that we are actually creating a second, independent method at the Ruby level, which could cause problems. I haven't thought it through, but I wonder if there is a corner case where someone might extend a class (say MyFrame < Frame) and override one of these methods. Then they extend that class (MyFooFrame). At that level, I suspect we would actually have two completely separate methods, so one would be overridden and the other would not, possibly leading to surprises. At that point, is_ok and ok? would behave differently. Would it be safer to actually create true Ruby aliases for each of these methods? If so, this could be done in wxsugar (or wx.rb), or as a post-swig processor adding a define_alias call after each define_method call. Or maybe doing so would not actually help with the potential problem I mentioned. Perhaps we just need to tell people to be consistent using one form or the other, because mixing them is inherently dangerous. Kevin From wxruby at qualitycode.com Tue Sep 12 10:04:31 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 10:04:31 -0400 Subject: [Wxruby-users] next steps - public alpha? In-Reply-To: <4505EEB8.9070003@pressure.to> References: <4505EEB8.9070003@pressure.to> Message-ID: <4506BE6F.7040805@qualitycode.com> Alex Fenton wrote: > Seems the gems and tarball have been downloaded a bit with no reported > problems. I suggest we do an alpha release incorporating Roy's useful > recent fixes and announce it more publicly e.g. on the mailing list. I would like to do one more internal release first, and this time include a Windows gem. If we are going to include scintilla, that would also be a big enough item I would like to do an internal test for that. It's too bad rubyforge doesn't track gem installations (as opposed to gem downloads). We really don't know how many people have tried it. > A few things maybe to fix for a first public alpha release (maybe-views?) > - move to SVN (or just after the release) I have been thinking that moving to svn before the public release might make sense. That way, if we get a flood of patches, or a flood of interested contributors, we won't be struggling with a vcs migration at the same time. > - bundled documentation (I can have a go at this if desired) > - ruby method names?? Both of those would be nice, but I don't consider them showstoppers at this point. So here is my proposal: - Migrate to SVN - Integrate scintilla - Possibly include the new ruby naming patch - Build all 4 binary gems and upload them quietly - After "enough" time and testing, announce THOSE gems as the first alpha release of wxruby2...perhaps early next week Kevin From wxruby at qualitycode.com Tue Sep 12 10:07:24 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 10:07:24 -0400 Subject: [Wxruby-users] ruby method names In-Reply-To: <4505EBB5.1070101@pressure.to> References: <4505EBB5.1070101@pressure.to> Message-ID: <4506BF1C.6090704@qualitycode.com> Alex Fenton wrote: > Attached is a patch that adds aliases to the API for methods that look > like attribute accessors. Sorry to fork my own thread, but I had another thought that seems to fit better here: Should this actually go in wxsugar, at least for now? When possible, I would like to have experimental code be in ruby (not C++ or SWIG), and not be in the core product. As it gets refined and becomes widely accepted, it could be folded in to wxruby proper. Just a thought. I'm still open to both approaches. Kevin From roys at mindspring.com Tue Sep 12 11:03:52 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 11:03:52 -0400 Subject: [Wxruby-users] Unicode madness Message-ID: <4506CC58.2070606@mindspring.com> It seems like unicode is poorly or improperly tested with wxWidgets. The documentation is wrong in several places and I have yet to get a build that works with unicode. The include file that is supposed to be included when you #define _UNICODE on windows does not even define wxUSE_UNICODE. I'll try to tackle this more later but we'll have to wait and see what happens. Oh, and unicode isn't properly (fully?) supported on Win 95. Are we planning support for Win 95? Roy From alex at pressure.to Tue Sep 12 11:41:15 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 16:41:15 +0100 Subject: [Wxruby-users] ruby method names In-Reply-To: <4506BB6E.90908@qualitycode.com> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> Message-ID: <4506D51B.4060804@pressure.to> Hi Kevin > My only concern is that we are actually creating a second, independent method at the Ruby level, which could cause problems. > A good point - but actually, this is exactly what the alias and alias_method do in Ruby - create a copy, not a reference. So if you subclass and redefine a method which has an alias in the superclass, the alias in the subclass will still have the original (superclass) definition. > Would it be safer to actually create true Ruby aliases for each of these > methods? If so, this could be done in wxsugar (or wx.rb), or as a > post-swig processor adding a define_alias call after each define_method > call. > Yup, WxSugar accessors.rb does the former. But b/c of the above, the main difference is the hit to startup speed of doing it in ruby, b/c it has to reflect every ruby class and method on startup. > Perhaps we just need to tell people to be consistent using > one form or the other, because mixing them is inherently dangerous. > Yep, I agree, though in practice I've been mixing them for two years without problem. The main irritation is remembering that 'foo =' is interpreted as assignment to a local variable, so you must say 'self.foo=' - but this is a general Ruby wrinkle. Or in the much longer term, maybe even deprecate and remove the C++ish names ;) - but I'm definitely not suggesting that now. cheers alex From wxruby at qualitycode.com Tue Sep 12 12:32:25 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 12:32:25 -0400 Subject: [Wxruby-users] ruby method names In-Reply-To: <4506D51B.4060804@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> Message-ID: <4506E119.9080708@qualitycode.com> Alex Fenton wrote: > A good point - but actually, this is exactly what the alias and > alias_method do in Ruby - create a copy, not a reference. Oh. Right. > Yup, WxSugar accessors.rb does the former. But b/c of the above, the > main difference is the hit to startup speed of doing it in ruby, b/c it > has to reflect every ruby class and method on startup. Can you quantify that? We're already loading a large library. Are we talking 1.1 seconds instead of 1? Or 10 seconds instead of 5? And while we are in an alpha state anyway, is speed one of our highest priorities? > Yep, I agree, though in practice I've been mixing them for two years > without problem. The main irritation is remembering that 'foo =' is > interpreted as assignment to a local variable, so you must say > 'self.foo=' - but this is a general Ruby wrinkle. Ugh. Does '@foo =' work in that case? > Or in the much longer term, maybe even deprecate and remove the C++ish > names ;) - but I'm definitely not suggesting that now. Yes, in the long run I could imagine wxruby only supporting the sugary versions. Maybe at that point have a wxpepper module that simulates the original C++ API for folks who hate sugar :-) Kevin From alex at pressure.to Tue Sep 12 13:00:00 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 18:00:00 +0100 Subject: [Wxruby-users] ruby method names In-Reply-To: <4506E119.9080708@qualitycode.com> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> Message-ID: <4506E790.8080704@pressure.to> Kevin Smith wrote: > Can you quantify that? 25-30% above wx2 (which is about 2.25s here) accessors.rb is about 80% of the start-up time of WxSugar. >> Yep, I agree, though in practice I've been mixing them for two years >> without problem. The main irritation is remembering that 'foo =' is >> interpreted as assignment to a local variable, so you must say >> 'self.foo=' - but this is a general Ruby wrinkle. >> > > Ugh. Does '@foo =' work in that case? > Nope, because it's still a method call not a variable assignment. Which is ruby's problem - when there isn't a scope sigil (like @) or an explicit callee on the LHS, ruby's parser has no definitive way of telling a local var assignment from a method call on self. So it has to guess one. > Maybe at that point have a wxpepper module that simulates the > original C++ API for folks who hate sugar :-) > LOL! alex From alex at pressure.to Tue Sep 12 13:45:53 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 18:45:53 +0100 Subject: [Wxruby-users] experimental code [ruby method names] In-Reply-To: <4506BF1C.6090704@qualitycode.com> References: <4505EBB5.1070101@pressure.to> <4506BF1C.6090704@qualitycode.com> Message-ID: <4506F251.2000700@pressure.to> Kevin Smith wrote: > Sorry to fork my own thread, but I had another thought that seems to fit > better here: Should this actually go in wxsugar, at least for now? > I'd like to commit this b/c I think it will improve the API's acceptability and usefulness (to some) and is worth having in the core, relative to the risks. Let's see what feedback we get from a more public release with both styles available. Maybe run a survey on rubyforge? It's not a hard patch to back out of at this stage. > When possible, I would like to have experimental code I still find wxruby2 a bit 'experimental' generally... > be in ruby > (not > C++ or SWIG), Yes for sure. People being able to contribute to wxruby in ruby seems to me impt to attracting developers. > and not be in the core product. As it gets refined and > becomes widely accepted, it could be folded in to wxruby proper. > Yep. If we're going to use wx_sugar for this purpose, can we run it through wxruby rubyforge project as an SVN module so others have access to it? I don't want to open weft-qda CVS. alex From alex at pressure.to Tue Sep 12 15:45:20 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 12 Sep 2006 20:45:20 +0100 Subject: [Wxruby-users] next steps - public alpha? In-Reply-To: <4506BE6F.7040805@qualitycode.com> References: <4505EEB8.9070003@pressure.to> <4506BE6F.7040805@qualitycode.com> Message-ID: <45070E50.7060300@pressure.to> Kevin Smith wrote: > So here is my proposal: > - Migrate to SVN > - Integrate scintilla > - Possibly include the new ruby naming patch > - Build all 4 binary gems and upload them quietly > - After "enough" time and testing, announce THOSE gems as the first > alpha release of wxruby2...perhaps early next week > Sounds good to me. Shall we ask Rubyforge to migrate us? alex From wxruby at qualitycode.com Tue Sep 12 17:22:55 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 17:22:55 -0400 Subject: [Wxruby-users] experimental code [ruby method names] In-Reply-To: <4506F251.2000700@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BF1C.6090704@qualitycode.com> <4506F251.2000700@pressure.to> Message-ID: <4507252F.6010208@qualitycode.com> Alex Fenton wrote: > I'd like to commit this b/c I think it will improve the API's > acceptability and usefulness (to some) and is worth having in the core, > relative to the risks. Let's see what feedback we get from a more public > release with both styles available. Maybe run a survey on rubyforge? The thing is...once it's in a wxruby release, there would be a lot of resistance to removing it...even if it causes problems. I view its inclusion as a strong commitment, and I'm not sure I'm ready to take that step. > If we're going to use wx_sugar for this purpose, can we run it through > wxruby rubyforge project as an SVN module so others have access to it? I > don't want to open weft-qda CVS. We could host wxsugar within the wxruby rubyforge project. Or wxsugar could be its own rubyforge project. I don't have strong feelings for or against either approach. Kevin From wxruby at qualitycode.com Tue Sep 12 17:34:10 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 17:34:10 -0400 Subject: [Wxruby-users] ruby method names In-Reply-To: <4506E790.8080704@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> <4506E790.8080704@pressure.to> Message-ID: <450727D2.8090203@qualitycode.com> Alex Fenton wrote: >> Can you quantify that? > 25-30% above wx2 (which is about 2.25s here) > accessors.rb is about 80% of the start-up time of WxSugar. To me, half a second extra to launch a GUI app is not worth worrying about at this alpha stage of our project. Based on that, I would vote to leave it in ruby for now. I wonder if there's a way to hook the different classes so the accessors are only created when a class is first referenced. Since we have hundreds of classes, but small apps would typically only use a handful of them, it could be a big win. >>> Yep, I agree, though in practice I've been mixing them for two years >>> without problem. The main irritation is remembering that 'foo =' is >>> interpreted as assignment to a local variable, so you must say >>> 'self.foo=' - but this is a general Ruby wrinkle. >>> >> Ugh. Does '@foo =' work in that case? >> > Nope, because it's still a method call not a variable assignment. Which > is ruby's problem - when there isn't a scope sigil (like @) or an > explicit callee on the LHS, ruby's parser has no definitive way of > telling a local var assignment from a method call on self. So it has to > guess one. Blech! To me that may be reason enough not to support write accessors. An API that strongly invites people to make a mistake that silently does the wrong thing is very unappealing to me. Very very unappealing. Kevin From roys at mindspring.com Tue Sep 12 17:35:48 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 17:35:48 -0400 Subject: [Wxruby-users] wx/wx.h Message-ID: <45072834.1060404@mindspring.com> We include wx/wx.h in a lot of places. It seems from a (very) cursory examination that the current method is to include wx/wxprec.h. Seems to work fine including wx/wx.h so this may be entirely a non-issue. Does anyone have any feelings on this? Roy From wxruby at qualitycode.com Tue Sep 12 17:42:41 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 17:42:41 -0400 Subject: [Wxruby-users] next steps - public alpha? In-Reply-To: <45070E50.7060300@pressure.to> References: <4505EEB8.9070003@pressure.to> <4506BE6F.7040805@qualitycode.com> <45070E50.7060300@pressure.to> Message-ID: <450729D1.7050300@qualitycode.com> Alex Fenton wrote: > Shall we ask Rubyforge to migrate us? I guess I'm ready. Fingers crossed! Kevin From roys at mindspring.com Tue Sep 12 18:11:59 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 18:11:59 -0400 Subject: [Wxruby-users] Unicode Message-ID: <450730AF.4040005@mindspring.com> OK, I got a Unicode build going. I'll have to send in a patch for rakemswin.rb in order to enable compiling the unicode build. After that, I'll upload my patch for scintilla. Roy From roys at mindspring.com Tue Sep 12 18:41:35 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 18:41:35 -0400 Subject: [Wxruby-users] Scintilla Message-ID: <4507379F.2060401@mindspring.com> wxScintilla already comes with a SWIG friendly header file. I modified the rakewx and the Scintilla.i file to include it directly from the wxScintilla install. This means it's an odd-ball compared to our other classes. Does anyone see a problem with this? I think it's best to use the one supplied with the installation to avoid problems of the header file getting out of sync with the installed version. Thoughts? Roy From roys at mindspring.com Tue Sep 12 18:47:53 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 18:47:53 -0400 Subject: [Wxruby-users] Patch to wxMouseEvent.h Message-ID: <45073919.6040206@mindspring.com> This patch just applies some const tags that were missing (does this affect anything at all?) and removes a definition that was causing a conflict. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxMouseEvent.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060912/1486afa4/attachment.pl From wxruby at qualitycode.com Tue Sep 12 19:00:59 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 19:00:59 -0400 Subject: [Wxruby-users] Scintilla In-Reply-To: <4507379F.2060401@mindspring.com> References: <4507379F.2060401@mindspring.com> Message-ID: <45073C2B.8050402@qualitycode.com> Roy Sutton wrote: > wxScintilla already comes with a SWIG friendly header file. I modified > the rakewx and the Scintilla.i file to include it directly from the > wxScintilla install. This means it's an odd-ball compared to our other > classes. Does anyone see a problem with this? I think it's best to use > the one supplied with the installation to avoid problems of the header > file getting out of sync with the installed version. Thoughts? I would definitely prefer to use their SWIG file. Kevin From roys at mindspring.com Tue Sep 12 19:11:10 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 19:11:10 -0400 Subject: [Wxruby-users] Patch to wxScrolledWindow.rbw Message-ID: <45073E8E.8000305@mindspring.com> This patch removes the dc.free call that we don't support anymore. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxScrolledWindow.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060912/bbcd7604/attachment.pl From roys at mindspring.com Tue Sep 12 19:23:36 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 12 Sep 2006 19:23:36 -0400 Subject: [Wxruby-users] Patch for Unicode on windows Message-ID: <45074178.4080105@mindspring.com> This patch makes Unicode the default build for windows. You can override the default by setting a WXRUBY_NO_UNICODE environment variable. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakewx.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060912/a5259ca5/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakemswin.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060912/a5259ca5/attachment-0001.pl From wxruby at qualitycode.com Tue Sep 12 23:24:36 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 12 Sep 2006 23:24:36 -0400 Subject: [Wxruby-users] Migrated to SVN! (was: next steps - public alpha?) In-Reply-To: <450729D1.7050300@qualitycode.com> References: <4505EEB8.9070003@pressure.to> <4506BE6F.7040805@qualitycode.com> <45070E50.7060300@pressure.to> <450729D1.7050300@qualitycode.com> Message-ID: <450779F4.9010509@qualitycode.com> Kevin Smith wrote: > Alex Fenton wrote: >> Shall we ask Rubyforge to migrate us? > > I guess I'm ready. Fingers crossed! It is done. We are now using SVN instead of CVS. Woo-hoo! Tom at rubyforge said ours was one of the largest projects he has migrated so far. If you follow the SVN checkout instructions on the rubyforge wxruby SCM page, you will end up with tons and tons of stuff you don't need. Trust me, I did it. Here is the command you really want for an anonymous (readonly) checkout: svn checkout svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 And if you are a developer with write privileges, use this: svn checkout svn+ssh://xxx at rubyforge.org/var/svn/wxruby/trunk/wxruby2 (replace 'xxx' with your rubyforge login name). Either will create a wxruby2 directory under your current directory, just as a CVS checkout of the wxruby2 module used to do. As a quick test, I updated Changelog to mention that the repository was migrated to SVN. My tool (meld) and process worked flawlessly for the commit, so I think we are in good shape. I probably won't have time to integrate Roy's 3 recent patches for a day or two. All three (wxMouseEvent, wxScrolledWindow, and Unicode/Windows) look good to me, so if you (Alex) want to merge them in before I get to them, feel free. Kevin P.S. Should we post a news item about the migration? Normally, I would, but in this case it might draw more attention than we really want while we are in stealth pre-alpha mode. Thoughts? From roys at mindspring.com Wed Sep 13 02:20:04 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 13 Sep 2006 02:20:04 -0400 Subject: [Wxruby-users] RubyConstants.i.patch Message-ID: <4507A314.1020500@mindspring.com> This patch fixes up two problems with ArtProvider constants and fixes a small typo. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060913/85b7be13/attachment.ksh From sean.m.long at gmail.com Wed Sep 13 03:15:56 2006 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 13 Sep 2006 00:15:56 -0700 Subject: [Wxruby-users] ruby method names In-Reply-To: <450727D2.8090203@qualitycode.com> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> <4506E790.8080704@pressure.to> <450727D2.8090203@qualitycode.com> Message-ID: > I wonder if there's a way to hook the different classes so the accessors > are only created when a class is first referenced. Since we have > hundreds of classes, but small apps would typically only use a handful > of them, it could be a big win. Probably could do this with Object#method_missing check if matches regex and then use Module#define_method. If I had the time I would try doing it, maybe someone else can run with this idea. Sean From sean.m.long at gmail.com Wed Sep 13 03:21:35 2006 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 13 Sep 2006 00:21:35 -0700 Subject: [Wxruby-users] wx/wx.h In-Reply-To: <45072834.1060404@mindspring.com> References: <45072834.1060404@mindspring.com> Message-ID: Off the top of my head I think wx/wxprec.h only works if the platform you are on supports pre-compiled headers. So it should work fine on Mac, Win, Linux/BSD but might cause problems on other less mainstream platforms. wxWidgets might handle the possible conflict inside wxprec.h. Sean On 9/12/06, Roy Sutton wrote: > We include wx/wx.h in a lot of places. It seems from a (very) cursory > examination that the current method is to include wx/wxprec.h. Seems to > work fine including wx/wx.h so this may be entirely a non-issue. Does > anyone have any feelings on this? > > Roy > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From sean.m.long at gmail.com Wed Sep 13 03:34:31 2006 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 13 Sep 2006 00:34:31 -0700 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: <45074178.4080105@mindspring.com> References: <45074178.4080105@mindspring.com> Message-ID: The only problem I see is if on Windows wxWidgets defaults to an ascii build over a unicode build (which I think it does). So if the default for wxRuby is unicode and the user is using the default wxWidgets for Windows they are going to have build errors. Ways to handle this: - Put a note in the README for Windows users to know about this (other platforms use wx-config so wxRuby picks up what is installed). - Default to ascii and assume that anyone who wants unicode will have to set the flag in both wxWidgets and wxRuby. This also will need a note in the README. I like the second option because there is less chance of getting 'help build fails on windows' messages flooding the list from people who don't read the README. The code itself seems fine just the default setting I question. Sean On 9/12/06, Roy Sutton wrote: > This patch makes Unicode the default build for windows. You can > override the default by setting a WXRUBY_NO_UNICODE environment variable. > > Roy > > > Index: wxruby2/rake/rakewx.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/rake/rakewx.rb,v > retrieving revision 1.43 > diff -b -u -r1.43 rakewx.rb > --- wxruby2/rake/rakewx.rb 26 Aug 2006 00:10:34 -0000 1.43 > +++ wxruby2/rake/rakewx.rb 12 Sep 2006 23:21:10 -0000 > @@ -24,6 +24,10 @@ > $debug_build = ENV['WXRUBY_DEBUG'] ? true : false > $release_build = ENV['WXRUBY_RELEASE'] ? true : false > > +# Force non-unicode build with WXRUBY_NO_UNICODE. Unicode will be > +# the default build now > +$unicode_build = ENV['WXRUBY_NO_UNICODE'] ? false : true > + > $verbose_debug = ENV['WXRUBY_VERBOSE'] ? true : false > > if $release_build > @@ -32,6 +36,9 @@ > puts('Enabling DEBUG build') > end > > +if not $unicode_build > + puts('Disabling UNICODE build') > +end > > if($verbose_debug) > puts('Enabling VERBOSE debugging output') > > > Index: wxruby2/rake/rakemswin.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/rake/rakemswin.rb,v > retrieving revision 1.11 > diff -b -u -r1.11 rakemswin.rb > --- wxruby2/rake/rakemswin.rb 23 Aug 2006 21:04:11 -0000 1.11 > +++ wxruby2/rake/rakemswin.rb 12 Sep 2006 21:27:47 -0000 > @@ -21,26 +21,32 @@ > else > $DEBUGPOSTFIX='' > end > +if $unicode_build > + $UNICODEPOSTFIX='u' > +else > + $UNICODEPOSTFIX='' > +end > +$POSTFIX = $UNICODEPOSTFIX + $DEBUGPOSTFIX > > $WXSRC="#$WXDIR/src/msw" > $WXINC="#$WXDIR/include" > $WXLIBDIR="#$WXDIR/lib/vc_lib" > -$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$DEBUGPOSTFIX}" > +$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$POSTFIX}" > > -$wx_libs = "#$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}.lib" -$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_net.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_odbc.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_xml.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_adv.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_core.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_dbgrid.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_html.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_media.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_xrc.lib"+$wx_libs = "#$WXLIBDIR/wxbase26#{$POSTFIX}.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_net.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_odbc.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_xml.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_adv.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_core.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_dbgrid.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_html.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_media.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_xrc.lib" > $wx_libs += " #$WXLIBDIR/wxexpat#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxjpeg#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxpng#{$DEBUGPOSTFIX}.lib"-$wx_libs += " #$WXLIBDIR/wxregex#{$DEBUGPOSTFIX}.lib"+$wx_libs += " #$WXLIBDIR/wxregex#{$POSTFIX}.lib" > $wx_libs += " #$WXLIBDIR/wxtiff#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxzlib#{$DEBUGPOSTFIX}.lib" > > @@ -64,6 +70,9 @@ > else > $ruby_cppflags += " -DNDEBUG " > end > +if $unicode_build > + $wx_cppflags += " -D_UNICODE -DUNICODE" > +end > > $extra_libs = [ > "gdi32.lib", "winspool.lib", "comdlg32.lib", > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > From wxruby at qualitycode.com Wed Sep 13 10:34:13 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 13 Sep 2006 10:34:13 -0400 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: References: <45074178.4080105@mindspring.com> Message-ID: <450816E5.1020708@qualitycode.com> Sean Long wrote: > The only problem I see is if on Windows wxWidgets defaults to an ascii > build over a unicode build (which I think it does). So if the default > for wxRuby is unicode and the user is using the default wxWidgets for > Windows they are going to have build errors. But only if they build from source. Our gem will bundle a unicode build of wxWidgets, so for most users, including almost all non-technical users, it won't matter. I suspect we could add a test in the rakefile that could give a clear error message if you attempted to build without a unicode version of wxWidgets available. I still vote (strongly) for unicode as the wxruby default on all platforms. Kevin From roys at mindspring.com Wed Sep 13 11:34:22 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 13 Sep 2006 11:34:22 -0400 Subject: [Wxruby-users] [Fwd: Re: [Swig-user] wrapping enums for python] Message-ID: <450824FE.2020900@mindspring.com> Take a look at this message thread. I think it would be interesting/nice if our constants and enums also returned a nice name when inspected. Thoughts? Roy -------- Original Message -------- Subject: Re: [Swig-user] wrapping enums for python Date: Wed, 13 Sep 2006 17:14:50 +0200 From: Nitro To: K M , swig-user at lists.sourceforge.net References: <194b4da90609130632h66c62ed8o8035b4bc041fdb79 at mail.gmail.com> Am 13.09.2006, 15:32 Uhr, schrieb K M : > Hi, > > When printing enum wrapped to python I would like to get symbol instead > of > number. For example > > in C++: > > enum min_max > { > SS_MIN = 0, > SS_MAX = 100 > }; > > > I get: > > print swigtest.SS_MAX > 100 > > and I would like to get: > > print swigtest.SS_MAX > SS_MAX > > So the idea was to use something like: > > %pythoncode %{ > > class Enum(int): > def __new__(cls, arg, desc ): > self = int.__new__(cls, arg) > self.desc = desc > return self > def __repr__( self ): > return self.desc > > %} > > and then somehow in the .py file > > SS_MIN = Enum(_swigtest.SS_MIN, "SS_MIN") > instead of > SS_MIN = _swigtest.SS_MIN > > But the problem is that I do not know how to do > SS_MIN = Enum(_swigtest.SS_MIN, "SS_MIN") > for each define (would it be possible to use something like > %feature("pythonprepend")?) . > > Also there are C++ methods that return enums so it might be necessary to > create Enum python class in wrapper cxx file instead of py file. > (And then change SWIG_Python_SetConstant() method to create equivalent of > SS_MIN = Enum(_swigtest.SS_MIN, "SS_MIN") ). > > As I am new to SWIG (and Python as well) I wander if there is better and > simpler way how to do this. > > Thanks Maybe you can take a look here http://www.swig.org/Doc1.3/Typemaps.html#Typemaps_nn7 under point "Return value handling". You could then write a typemap which converts the returned enum to a Enum class. You could probably use %pythoncode to insert your python statement into the .py file. Just make sure you put it at the very end of your interface file. You probably even don't have to specify any of the enums by hand, just use swig's xml output and parse it to generate some code that applies your enum typemap to all enums in your code. How to do this xml/parse thing was several times on the mailing lists, search for xml and robin dunn probably. The last post was not more than a month ago. All in all I really like your idea, I thought about something similar some way back. You could extend your Enum class to cover operations such as or'ing together some elements (like const1 | const2). Personally I'd like to see this approach here as standard swig behaviour. What do you (other language maintainers for example) think? -Matthias ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Swig-user mailing list Swig-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swig-user From sdate at everestkc.net Tue Sep 12 20:54:54 2006 From: sdate at everestkc.net (Shashank Date) Date: Wed, 13 Sep 2006 06:24:54 +0530 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: References: <45074178.4080105@mindspring.com> Message-ID: <450756DE.4020900@everestkc.net> Sean Long wrote: >I like the second option because there is less chance of getting 'help >build fails on windows' messages flooding the list from people who >don't read the README. > > +1 Is there any help documentation (other than the README) for building this version on Windows? Will there be Windows binary(ies) available? Apologies if this has been discussed before. -- Shashank From roys at mindspring.com Wed Sep 13 13:28:19 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 13 Sep 2006 13:28:19 -0400 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: References: <45074178.4080105@mindspring.com> Message-ID: <45083FB3.1030804@mindspring.com> If you build using the MSVC project then you have to choose each target manually. I never did try the automatic build (or didn't get it to work). So, choosing unicode is not a big problem for me. I do think it would be a good idea to test for the library targets -and- build them into a dependency for the .lib, so if you recompile wxW you can rake a new .so file. Roy Sean Long wrote: > The only problem I see is if on Windows wxWidgets defaults to an ascii > build over a unicode build (which I think it does). So if the default > for wxRuby is unicode and the user is using the default wxWidgets for > Windows they are going to have build errors. > > Ways to handle this: > - Put a note in the README for Windows users to know about this (other > platforms use wx-config so wxRuby picks up what is installed). > - Default to ascii and assume that anyone who wants unicode will have > to set the flag in both wxWidgets and wxRuby. This also will need a > note in the README. > > I like the second option because there is less chance of getting 'help > build fails on windows' messages flooding the list from people who > don't read the README. > > The code itself seems fine just the default setting I question. > > Sean > > On 9/12/06, Roy Sutton wrote: > >> This patch makes Unicode the default build for windows. You can >> override the default by setting a WXRUBY_NO_UNICODE environment variable. >> >> Roy >> >> >> Index: wxruby2/rake/rakewx.rb >> =================================================================== >> RCS file: /var/cvs/wxruby/wxruby2/rake/rakewx.rb,v >> retrieving revision 1.43 >> diff -b -u -r1.43 rakewx.rb >> --- wxruby2/rake/rakewx.rb 26 Aug 2006 00:10:34 -0000 1.43 >> +++ wxruby2/rake/rakewx.rb 12 Sep 2006 23:21:10 -0000 >> @@ -24,6 +24,10 @@ >> $debug_build = ENV['WXRUBY_DEBUG'] ? true : false >> $release_build = ENV['WXRUBY_RELEASE'] ? true : false >> >> +# Force non-unicode build with WXRUBY_NO_UNICODE. Unicode will be >> +# the default build now >> +$unicode_build = ENV['WXRUBY_NO_UNICODE'] ? false : true >> + >> $verbose_debug = ENV['WXRUBY_VERBOSE'] ? true : false >> >> if $release_build >> @@ -32,6 +36,9 @@ >> puts('Enabling DEBUG build') >> end >> >> +if not $unicode_build >> + puts('Disabling UNICODE build') >> +end >> >> if($verbose_debug) >> puts('Enabling VERBOSE debugging output') >> >> >> Index: wxruby2/rake/rakemswin.rb >> =================================================================== >> RCS file: /var/cvs/wxruby/wxruby2/rake/rakemswin.rb,v >> retrieving revision 1.11 >> diff -b -u -r1.11 rakemswin.rb >> --- wxruby2/rake/rakemswin.rb 23 Aug 2006 21:04:11 -0000 1.11 >> +++ wxruby2/rake/rakemswin.rb 12 Sep 2006 21:27:47 -0000 >> @@ -21,26 +21,32 @@ >> else >> $DEBUGPOSTFIX='' >> end >> +if $unicode_build >> + $UNICODEPOSTFIX='u' >> +else >> + $UNICODEPOSTFIX='' >> +end >> +$POSTFIX = $UNICODEPOSTFIX + $DEBUGPOSTFIX >> >> $WXSRC="#$WXDIR/src/msw" >> $WXINC="#$WXDIR/include" >> $WXLIBDIR="#$WXDIR/lib/vc_lib" >> -$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$DEBUGPOSTFIX}" >> +$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$POSTFIX}" >> >> -$wx_libs = "#$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}.lib" -$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_net.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_odbc.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_xml.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_adv.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_core.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_dbgrid.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_html.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_media.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_xrc.lib"+$wx_libs = "#$WXLIBDIR/wxbase26#{$POSTFIX}.lib" >> +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_net.lib" >> +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_odbc.lib" >> +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_xml.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_adv.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_core.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_dbgrid.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_html.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_media.lib" >> +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_xrc.lib" >> $wx_libs += " #$WXLIBDIR/wxexpat#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxjpeg#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxpng#{$DEBUGPOSTFIX}.lib"-$wx_libs += " #$WXLIBDIR/wxregex#{$DEBUGPOSTFIX}.lib"+$wx_libs += " #$WXLIBDIR/wxregex#{$POSTFIX}.lib" >> $wx_libs += " #$WXLIBDIR/wxtiff#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxzlib#{$DEBUGPOSTFIX}.lib" >> >> @@ -64,6 +70,9 @@ >> else >> $ruby_cppflags += " -DNDEBUG " >> end >> +if $unicode_build >> + $wx_cppflags += " -D_UNICODE -DUNICODE" >> +end >> >> $extra_libs = [ >> "gdi32.lib", "winspool.lib", "comdlg32.lib", >> >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> >> >> > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Wed Sep 13 16:01:08 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 13 Sep 2006 16:01:08 -0400 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: <450756DE.4020900@everestkc.net> References: <45074178.4080105@mindspring.com> <450756DE.4020900@everestkc.net> Message-ID: <45086384.9010409@mindspring.com> Shashank Date wrote: > Is there any help documentation (other than the README) for building > this version on Windows? > Will there be Windows binary(ies) available? Apologies if this has been > discussed before. > There will be a Windows binary gem. I'll look over the help documentation for compiling on Windows and see if it needs any improvements. I did just make a note on the Wiki that says you need to set the WXWIN environment variable to build on Windows. Roy From alex at pressure.to Thu Sep 14 04:30:03 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 09:30:03 +0100 Subject: [Wxruby-users] Patch to wxScrolledWindow.rbw In-Reply-To: <45073E8E.8000305@mindspring.com> References: <45073E8E.8000305@mindspring.com> Message-ID: <4509130B.2060808@pressure.to> Committed, thanks. Roy Sutton wrote: > This patch removes the dc.free call that we don't support anymore. > ------------------------------------------------------------------------ > > Index: wxruby2/samples/bigdemo/wxScrolledWindow.rbw > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/samples/bigdemo/wxScrolledWindow.rbw,v > retrieving revision 1.4 > diff -b -u -r1.4 wxScrolledWindow.rbw > --- wxruby2/samples/bigdemo/wxScrolledWindow.rbw 13 Sep 2005 01:49:32 -0000 1.4 > +++ wxruby2/samples/bigdemo/wxScrolledWindow.rbw 12 Sep 2006 23:09:17 -0000 > @@ -106,7 +106,6 @@ > draw_saved_lines(dc) > > dc.end_drawing() > - dc.free() > end > > def draw_saved_lines(dc) > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Thu Sep 14 06:38:19 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 11:38:19 +0100 Subject: [Wxruby-users] RubyConstants.i.patch In-Reply-To: <4507A314.1020500@mindspring.com> References: <4507A314.1020500@mindspring.com> Message-ID: <4509311B.1060309@pressure.to> Committed, thanks. Anyone happen to know if SWIG 1.3.30 will fix get_icon and get_bitmap for ArtProvider? alex Roy Sutton wrote: > This patch fixes up two problems with ArtProvider constants and fixes > a small typo. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/swig/RubyConstants.i > =================================================================== > --- wxruby2/swig/RubyConstants.i (revision 528) > +++ wxruby2/swig/RubyConstants.i (working copy) > @@ -2049,15 +2049,15 @@ > > %constant const char *FILE_SELECTOR_DEFAULT_WILDCARD_STR = "*.*"; > > -%constant wxArtID ART_TOOLBAR = wxART_TOOLBAR; > -%constant wxArtID ART_MENU = wxART_MENU; > -%constant wxArtID ART_FRAME_ICON = wxART_FRAME_ICON; > -%constant wxArtID ART_CMN_DIALOG = wxART_CMN_DIALOG; > -%constant wxArtID ART_HELP_BROWSER = wxART_HELP_BROWSER; > -%constant wxArtID ART_MESSAGE_BOX = wxART_MESSAGE_BOX; > -%constant wxArtID ART_OTHER = wxART_OTHER; > +%constant wxArtClient ART_TOOLBAR = wxART_TOOLBAR; > +%constant wxArtClient ART_MENU = wxART_MENU; > +%constant wxArtClient ART_FRAME_ICON = wxART_FRAME_ICON; > +%constant wxArtClient ART_CMN_DIALOG = wxART_CMN_DIALOG; > +%constant wxArtClient ART_HELP_BROWSER = wxART_HELP_BROWSER; > +%constant wxArtClient ART_MESSAGE_BOX = wxART_MESSAGE_BOX; > +%constant wxArtClient ART_OTHER = wxART_OTHER; > > -%constant wxString ART_ADD_BOOKMARK = wxART_ADD_BOOKMARK; > +%constant wxArtID ART_ADD_BOOKMARK = wxART_ADD_BOOKMARK; > %constant wxArtID ART_DEL_BOOKMARK = wxART_DEL_BOOKMARK; > %constant wxArtID ART_HELP_SIDE_PANEL = wxART_HELP_SIDE_PANEL; > %constant wxArtID ART_HELP_SETTINGS = wxART_HELP_SETTINGS; > @@ -2088,8 +2088,18 @@ > %constant wxArtID ART_WARNING = wxART_WARNING; > %constant wxArtID ART_INFORMATION = wxART_INFORMATION; > %constant wxArtID ART_MISSING_IMAGE = wxART_MISSING_IMAGE; > +%constant wxArtID ART_COPY = wxART_COPY; > +%constant wxArtID ART_CUT = wxART_CUT; > +%constant wxArtID ART_PASTE = wxART_PASTE; > +%constant wxArtID ART_DELETE = wxART_DELETE; > +%constant wxArtID ART_NEW = wxART_NEW; > +%constant wxArtID ART_UNDO = wxART_UNDO; > +%constant wxArtID ART_REDO = wxART_REDO; > +%constant wxArtID ART_QUIT = wxART_QUIT; > +%constant wxArtID ART_FIND = wxART_FIND; > +%constant wxArtID ART_FIND_AND_REPLACE = wxART_FIND_AND_REPLACE; > > -%constant const int LAYOUT_UNCONSTRAIINED = wxUnconstrained; > +%constant const int LAYOUT_UNCONSTRAINED = wxUnconstrained; > %constant const int LAYOUT_AS_IS = wxAsIs; > %constant const int LAYOUT_PERCENT_OF = wxPercentOf; > %constant const int LAYOUT_ABOVE = wxAbove; > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Thu Sep 14 06:40:00 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 11:40:00 +0100 Subject: [Wxruby-users] Patch to wxMouseEvent.h In-Reply-To: <45073919.6040206@mindspring.com> References: <45073919.6040206@mindspring.com> Message-ID: <45093180.9010108@pressure.to> committed, thanks Roy Sutton wrote: > This patch just applies some const tags that were missing (does this > affect anything at all?) and removes a definition that was causing a > conflict. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/swig/classes/include/wxMouseEvent.h > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/swig/classes/include/wxMouseEvent.h,v > retrieving revision 1.5 > diff -b -u -r1.5 wxMouseEvent.h > --- wxruby2/swig/classes/include/wxMouseEvent.h 3 Sep 2005 20:21:46 -0000 1.5 > +++ wxruby2/swig/classes/include/wxMouseEvent.h 12 Sep 2006 22:46:14 -0000 > @@ -8,24 +8,26 @@ > public: > wxMouseEvent(wxEventType mouseEventType = 0) ; > wxMouseEvent(const wxMouseEvent& event) ; > - bool AltDown() ; > - bool Button(int button ) ; > - bool ButtonDClick(int but = wxMOUSE_BTN_ANY) ; > - bool ButtonDown(int but = -1) ; > - bool ButtonUp(int but = -1) ; > - bool ControlDown() ; > - bool Dragging() ; > - bool Entering() ; > + bool AltDown() const; > + bool Button(int button ) const; > + bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const; > + bool ButtonDown(int but = -1) const; > + bool ButtonIsDown(int but) const; > + bool ButtonUp(int but = -1) const; > + bool ControlDown() const; > + bool Dragging() const; > + bool Entering() const; > int GetButton() const; > wxPoint GetPosition() const; > - void GetPosition(wxCoord* x , wxCoord* y ) const; > + // wxCoord is typedef'd to int and interferes with one below > + //void GetPosition(wxCoord* x , wxCoord* y ) const; > void GetPosition(long* x , long* y ) const; > wxPoint GetLogicalPosition(const wxDC& dc ) const; > int GetLinesPerAction() const; > int GetWheelRotation() const; > int GetWheelDelta() const; > long GetX() const; > - long GetY() ; > + long GetY() const; > bool IsButton() const; > bool IsPageScroll() const; > bool Leaving() const; > @@ -49,5 +51,4 @@ > virtual wxEvent* Clone() const; > }; > > - > #endif > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Thu Sep 14 09:55:28 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 09:55:28 -0400 Subject: [Wxruby-users] RubyConstants.i.patch In-Reply-To: <4509311B.1060309@pressure.to> References: <4507A314.1020500@mindspring.com> <4509311B.1060309@pressure.to> Message-ID: <45095F50.1060005@mindspring.com> I don't know that the problem is SWIG at all and, in fact, ArtProvider is what I'm working on now. Does anyone know what that cryptic message means? So that everyone knows, I'm working on bigdemo's ArtProvider example. It's been a real grind getting it to work. I'm still slogging away but think that I'm really close now. I decided to go through all the wxPython examples alphabetically and implement the ones for which we had an implementation. The first one I hit was ArtProvider (lucky me!). Someone else might want to pick another letter and give it a go. Roy Alex Fenton wrote: > Committed, thanks. > > Anyone happen to know if SWIG 1.3.30 will fix get_icon and get_bitmap > for ArtProvider? > > alex > > Roy Sutton wrote: > >> This patch fixes up two problems with ArtProvider constants and fixes >> a small typo. >> >> Roy >> ------------------------------------------------------------------------ >> >> Index: wxruby2/swig/RubyConstants.i >> =================================================================== >> --- wxruby2/swig/RubyConstants.i (revision 528) >> +++ wxruby2/swig/RubyConstants.i (working copy) >> @@ -2049,15 +2049,15 @@ >> >> %constant const char *FILE_SELECTOR_DEFAULT_WILDCARD_STR = "*.*"; >> >> -%constant wxArtID ART_TOOLBAR = wxART_TOOLBAR; >> -%constant wxArtID ART_MENU = wxART_MENU; >> -%constant wxArtID ART_FRAME_ICON = wxART_FRAME_ICON; >> -%constant wxArtID ART_CMN_DIALOG = wxART_CMN_DIALOG; >> -%constant wxArtID ART_HELP_BROWSER = wxART_HELP_BROWSER; >> -%constant wxArtID ART_MESSAGE_BOX = wxART_MESSAGE_BOX; >> -%constant wxArtID ART_OTHER = wxART_OTHER; >> +%constant wxArtClient ART_TOOLBAR = wxART_TOOLBAR; >> +%constant wxArtClient ART_MENU = wxART_MENU; >> +%constant wxArtClient ART_FRAME_ICON = wxART_FRAME_ICON; >> +%constant wxArtClient ART_CMN_DIALOG = wxART_CMN_DIALOG; >> +%constant wxArtClient ART_HELP_BROWSER = wxART_HELP_BROWSER; >> +%constant wxArtClient ART_MESSAGE_BOX = wxART_MESSAGE_BOX; >> +%constant wxArtClient ART_OTHER = wxART_OTHER; >> >> -%constant wxString ART_ADD_BOOKMARK = wxART_ADD_BOOKMARK; >> +%constant wxArtID ART_ADD_BOOKMARK = wxART_ADD_BOOKMARK; >> %constant wxArtID ART_DEL_BOOKMARK = wxART_DEL_BOOKMARK; >> %constant wxArtID ART_HELP_SIDE_PANEL = wxART_HELP_SIDE_PANEL; >> %constant wxArtID ART_HELP_SETTINGS = wxART_HELP_SETTINGS; >> @@ -2088,8 +2088,18 @@ >> %constant wxArtID ART_WARNING = wxART_WARNING; >> %constant wxArtID ART_INFORMATION = wxART_INFORMATION; >> %constant wxArtID ART_MISSING_IMAGE = wxART_MISSING_IMAGE; >> +%constant wxArtID ART_COPY = wxART_COPY; >> +%constant wxArtID ART_CUT = wxART_CUT; >> +%constant wxArtID ART_PASTE = wxART_PASTE; >> +%constant wxArtID ART_DELETE = wxART_DELETE; >> +%constant wxArtID ART_NEW = wxART_NEW; >> +%constant wxArtID ART_UNDO = wxART_UNDO; >> +%constant wxArtID ART_REDO = wxART_REDO; >> +%constant wxArtID ART_QUIT = wxART_QUIT; >> +%constant wxArtID ART_FIND = wxART_FIND; >> +%constant wxArtID ART_FIND_AND_REPLACE = wxART_FIND_AND_REPLACE; >> >> -%constant const int LAYOUT_UNCONSTRAIINED = wxUnconstrained; >> +%constant const int LAYOUT_UNCONSTRAINED = wxUnconstrained; >> %constant const int LAYOUT_AS_IS = wxAsIs; >> %constant const int LAYOUT_PERCENT_OF = wxPercentOf; >> %constant const int LAYOUT_ABOVE = wxAbove; >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From alex at pressure.to Thu Sep 14 11:15:25 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 16:15:25 +0100 Subject: [Wxruby-users] Patch for Unicode on windows In-Reply-To: <45074178.4080105@mindspring.com> References: <45074178.4080105@mindspring.com> Message-ID: <4509720D.3050803@pressure.to> committed, thanks alex Roy Sutton wrote: > This patch makes Unicode the default build for windows. You can > override the default by setting a WXRUBY_NO_UNICODE environment variable. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/rake/rakewx.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/rake/rakewx.rb,v > retrieving revision 1.43 > diff -b -u -r1.43 rakewx.rb > --- wxruby2/rake/rakewx.rb 26 Aug 2006 00:10:34 -0000 1.43 > +++ wxruby2/rake/rakewx.rb 12 Sep 2006 23:21:10 -0000 > @@ -24,6 +24,10 @@ > $debug_build = ENV['WXRUBY_DEBUG'] ? true : false > $release_build = ENV['WXRUBY_RELEASE'] ? true : false > > +# Force non-unicode build with WXRUBY_NO_UNICODE. Unicode will be > +# the default build now > +$unicode_build = ENV['WXRUBY_NO_UNICODE'] ? false : true > + > $verbose_debug = ENV['WXRUBY_VERBOSE'] ? true : false > > if $release_build > @@ -32,6 +36,9 @@ > puts('Enabling DEBUG build') > end > > +if not $unicode_build > + puts('Disabling UNICODE build') > +end > > if($verbose_debug) > puts('Enabling VERBOSE debugging output') > > ------------------------------------------------------------------------ > > Index: wxruby2/rake/rakemswin.rb > =================================================================== > RCS file: /var/cvs/wxruby/wxruby2/rake/rakemswin.rb,v > retrieving revision 1.11 > diff -b -u -r1.11 rakemswin.rb > --- wxruby2/rake/rakemswin.rb 23 Aug 2006 21:04:11 -0000 1.11 > +++ wxruby2/rake/rakemswin.rb 12 Sep 2006 21:27:47 -0000 > @@ -21,26 +21,32 @@ > else > $DEBUGPOSTFIX='' > end > +if $unicode_build > + $UNICODEPOSTFIX='u' > +else > + $UNICODEPOSTFIX='' > +end > +$POSTFIX = $UNICODEPOSTFIX + $DEBUGPOSTFIX > > $WXSRC="#$WXDIR/src/msw" > $WXINC="#$WXDIR/include" > $WXLIBDIR="#$WXDIR/lib/vc_lib" > -$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$DEBUGPOSTFIX}" > +$INCTEMP="#$WXDIR/lib/vc_lib/msw#{$POSTFIX}" > > -$wx_libs = "#$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}.lib" -$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_net.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_odbc.lib"-$wx_libs += " #$WXLIBDIR/wxbase26#{$DEBUGPOSTFIX}_xml.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_adv.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_core.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_dbgrid.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_html.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_media.lib"-$wx_libs += " #$WXLIBDIR/wxmsw26#{$DEBUGPOSTFIX}_xrc.lib"+$wx_libs = "#$WXLIBDIR/wxbase26#{$POSTFIX}.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_net.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_odbc.lib" > +$wx_libs += " #$WXLIBDIR/wxbase26#{$POSTFIX}_xml.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_adv.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_core.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_dbgrid.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_html.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_media.lib" > +$wx_libs += " #$WXLIBDIR/wxmsw26#{$POSTFIX}_xrc.lib" > $wx_libs += " #$WXLIBDIR/wxexpat#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxjpeg#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxpng#{$DEBUGPOSTFIX}.lib"-$wx_libs += " #$WXLIBDIR/wxregex#{$DEBUGPOSTFIX}.lib"+$wx_libs += " #$WXLIBDIR/wxregex#{$POSTFIX}.lib" > $wx_libs += " #$WXLIBDIR/wxtiff#{$DEBUGPOSTFIX}.lib" $wx_libs += " #$WXLIBDIR/wxzlib#{$DEBUGPOSTFIX}.lib" > > @@ -64,6 +70,9 @@ > else > $ruby_cppflags += " -DNDEBUG " > end > +if $unicode_build > + $wx_cppflags += " -D_UNICODE -DUNICODE" > +end > > $extra_libs = [ > "gdi32.lib", "winspool.lib", "comdlg32.lib", > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Thu Sep 14 11:42:28 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 11:42:28 -0400 Subject: [Wxruby-users] ArtProvider Message-ID: <45097864.7010703@mindspring.com> I got ArtProvider working. Now I'm cleaning it up. I do think I'm going to run into a small snag that I'll have to tackle. The problem is the wxART_* constants are just strings and when SWIG tries to make constants from them it messes them up royally. We can get the correct behavior by making them const char *'s. I'll try to make this Unicode compatible and post it. Roy From roys at mindspring.com Thu Sep 14 17:20:41 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 17:20:41 -0400 Subject: [Wxruby-users] Patch to fix ArtProvider and ArtProvider sample Message-ID: <4509C7A9.90006@mindspring.com> These patches better implement ArtProvider and add the demo for it. I also expanded the bigdemo window a little bit. I really think we should go larger but I suppose there might be some people at 800x600 still. Note that creating your own art provider still doesn't quite work correctly. I didn't have time to get into that. The RubyConstants.i.patch file looks weird. Not sure why SVN did that. If it doesn't apply, let me know. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7c8deff6/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typedefs.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7c8deff6/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ArtProvider.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7c8deff6/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxArtProvider.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7c8deff6/attachment-0003.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7c8deff6/attachment-0004.pl From roys at mindspring.com Thu Sep 14 17:34:54 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 17:34:54 -0400 Subject: [Wxruby-users] Patch to fix ArtProvider and ArtProvider sample In-Reply-To: <4509C7A9.90006@mindspring.com> References: <4509C7A9.90006@mindspring.com> Message-ID: <4509CAFE.4030706@mindspring.com> Fixed RubyConstants.i.patch. No idea why SVN did that. It messed up the file on disk. Roy Roy Sutton wrote: > These patches better implement ArtProvider and add the demo for it. I > also expanded the bigdemo window a little bit. I really think we > should go larger but I suppose there might be some people at 800x600 > still. Note that creating your own art provider still doesn't quite > work correctly. I didn't have time to get into that. > > The RubyConstants.i.patch file looks weird. Not sure why SVN did > that. If it doesn't apply, let me know. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/swig/RubyConstants.i > =================================================================== > --- wxruby2/swig/RubyConstants.i (revision 534) > +++ wxruby2/swig/RubyConstants.i (working copy) > @@ -2049,6 +2049,11 @@ > > %constant const char *FILE_SELECTOR_DEFAULT_WILDCARD_STR = "*.*"; > > +<<<<<<< .mine > +// Hack: SWIG Ruby doesn't handle unicode constants, so we redeclare as ASCII > +#define wxART_MAKE_CLIENT_ID(id) #id "_C" > +#define wxART_MAKE_ART_ID(id) #id > +======= > %constant wxArtClient ART_TOOLBAR = wxART_TOOLBAR; > %constant wxArtClient ART_MENU = wxART_MENU; > %constant wxArtClient ART_FRAME_ICON = wxART_FRAME_ICON; > @@ -2056,7 +2061,18 @@ > %constant wxArtClient ART_HELP_BROWSER = wxART_HELP_BROWSER; > %constant wxArtClient ART_MESSAGE_BOX = wxART_MESSAGE_BOX; > %constant wxArtClient ART_OTHER = wxART_OTHER; > +>>>>>>> .r534 > > +<<<<<<< .mine > +%constant /* wxArtClient */ const char * ART_TOOLBAR = wxART_MAKE_CLIENT_ID(wxART_TOOLBAR); > +%constant /* wxArtClient */ const char * ART_MENU = wxART_MAKE_CLIENT_ID(wxART_MENU); > +%constant /* wxArtClient */ const char * ART_FRAME_ICON = wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON); > +%constant /* wxArtClient */ const char * ART_CMN_DIALOG = wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG); > +%constant /* wxArtClient */ const char * ART_HELP_BROWSER = wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER); > +%constant /* wxArtClient */ const char * ART_MESSAGE_BOX = wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX); > +%constant /* wxArtClient */ const char * ART_BUTTON = wxART_MAKE_CLIENT_ID(wxART_BUTTON); > +%constant /* wxArtClient */ const char * ART_OTHER = wxART_MAKE_CLIENT_ID(wxART_OTHER); > +======= > %constant wxArtID ART_ADD_BOOKMARK = wxART_ADD_BOOKMARK; > %constant wxArtID ART_DEL_BOOKMARK = wxART_DEL_BOOKMARK; > %constant wxArtID ART_HELP_SIDE_PANEL = wxART_HELP_SIDE_PANEL; > @@ -2088,6 +2104,7 @@ > %constant wxArtID ART_WARNING = wxART_WARNING; > %constant wxArtID ART_INFORMATION = wxART_INFORMATION; > %constant wxArtID ART_MISSING_IMAGE = wxART_MISSING_IMAGE; > +>>>>>>> .r534 > %constant wxArtID ART_COPY = wxART_COPY; > %constant wxArtID ART_CUT = wxART_CUT; > %constant wxArtID ART_PASTE = wxART_PASTE; > @@ -2099,7 +2116,60 @@ > %constant wxArtID ART_FIND = wxART_FIND; > %constant wxArtID ART_FIND_AND_REPLACE = wxART_FIND_AND_REPLACE; > > +<<<<<<< .mine > +%constant /* wxArtID */ const char * ART_ADD_BOOKMARK = wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK); > +%constant /* wxArtID */ const char * ART_DEL_BOOKMARK = wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK); > +%constant /* wxArtID */ const char * ART_HELP_SIDE_PANEL = wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL); > +%constant /* wxArtID */ const char * ART_HELP_SETTINGS = wxART_MAKE_ART_ID(wxART_HELP_SETTINGS); > +%constant /* wxArtID */ const char * ART_HELP_BOOK = wxART_MAKE_ART_ID(wxART_HELP_BOOK); > +%constant /* wxArtID */ const char * ART_HELP_FOLDER = wxART_MAKE_ART_ID(wxART_HELP_FOLDER); > +%constant /* wxArtID */ const char * ART_HELP_PAGE = wxART_MAKE_ART_ID(wxART_HELP_PAGE); > +%constant /* wxArtID */ const char * ART_GO_BACK = wxART_MAKE_ART_ID(wxART_GO_BACK); > +%constant /* wxArtID */ const char * ART_GO_FORWARD = wxART_MAKE_ART_ID(wxART_GO_FORWARD); > +%constant /* wxArtID */ const char * ART_GO_UP = wxART_MAKE_ART_ID(wxART_GO_UP); > +%constant /* wxArtID */ const char * ART_GO_DOWN = wxART_MAKE_ART_ID(wxART_GO_DOWN); > +%constant /* wxArtID */ const char * ART_GO_TO_PARENT = wxART_MAKE_ART_ID(wxART_GO_TO_PARENT); > +%constant /* wxArtID */ const char * ART_GO_HOME = wxART_MAKE_ART_ID(wxART_GO_HOME); > +%constant /* wxArtID */ const char * ART_FILE_OPEN = wxART_MAKE_ART_ID(wxART_FILE_OPEN); > +%constant /* wxArtID */ const char * ART_FILE_SAVE = wxART_MAKE_ART_ID(wxART_FILE_SAVE); > +%constant /* wxArtID */ const char * ART_FILE_SAVE_AS = wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS); > +%constant /* wxArtID */ const char * ART_PRINT = wxART_MAKE_ART_ID(wxART_PRINT); > +%constant /* wxArtID */ const char * ART_HELP = wxART_MAKE_ART_ID(wxART_HELP); > +%constant /* wxArtID */ const char * ART_TIP = wxART_MAKE_ART_ID(wxART_TIP); > +%constant /* wxArtID */ const char * ART_REPORT_VIEW = wxART_MAKE_ART_ID(wxART_REPORT_VIEW); > +%constant /* wxArtID */ const char * ART_LIST_VIEW = wxART_MAKE_ART_ID(wxART_LIST_VIEW); > +%constant /* wxArtID */ const char * ART_NEW_DIR = wxART_MAKE_ART_ID(wxART_NEW_DIR); > +%constant /* wxArtID */ const char * ART_HARDDISK = wxART_MAKE_ART_ID(wxART_HARDDISK); > +%constant /* wxArtID */ const char * ART_FLOPPY = wxART_MAKE_ART_ID(wxART_FLOPPY); > +%constant /* wxArtID */ const char * ART_CDROM = wxART_MAKE_ART_ID(wxART_CDROM); > +%constant /* wxArtID */ const char * ART_REMOVABLE = wxART_MAKE_ART_ID(wxART_REMOVABLE); > +%constant /* wxArtID */ const char * ART_FOLDER = wxART_MAKE_ART_ID(wxART_FOLDER); > +%constant /* wxArtID */ const char * ART_FOLDER_OPEN = wxART_MAKE_ART_ID(wxART_FOLDER_OPEN); > +%constant /* wxArtID */ const char * ART_GO_DIR_UP = wxART_MAKE_ART_ID(wxART_GO_DIR_UP); > +%constant /* wxArtID */ const char * ART_EXECUTABLE_FILE = wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE); > +%constant /* wxArtID */ const char * ART_NORMAL_FILE = wxART_MAKE_ART_ID(wxART_NORMAL_FILE); > +%constant /* wxArtID */ const char * ART_TICK_MARK = wxART_MAKE_ART_ID(wxART_TICK_MARK); > +%constant /* wxArtID */ const char * ART_CROSS_MARK = wxART_MAKE_ART_ID(wxART_CROSS_MARK); > +%constant /* wxArtID */ const char * ART_ERROR = wxART_MAKE_ART_ID(wxART_ERROR); > +%constant /* wxArtID */ const char * ART_QUESTION = wxART_MAKE_ART_ID(wxART_QUESTION); > +%constant /* wxArtID */ const char * ART_WARNING = wxART_MAKE_ART_ID(wxART_WARNING); > +%constant /* wxArtID */ const char * ART_INFORMATION = wxART_MAKE_ART_ID(wxART_INFORMATION); > +%constant /* wxArtID */ const char * ART_MISSING_IMAGE = wxART_MAKE_ART_ID(wxART_MISSING_IMAGE); > +%constant /* wxArtID */ const char * ART_COPY = wxART_MAKE_ART_ID(wxART_COPY); > +%constant /* wxArtID */ const char * ART_CUT = wxART_MAKE_ART_ID(wxART_CUT); > +%constant /* wxArtID */ const char * ART_PASTE = wxART_MAKE_ART_ID(wxART_PASTE); > +%constant /* wxArtID */ const char * ART_DELETE = wxART_MAKE_ART_ID(wxART_DELETE); > +%constant /* wxArtID */ const char * ART_NEW = wxART_MAKE_ART_ID(wxART_NEW); > +%constant /* wxArtID */ const char * ART_UNDO = wxART_MAKE_ART_ID(wxART_UNDO); > +%constant /* wxArtID */ const char * ART_REDO = wxART_MAKE_ART_ID(wxART_REDO); > +%constant /* wxArtID */ const char * ART_QUIT = wxART_MAKE_ART_ID(wxART_QUIT); > +%constant /* wxArtID */ const char * ART_FIND = wxART_MAKE_ART_ID(wxART_FIND); > +%constant /* wxArtID */ const char * ART_FIND_AND_REPLACE = wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE); > + > %constant const int LAYOUT_UNCONSTRAINED = wxUnconstrained; > +======= > +%constant const int LAYOUT_UNCONSTRAINED = wxUnconstrained; > +>>>>>>> .r534 > %constant const int LAYOUT_AS_IS = wxAsIs; > %constant const int LAYOUT_PERCENT_OF = wxPercentOf; > %constant const int LAYOUT_ABOVE = wxAbove; > > ------------------------------------------------------------------------ > > Index: wxruby2/swig/typedefs.i > =================================================================== > --- wxruby2/swig/typedefs.i (revision 534) > +++ wxruby2/swig/typedefs.i (working copy) > @@ -12,3 +12,5 @@ > enum wxCalendarDateBorder; > typedef signed char wxDash; > typedef long wxTextPos; > +typedef wxString wxArtClient; > +typedef wxString wxArtID; > > ------------------------------------------------------------------------ > > Index: wxruby2/swig/classes/ArtProvider.i > =================================================================== > --- wxruby2/swig/classes/ArtProvider.i (revision 534) > +++ wxruby2/swig/classes/ArtProvider.i (working copy) > @@ -5,10 +5,6 @@ > > %module(directors="1") wxArtProvider > > -# The following are not yet compatible with SWIG 1.3.29 > -%ignore GetBitmap; > -%ignore GetIcon; > - > %rename(ArtProvider) wxRubyArtProvider; > > %import "include/wxObject.h" > @@ -47,6 +43,20 @@ > return wxNullBitmap; > return result; > } > + > + static wxBitmap GetBitmap(const wxArtID& id, > + const wxArtClient& client, > + const wxSize& size) > + { > + return wxArtProvider::GetBitmap(id, client, size); > + } > + > + static wxIcon wxRubyArtProvider::GetIcon(const wxArtID& id, > + const wxArtClient& client, > + const wxSize& size) > + { > + return wxArtProvider::GetIcon(id, client, size); > + } > }; > > > > ------------------------------------------------------------------------ > > require 'wx' > > ArtClients = [ "Wx::ART_TOOLBAR", > "Wx::ART_MENU", > "Wx::ART_FRAME_ICON", > "Wx::ART_CMN_DIALOG", > "Wx::ART_HELP_BROWSER", > "Wx::ART_MESSAGE_BOX", > "Wx::ART_OTHER", > ] > > ArtIDs = [ "Wx::ART_ADD_BOOKMARK", > "Wx::ART_DEL_BOOKMARK", > "Wx::ART_HELP_SIDE_PANEL", > "Wx::ART_HELP_SETTINGS", > "Wx::ART_HELP_BOOK", > "Wx::ART_HELP_FOLDER", > "Wx::ART_HELP_PAGE", > "Wx::ART_GO_BACK", > "Wx::ART_GO_FORWARD", > "Wx::ART_GO_UP", > "Wx::ART_GO_DOWN", > "Wx::ART_GO_TO_PARENT", > "Wx::ART_GO_HOME", > "Wx::ART_FILE_OPEN", > "Wx::ART_FILE_SAVE", > "Wx::ART_FILE_SAVE_AS", > "Wx::ART_PRINT", > "Wx::ART_HELP", > "Wx::ART_TIP", > "Wx::ART_REPORT_VIEW", > "Wx::ART_LIST_VIEW", > "Wx::ART_NEW_DIR", > "Wx::ART_HARDDISK", > "Wx::ART_FLOPPY", > "Wx::ART_CDROM", > "Wx::ART_REMOVABLE", > "Wx::ART_FOLDER", > "Wx::ART_FOLDER_OPEN", > "Wx::ART_GO_DIR_UP", > "Wx::ART_EXECUTABLE_FILE", > "Wx::ART_NORMAL_FILE", > "Wx::ART_TICK_MARK", > "Wx::ART_CROSS_MARK", > "Wx::ART_ERROR", > "Wx::ART_QUESTION", > "Wx::ART_WARNING", > "Wx::ART_INFORMATION", > "Wx::ART_MISSING_IMAGE", > "Wx::ART_COPY", > "Wx::ART_CUT", > "Wx::ART_PASTE", > "Wx::ART_DELETE", > "Wx::ART_NEW", > "Wx::ART_UNDO", > "Wx::ART_REDO", > "Wx::ART_QUIT", > "Wx::ART_FIND", > "Wx::ART_FIND_AND_REPLACE", > ] > > class MyArtProvider < Wx::ArtProvider > def initialize(log) > super() > @log = log > end > > def CreateBitmap(artid, client, size) > # You can do anything here you want, such as using the same > # image for any size, any client, etc., or using specific > # images for specific sizes, whatever... > > # See end of file for the image data > > bmp = Wx::Bitmap.new > # use this one for all 48x48 images > if size.width == 48: > bmp = make_bitmap("smile48.png") > > # but be more specific for these > elsif size.width == 16 and artid == wx.ART_ADD_BOOKMARK: > bmp = make_bitmap("smile16.png") > elsif size.width == 32 and artid == wx.ART_ADD_BOOKMARK: > bmp = make_bitmap("smile32.png") > > # and just ignore the size for these > elsif artid == Wx::ART_GO_BACK: > bmp = make_bitmap("left.png") > #elsif artid == Wx::ART_GO_FORWARD: > # bmp = make_bitmap("right.png") > #elsif artid == Wx::ART_GO_UP: > # bmp = make_bitmap("up.png") > elsif artid == Wx::ART_GO_DOWN: > bmp = make_bitmap("down.png") > elsif artid == Wx::ART_GO_TO_PARENT: > bmp = make_bitmap("back.png") > > #elsif artid == Wx::ART_CROSS_MARK: > # bmp = make_bitmap("cross.png") > #elsif artid == Wx::ART_TICK_MARK: > # bmp = make_bitmap("tick.png") > end > > if bmp.ok > @log.write_text("MyArtProvider: providing #{artid}:#{client} at #{size.x}x#{size.y}") > end > bmp > end > > def make_bitmap(f) > Wx::Bitmap.new(Wx::Image.new(f)) > end > end > > class TestPanel < Wx::Panel > def initialize(parent, log) > super(parent, -1, Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, Wx::NO_FULL_REPAINT_ON_RESIZE) > @log = log > > sizer = Wx::BoxSizer.new(Wx::VERTICAL) > > title = Wx::StaticText.new(self, -1, "ArtProvider") > title.set_font(Wx::Font.new(18, Wx::SWISS, Wx::NORMAL, Wx::BOLD)) > sizer.add(title, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > line = Wx::StaticLine.new(self, -1, Wx::DEFAULT_POSITION, Wx::Size.new(20,-1), Wx::LI_HORIZONTAL) > sizer.add(line, 0, Wx::GROW|Wx::ALIGN_CENTER_VERTICAL|Wx::ALL, 5) > > fgs = Wx::FlexGridSizer.new(0, 3, 10, 10) > > combo = Wx::ComboBox.new(self, -1, "", Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, > ArtClients, Wx::CB_DROPDOWN|Wx::CB_READONLY) > fgs.add(combo, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > evt_combobox(combo.get_id) { |event| on_select_client(event) } > combo.set_selection(0) > > combo = Wx::ComboBox.new(self, -1, "", Wx::DEFAULT_POSITION, Wx::DEFAULT_SIZE, > ArtIDs, Wx::CB_DROPDOWN|Wx::CB_READONLY) > fgs.add(combo, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > evt_combobox(combo.get_id) { |event| on_select_id(event) } > combo.set_selection(0) > > # Custom provider not currently working > #cb = Wx::CheckBox.new(self, -1, "Use custom provider") > #fgs.add(cb, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > #evt_checkbox(cb.get_id) { |event| on_use_custom(event) } > # One extra spacer to account for missing checkbox > fgs.add(10, 10, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > fgs.add(10, 10, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > fgs.add(10, 10, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > fgs.add(10, 10, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > box = Wx::BoxSizer.new(Wx::VERTICAL) > bmp = Wx::Bitmap.new(16,16) > @bmp16 = Wx::StaticBitmap.new(self, -1, bmp, Wx::DEFAULT_POSITION) > box.add(@bmp16, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > text = Wx::StaticText.new(self, -1, "16x16") > box.add(text, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > fgs.add(box, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > box = Wx::BoxSizer.new(Wx::VERTICAL) > bmp = Wx::Bitmap.new(32,32) > @bmp32 = Wx::StaticBitmap.new(self, -1, bmp, Wx::DEFAULT_POSITION) > box.add(@bmp32, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > text = Wx::StaticText.new(self, -1, "32x32") > box.add(text, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > fgs.add(box, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > box = Wx::BoxSizer.new(Wx::VERTICAL) > bmp = Wx::Bitmap.new(48,48) > @bmp48 = Wx::StaticBitmap.new(self, -1, bmp, Wx::DEFAULT_POSITION) > box.add(@bmp48, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > text = Wx::StaticText.new(self, -1, "48x48") > box.add(text, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > > fgs.add(box, 0, Wx::ALIGN_CENTRE|Wx::ALL, 5) > sizer.add(fgs, 0, Wx::ALL, 5) > set_sizer(sizer) > > @client = eval(ArtClients[0]) > @artid = eval(ArtIDs[0]) > get_art > end > > def on_select_client(evt) > @log.write_text("on_select_client") > @client = eval(evt.get_string) > get_art > end > > > def on_select_id(evt) > @log.write_text("on_select_id") > @artid = eval(evt.get_string) > get_art > end > > > def on_use_custom(evt) > if evt.is_checked > @log.write_text("Images will now be provided by MyArtProvider") > Wx::ArtProvider.push_provider( MyArtProvider.new(@log) ) > else > @log.write_text("MyArtProvider deactivated\n") > Wx::ArtProvider.pop_provider > end > get_art > end > > > def get_art > @log.write_text("Getting art for #{@client}:#{@artid}") > > bmp = Wx::ArtProvider.get_bitmap(@artid, @client, Wx::Size.new(16,16)) > > if not bmp.ok > bmp = Wx::Bitmap.new(16,16) > clear_bmp(bmp) > end > > @bmp16.set_bitmap(bmp) > > bmp = Wx::ArtProvider::get_bitmap(@artid, @client, Wx::Size.new(32,32)) > > if not bmp.ok > bmp = Wx::Bitmap.new(32,32) > clear_bmp(bmp) > end > > @bmp32.set_bitmap(bmp) > > bmp = Wx::ArtProvider::get_bitmap(@artid, @client, Wx::Size.new(48,48)) > > if not bmp.ok > bmp = Wx::Bitmap.new(48,48) > clear_bmp(bmp) > end > > @bmp48.set_bitmap(bmp) > end > > > def clear_bmp(bmp) > dc = Wx::MemoryDC.new > dc.select_object(bmp) > dc.set_background(Wx::WHITE_BRUSH) > dc.clear > end > end > > module Demo > > def Demo.run(frame, nb, log) > win = TestPanel.new(nb, log) > return win > end > > def Demo.overview > return 'Wx::ArtProvider class can be used to customize the look of wxWindows > applications. When wxWindows internal classes need to display an icon > or a bitmap (e.g. in the standard file dialog), it does not use a > hard-coded resource but asks Wx::ArtProvider for it instead. This way > the users can plug in their own Wx::ArtProvider class and easily replace > standard art with his/her own version. It is easy thing to do: all > that is needed is to derive a class from Wx::ArtProvider, override its > CreateBitmap method and register the provider with > Wx::ArtProvider.push_provider. > > This class can also be used to get the platform native icons as > provided by Wx::ArtProvider.get_bitmap or Wx::ArtProvider.get_icon methods.' > > end > > end > > ------------------------------------------------------------------------ > > Index: wxruby2/samples/bigdemo/bigdemo.rb > =================================================================== > --- wxruby2/samples/bigdemo/bigdemo.rb (revision 528) > +++ wxruby2/samples/bigdemo/bigdemo.rb (working copy) > @@ -155,14 +155,14 @@ > #~ ]], > > # Images > - #['Using Images', [ > + ['Using Images', [ > # 'Throbber', > - # 'wxArtProvider', > + 'wxArtProvider', > # 'wxDragImage', > # 'wxImage', > # 'wxImageFromStream', > # 'wxMask', > - # ]], > + ]], > > # Other stuff > #['Miscellaneous', [ > @@ -313,7 +313,7 @@ > @log.set_max_length(0) > Wx::Log::set_active_target(Wx::LogTextCtrl.new(@log)) > > - splitter2.split_horizontally(@nb, @log, 0) > + splitter2.split_horizontally(@nb, @log, 350) > splitter.split_vertically(@tree, splitter2, 190) > > splitter.set_minimum_pane_size(20) > @@ -546,7 +546,7 @@ > def on_init > frame = WxRubyDemo.new("WxRuby BIG combined demo", > Wx::DEFAULT_POSITION, > - Wx::Size.new(700, 400)) > + Wx::Size.new(750, 550)) > > frame.show(true) > end > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/7e99af59/attachment-0001.pl From roys at mindspring.com Thu Sep 14 18:03:14 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 18:03:14 -0400 Subject: [Wxruby-users] wxBitmapButton.rbw Message-ID: <4509D1A2.9040709@mindspring.com> Here is a sample for BitmapButtons. I realize we have one in the Button sample but I'm just bringing us closer to the python demo. The patch for bigdemo.rb includes the previous patch, too. Sorry 'bout that. :) -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/f0279d5f/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxBitmapButton.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/f0279d5f/attachment-0001.pl From roys at mindspring.com Thu Sep 14 18:08:23 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 18:08:23 -0400 Subject: [Wxruby-users] wxBitmapButton.rbw Message-ID: <4509D2D7.8050002@mindspring.com> This version has the correct summary text -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxBitmapButton.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/e380a11b/attachment.pl From alex at pressure.to Thu Sep 14 18:27:03 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 23:27:03 +0100 Subject: [Wxruby-users] Patch to fix ArtProvider and ArtProvider sample In-Reply-To: <4509CAFE.4030706@mindspring.com> References: <4509C7A9.90006@mindspring.com> <4509CAFE.4030706@mindspring.com> Message-ID: <4509D737.6000503@pressure.to> Roy Sutton wrote: > Fixed RubyConstants.i.patch. No idea why SVN did that. It messed up > the file on disk. All committed, thanks. Nice work. alex From alex at pressure.to Thu Sep 14 18:33:51 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 14 Sep 2006 23:33:51 +0100 Subject: [Wxruby-users] wxBitmapButton.rbw In-Reply-To: <4509D2D7.8050002@mindspring.com> References: <4509D2D7.8050002@mindspring.com> Message-ID: <4509D8CF.3010801@pressure.to> Roy Sutton wrote: > This version has the correct summary text Committed, thanks. alex From roys at mindspring.com Thu Sep 14 18:38:21 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 18:38:21 -0400 Subject: [Wxruby-users] wxChoicebook Message-ID: <4509D9DD.1060805@mindspring.com> wxChoicebook.rbw + patch file to bigdemo.rb Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxChoicebook.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/735f67ef/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060914/735f67ef/attachment-0001.pl From roys at mindspring.com Thu Sep 14 19:34:36 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 14 Sep 2006 19:34:36 -0400 Subject: [Wxruby-users] wxCursor Message-ID: <4509E70C.6060905@mindspring.com> Cursor example is almost complete. Just need to tidy up a few things when I get home later. I suppose I should send in the Scintilla changes, too Roy From roys at mindspring.com Fri Sep 15 01:28:10 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 15 Sep 2006 01:28:10 -0400 Subject: [Wxruby-users] wxCursor files Message-ID: <450A39EA.80409@mindspring.com> This implements the wxCursor demo and includes a patch to RubyConstants.i needed to make the cursors work right. pointy.png goes into the icons directory Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/b0af6d0b/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxCursor.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/b0af6d0b/attachment-0001.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: pointy.png Type: image/png Size: 489 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/b0af6d0b/attachment.png From sean.m.long at gmail.com Fri Sep 15 01:40:09 2006 From: sean.m.long at gmail.com (Sean Long) Date: Thu, 14 Sep 2006 22:40:09 -0700 Subject: [Wxruby-users] Migrated to SVN! (was: next steps - public alpha?) In-Reply-To: <450779F4.9010509@qualitycode.com> References: <4505EEB8.9070003@pressure.to> <4506BE6F.7040805@qualitycode.com> <45070E50.7060300@pressure.to> <450729D1.7050300@qualitycode.com> <450779F4.9010509@qualitycode.com> Message-ID: A note for OS X users: I have svn 1.3.2 installed via darwin ports and this command: svn checkout svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 does not work! but this one does: svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 They should be the same, I have no idea why it did not work with checkout. I wasted 15 minutes on that one. Sean On 9/12/06, Kevin Smith wrote: > Kevin Smith wrote: > > Alex Fenton wrote: > >> Shall we ask Rubyforge to migrate us? > > > > I guess I'm ready. Fingers crossed! > > It is done. We are now using SVN instead of CVS. Woo-hoo! Tom at > rubyforge said ours was one of the largest projects he has migrated so far. > > If you follow the SVN checkout instructions on the rubyforge wxruby SCM > page, you will end up with tons and tons of stuff you don't need. Trust > me, I did it. Here is the command you really want for an anonymous > (readonly) checkout: > > svn checkout svn://rubyforge.org/var/svn/wxruby/trunk/wxruby2 > > And if you are a developer with write privileges, use this: > > svn checkout svn+ssh://xxx at rubyforge.org/var/svn/wxruby/trunk/wxruby2 > > (replace 'xxx' with your rubyforge login name). > > Either will create a wxruby2 directory under your current directory, > just as a CVS checkout of the wxruby2 module used to do. > > As a quick test, I updated Changelog to mention that the repository was > migrated to SVN. My tool (meld) and process worked flawlessly for the > commit, so I think we are in good shape. > > I probably won't have time to integrate Roy's 3 recent patches for a day > or two. All three (wxMouseEvent, wxScrolledWindow, and Unicode/Windows) > look good to me, so if you (Alex) want to merge them in before I get to > them, feel free. > > Kevin > > > P.S. Should we post a news item about the migration? Normally, I would, > but in this case it might draw more attention than we really want while > we are in stealth pre-alpha mode. Thoughts? > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From alex at pressure.to Fri Sep 15 03:44:51 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 08:44:51 +0100 Subject: [Wxruby-users] Migrated to SVN! In-Reply-To: <450779F4.9010509@qualitycode.com> References: <4505EEB8.9070003@pressure.to> <4506BE6F.7040805@qualitycode.com> <45070E50.7060300@pressure.to> <450729D1.7050300@qualitycode.com> <450779F4.9010509@qualitycode.com> Message-ID: <450A59F3.8030306@pressure.to> Kevin Smith wrote: > It is done. We are now using SVN instead of CVS. Woo-hoo! > Great, thanks. Diffs and commits seem much faster to me. Have updated the wiki. The emacs PSVN mode doesn't look quite as nice as the in-built CVS mode, and I can't get the 1.4 subversion release to compile, but other than that all well. > P.S. Should we post a news item about the migration? Normally, I would, > but in this case it might draw more attention than we really want while > we are in stealth pre-alpha mode. Thoughts? I've posted a comment on the wiki but I think better to wait until release to post a rubyforge news item for the reasons you give. Anyone who's actually gone to the home page is probably interested enough already. a From alex at pressure.to Fri Sep 15 03:55:21 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 08:55:21 +0100 Subject: [Wxruby-users] ruby method names In-Reply-To: References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> <4506E790.8080704@pressure.to> <450727D2.8090203@qualitycode.com> Message-ID: <450A5C69.7080509@pressure.to> Sean Long wrote: > Probably could do this with Object#method_missing check if matches > regex and then use Module#define_method. Thanks for the idea - method_missing works well here and doesn't have the startup hit. Anyway, now implemented like this in WxSugar. def method_missing(sym, *args) case sym.to_s when /^(.*)\=$/ meth = "set_#{$1}" when /^(.*)\?$/ meth = "is_#{$1}" else meth = "get_#{sym}" end if respond_to?(meth) send(meth, *args) else e = NoMethodError.new("undefined method '#{sym}' for #{self.inspect}") e.set_backtrace(caller) Kernel.raise e end end From alex at pressure.to Fri Sep 15 04:05:13 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 09:05:13 +0100 Subject: [Wxruby-users] experimental code [ruby method names] In-Reply-To: <4507252F.6010208@qualitycode.com> References: <4505EBB5.1070101@pressure.to> <4506BF1C.6090704@qualitycode.com> <4506F251.2000700@pressure.to> <4507252F.6010208@qualitycode.com> Message-ID: <450A5EB9.2040807@pressure.to> Kevin Smith wrote: > The thing is...once it's in a wxruby release, there would be a lot of > resistance to removing it...even if it causes problems. Sure. But as with any other code, we try an informed guess as to whether it will case problems (and we haven't come up with any yet) and then try it to see if it really does. Anyway, since method_missing reduces the startup cost of doing it in Ruby, I'm willing to leave this out for now til we solicit a wider range of feedback via a public release etc. I think there are arguments against having this in, e.g. "I prefer the set_ get_ is_ style" (which is fine) or "having two naming schemes is confusing" (in which case we need to pick one and stick with it). But this stage of the project would seem to be the time to try out API-changing changes, when we're not committed to maintaining lots of other people's code. alex From alex at pressure.to Fri Sep 15 07:16:20 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 12:16:20 +0100 Subject: [Wxruby-users] wxChoicebook In-Reply-To: <4509D9DD.1060805@mindspring.com> References: <4509D9DD.1060805@mindspring.com> Message-ID: <450A8B84.2060604@pressure.to> committed, thanks alex Roy Sutton wrote: > wxChoicebook.rbw + patch file to bigdemo.rb > > Roy > ------------------------------------------------------------------------ > > require 'wx' > > class TestCB < Wx::Choicebook > def initialize(parent, log) > @log = log > super(parent, -1) > > page_texts = [ "Yet", > "Another", > "Way", > "To", > "Select", > "Pages" > ] > > # Now make a bunch of panels for the choice book > count = 1 > page_texts.each { |txt| > win = Wx::Panel.new(self) > if count == 1 > st = Wx::StaticText.new(win, -1, > "Wx::Choicebook is yet another way to switch between 'page' windows", > Wx::Point.new(10, 10)) > else > st = Wx::StaticText.new(win, -1, "Page: #{count}", Wx::Point.new(10,10)) > end > count += 1 > > add_page(win, txt) > } > > evt_choicebook_page_changed(get_id) {|event| on_page_changed(event)} > evt_choicebook_page_changing(get_id) {|event| on_page_changing(event)} > > end > > def on_page_changed(event) > old = event.get_old_selection > new = event.get_selection > sel = get_selection > @log.write_text("on_page_changed, old:#{old}, new:#{new}, sel:#{sel}") > event.skip > end > > def on_page_changing(event) > old = event.get_old_selection > new = event.get_selection > sel = get_selection > @log.write_text("on_page_changing, old:#{old}, new:#{new}, sel:#{sel}") > event.skip > end > end > > module Demo > def Demo.run(frame, nb, log) > win = TestCB.new(nb, log) > return win > end > > def Demo.overview > return "This class is a control similar to a notebook control, but uses a Wx::Choice to manage the selection of the pages." > end > end > > ------------------------------------------------------------------------ > > Index: wxruby2/samples/bigdemo/bigdemo.rb > =================================================================== > --- wxruby2/samples/bigdemo/bigdemo.rb (revision 540) > +++ wxruby2/samples/bigdemo/bigdemo.rb (working copy) > @@ -57,6 +57,7 @@ > 'wxCheckBox', > 'wxCheckListBox', > 'wxChoice', > + 'wxChoicebook', > 'wxComboBox', > 'wxGauge', > #'wxGenericDirCtrl', > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Fri Sep 15 07:19:54 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 12:19:54 +0100 Subject: [Wxruby-users] wxCursor files In-Reply-To: <450A39EA.80409@mindspring.com> References: <450A39EA.80409@mindspring.com> Message-ID: <450A8C5A.4020209@pressure.to> Committed, thank you. I edited the sample panel to use sizers as some text was overlapping. Also, I am getting a segfault when I select the custom cursor. Program received signal EXC_BAD_ACCESS, Could not access memory. 0x031b2a30 in wxCursor::CreateFromImage(wxImage const&) () alex Roy Sutton wrote: > This implements the wxCursor demo and includes a patch to > RubyConstants.i needed to make the cursors work right. pointy.png > goes into the icons directory > > Roy From alex at pressure.to Fri Sep 15 07:44:48 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 12:44:48 +0100 Subject: [Wxruby-users] patch to rakemacosx.rb Message-ID: <450A9230.9030900@pressure.to> Hi This allows ColourDialog to work on OS X, instead of crashing. Tested on 10.3. cheers alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakemacosx.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/ca0668c1/attachment.pl From roys at mindspring.com Fri Sep 15 08:40:49 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 15 Sep 2006 08:40:49 -0400 Subject: [Wxruby-users] wxCursor files In-Reply-To: <450A8C5A.4020209@pressure.to> References: <450A39EA.80409@mindspring.com> <450A8C5A.4020209@pressure.to> Message-ID: <450A9F51.8000000@mindspring.com> Alex Fenton wrote: > Committed, thank you. I edited the sample panel to use sizers as some > text was overlapping. > Good. They used sizers but since we didn't have GridBagSizer yet I just left it alone. > Also, I am getting a segfault when I select the custom cursor. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x031b2a30 in wxCursor::CreateFromImage(wxImage const&) () > Hmm. Odd. Might be one to track down later. From wxruby at qualitycode.com Fri Sep 15 09:16:38 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Fri, 15 Sep 2006 09:16:38 -0400 Subject: [Wxruby-users] experimental code [ruby method names] In-Reply-To: <450A5EB9.2040807@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BF1C.6090704@qualitycode.com> <4506F251.2000700@pressure.to> <4507252F.6010208@qualitycode.com> <450A5EB9.2040807@pressure.to> Message-ID: <450AA7B6.8030500@qualitycode.com> Alex Fenton wrote: > I think there are arguments against having this in, e.g. "I prefer the > set_ get_ is_ style" (which is fine) or "having two naming schemes is > confusing" (in which case we need to pick one and stick with it). Neither of these are of concern to me. Well, the first one is slightly, because of all the existing non-Ruby wx documentation, but we have already mangled GetXxx into get_xxx. The real issues for me are whether xxx= is going to cause excessive frustration (because it needs to be self.xxx=), and whether people will run into technical problems from mixing the two styles (perhaps inadvertently by using two third-party wxruby extensions). > But > this stage of the project would seem to be the time to try out > API-changing changes, when we're not committed to maintaining lots of > other people's code. Absolutely, which is why having it in an optional, unofficial package is perfect. If the implementation proves to be solid, and the community likes it, then it would make sense to pull it into wxruby core. Thanks, Kevin From sean.m.long at gmail.com Fri Sep 15 10:43:35 2006 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 15 Sep 2006 07:43:35 -0700 Subject: [Wxruby-users] ruby method names In-Reply-To: <450A5C69.7080509@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> <4506E790.8080704@pressure.to> <450727D2.8090203@qualitycode.com> <450A5C69.7080509@pressure.to> Message-ID: Nice! That is what I had in mind. I can't wait until I get more time to actually do something on the project besides read/writing emails. :) Sean On 9/15/06, Alex Fenton wrote: > Sean Long wrote: > > Probably could do this with Object#method_missing check if matches > > regex and then use Module#define_method. > Thanks for the idea - method_missing works well here and doesn't have > the startup hit. > > Anyway, now implemented like this in WxSugar. > > def method_missing(sym, *args) > case sym.to_s > when /^(.*)\=$/ > meth = "set_#{$1}" > when /^(.*)\?$/ > meth = "is_#{$1}" > else > meth = "get_#{sym}" > end > if respond_to?(meth) > send(meth, *args) > else > e = NoMethodError.new("undefined method '#{sym}' for #{self.inspect}") > e.set_backtrace(caller) > Kernel.raise e > end > end > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From alex at pressure.to Fri Sep 15 11:28:38 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 16:28:38 +0100 Subject: [Wxruby-users] wxSugar 0.1.1, in subversion Message-ID: <450AC6A6.3000305@pressure.to> Hi WxSugar 0.1.1 is now available for download from: http://rubyforge.org/frs/?group_id=35 And in subversion svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxsugar This version speeds up accessors.rb (thanks to Sean's suggestion), and fixes a few bugs. alex From alex at pressure.to Fri Sep 15 11:38:22 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 16:38:22 +0100 Subject: [Wxruby-users] mailing lists Message-ID: <450AC8EE.2030508@pressure.to> Is it worth splitting this mailing list into two: wxruby-users and wxruby-dev? wxruby-users would be for general questions & discussion, help with API, release announcements (inc previews), feature requests wxruby-dev would be for patch submission, commits and development/debugging Both open lists - just to reduce the traffic for those mainly interested in using wxruby & not the gory details of SWIG? alex From alex at pressure.to Fri Sep 15 11:48:40 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 15 Sep 2006 16:48:40 +0100 Subject: [Wxruby-users] [Fwd: Re: [Swig-user] wrapping enums for python] In-Reply-To: <450824FE.2020900@mindspring.com> References: <450824FE.2020900@mindspring.com> Message-ID: <450ACB58.9000005@pressure.to> Roy Sutton wrote: > Take a look at this message thread. I think it would be > interesting/nice if our constants and enums also returned a nice name > when inspected. > Yes. A string or symbol would be much more useful. The use of integer constant ids throughout wxRuby is a bane. e.g. When describing a menu item you have to mention the thing three times (declare constant; add menu item; hook event). I tried ameliorating this by using Ruby symbols for menu ids (more readable, literal and have a guaranteed unique conversion to integer), but the integers choked Wx... alex From roys at mindspring.com Fri Sep 15 17:17:20 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 15 Sep 2006 17:17:20 -0400 Subject: [Wxruby-users] wxGenericDirCtrl Message-ID: <450B1860.4070206@mindspring.com> wxGenericDirCtrl.rbw and bigdemo.rb.patch file. Note that we still have the extension .rbw on all the samples. Maybe we should mass-migrate them to .rb (and fix bigdemo.rb)? Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxGenericDirCtrl.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/44fcbdf0/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/44fcbdf0/attachment-0001.pl From robin at nibor.org Fri Sep 15 17:24:25 2006 From: robin at nibor.org (Robin Stocker) Date: Fri, 15 Sep 2006 23:24:25 +0200 Subject: [Wxruby-users] ruby method names In-Reply-To: <450A5C69.7080509@pressure.to> References: <4505EBB5.1070101@pressure.to> <4506BB6E.90908@qualitycode.com> <4506D51B.4060804@pressure.to> <4506E119.9080708@qualitycode.com> <4506E790.8080704@pressure.to> <450727D2.8090203@qualitycode.com> <450A5C69.7080509@pressure.to> Message-ID: <450B1A09.1070502@nibor.org> Alex Fenton hat geschrieben: > Anyway, now implemented like this in WxSugar. > > def method_missing(sym, *args) > case sym.to_s > when /^(.*)\=$/ > meth = "set_#{$1}" > when /^(.*)\?$/ > meth = "is_#{$1}" > else > meth = "get_#{sym}" > end > if respond_to?(meth) > send(meth, *args) > else > e = NoMethodError.new("undefined method '#{sym}' for #{self.inspect}") > e.set_backtrace(caller) > Kernel.raise e Just a little note about the code above. If all you want is the standard behaviour of method_missing, you can do it this way: super > end > end From roys at mindspring.com Fri Sep 15 18:35:53 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 15 Sep 2006 18:35:53 -0400 Subject: [Wxruby-users] wxMiniFrame Message-ID: <450B2AC9.3060705@mindspring.com> This implements a MiniFrame example. Not very exciting, but there you go. We need to figure out why center_on_parent isn't working. Maybe I'll tackle that next. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/0580998a/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxMiniFrame.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/0580998a/attachment-0001.pl From sean.m.long at gmail.com Fri Sep 15 19:37:26 2006 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 15 Sep 2006 16:37:26 -0700 Subject: [Wxruby-users] Patch to BusyInfo.i Message-ID: On OS X the version in HEAD causes a seg fault. Updated the busy method signature to match the wxWidgets header. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: BusyInfo_i.patch Type: application/octet-stream Size: 745 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060915/eb742706/attachment.obj From alex at pressure.to Sat Sep 16 06:28:58 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 16 Sep 2006 11:28:58 +0100 Subject: [Wxruby-users] wxMiniFrame In-Reply-To: <450B2AC9.3060705@mindspring.com> References: <450B2AC9.3060705@mindspring.com> Message-ID: <450BD1EA.80005@pressure.to> Roy Sutton wrote: > This implements a MiniFrame example. Committed, thanks. > Not very exciting, but there you go. Aww, I think the MiniFrame is quite cute. > We need to figure out why center_on_parent isn't working. Maybe I'll > tackle that next. cool From alex at pressure.to Sat Sep 16 06:32:39 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 16 Sep 2006 11:32:39 +0100 Subject: [Wxruby-users] wxGenericDirCtrl In-Reply-To: <450B1860.4070206@mindspring.com> References: <450B1860.4070206@mindspring.com> Message-ID: <450BD2C7.3000807@pressure.to> Roy Sutton wrote: > wxGenericDirCtrl.rbw and bigdemo.rb.patch file. Committed, thanks. > Note that we still have the extension .rbw on all the samples. Maybe > we should mass-migrate them to .rb (and fix bigdemo.rb)? Could do. What would be even better is if the individual samples could be run on their own, outside the bigdemo interface. I think it would only need a few lines of code wrapped in a 'if __FILE__ == $0' to create a small Frame with panel. a From alex at pressure.to Sat Sep 16 06:37:59 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 16 Sep 2006 11:37:59 +0100 Subject: [Wxruby-users] Patch to BusyInfo.i In-Reply-To: References: Message-ID: <450BD407.8020500@pressure.to> Sean Long wrote: > On OS X the version in HEAD causes a seg fault. > > Updated the busy method signature to match the wxWidgets header. committed, thanks alex From alex at pressure.to Sat Sep 16 07:52:07 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 16 Sep 2006 12:52:07 +0100 Subject: [Wxruby-users] Versioning in rake Message-ID: <450BE567.3040301@pressure.to> Attached a set of patches to remove hardcoded version strings in the rakefiles and libs. It only matters to people who are distributing packages from a SVN checkout. If you want to create a versioned release, you have to call rake like: rake gem WXRUBY_VERSION=0.0.37 Rake and wxruby will remember what version you have named, so you only have to mark it once. The version can be updated by calling rake again with WXRUBY_VERSION= x.x.x nb you will need to do an svn-update before applying this patch so the lib/wx directory is created. The rakefile creates a file lib/wx/version.rb which shouldn't be in VCS. The patches are -p0 not -p1 as I haven't figured out how to do this yet with emacs' SVN mode. alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakewx_rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/692c4ab9/attachment.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wx_rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/692c4ab9/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakepackage_rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/692c4ab9/attachment-0005.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakefile.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/692c4ab9/attachment-0006.pl From roys at mindspring.com Sat Sep 16 22:34:50 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 16 Sep 2006 22:34:50 -0400 Subject: [Wxruby-users] wxSashWindow.rbw Message-ID: <450CB44A.7030903@mindspring.com> This patch includes changes to implement the SashWindow sample. Some notes: 1) You can't resize the sash windows due to events not returning the correct objects 2) I included a patch for EvtHandler.i even though it doesn't affect anything at all. I only realized after I made the change but since it was wrong before I figured it's better to have the right one in the RCS even if we don't use it. 3) Several event 'signatures' were wrong in events.rb. I fixed those as well. 4) Changing events.rb won't cause src/Event.cpp|h to reswig. I'm no rake guru so I didn't take a stab at fixing it so be sure you delete those two files or you won't get the latest changes. 5) I found some missing functions in wxSashWindow.h, so I added them. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSashWindow.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: EvtHandler.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: events.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment-0003.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSashWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060916/f82fbfb9/attachment-0005.pl From roys at mindspring.com Sun Sep 17 00:06:05 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 00:06:05 -0400 Subject: [Wxruby-users] ruby-lang.org Message-ID: <450CC9AD.7050905@mindspring.com> How'd we get listed on the top page of projects for Ruby? (See right side below 'Top Ruby Projects') :) Roy From sean.m.long at gmail.com Sun Sep 17 01:14:18 2006 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 16 Sep 2006 22:14:18 -0700 Subject: [Wxruby-users] ruby-lang.org In-Reply-To: <450CC9AD.7050905@mindspring.com> References: <450CC9AD.7050905@mindspring.com> Message-ID: Cool! It is not based off of RubyForge's 'Most Active This Week' or 'Top Project Downloads' Maybe someone just likes us :) Sean On 9/16/06, Roy Sutton wrote: > How'd we get listed on the top page of projects for Ruby? (See right > side below 'Top Ruby Projects') > > :) > > Roy > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From roys at mindspring.com Sun Sep 17 01:25:41 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 01:25:41 -0400 Subject: [Wxruby-users] irc ? In-Reply-To: <1155997485.5405.22.camel@localhost.localdomain> References: <5d0946540608181418r5e773fd2r257bc630cc6faa77@mail.gmail.com> <1155997485.5405.22.camel@localhost.localdomain> Message-ID: <450CDC55.90906@mindspring.com> I meant to reply sooner. I would probably ghost on an IRC channel if there was one. It would be helpful sometimes to have other people I can bounce ideas off of so I don't get stuck in a loop. Roy Kevin Smith wrote: > On Fri, 2006-08-18 at 16:18 -0500, Joe Seeley wrote: > >> Is there an irc channel for WxRuby development? If not, would anyone >> be interested in having me set one up? >> > > There is no irc channel at this point. I almost never use irc myself, so > even if there were a channel, I probably wouldn't participate. However, > if other wxruby folk would use it, I think it would be great to have > available as a resource. > > Kevin > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From sean.m.long at gmail.com Sun Sep 17 02:56:26 2006 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 16 Sep 2006 23:56:26 -0700 Subject: [Wxruby-users] ruby-lang.org In-Reply-To: References: <450CC9AD.7050905@mindspring.com> Message-ID: Now wxRuby is not showing up on the front page. I think it randomly picks 5 from the top 30 or top 100 of the 'Top Ruby Projects' list at RubyForge. Maybe it is changed once or more times a day. Sean On 9/16/06, Sean Long wrote: > Cool! > > It is not based off of RubyForge's 'Most Active This Week' or 'Top > Project Downloads' > > Maybe someone just likes us :) > > Sean > > On 9/16/06, Roy Sutton wrote: > > How'd we get listed on the top page of projects for Ruby? (See right > > side below 'Top Ruby Projects') > > > > :) > > > > Roy > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From sean.m.long at gmail.com Sun Sep 17 03:15:27 2006 From: sean.m.long at gmail.com (Sean Long) Date: Sun, 17 Sep 2006 00:15:27 -0700 Subject: [Wxruby-users] wxSugar 0.1.1, in subversion In-Reply-To: <450AC6A6.3000305@pressure.to> References: <450AC6A6.3000305@pressure.to> Message-ID: I tried it and have the following notes: I initially downloaded it as a gem and played with it for awhile and got some stuff working. I noticed a few things that need changing so I checked out from SVN and noticed that there really is a sample! It is just not included in the gem, I think the gem should include the sample. I learned a lot more about how the library is written by digging through it but the sample sure would have been nice at the start. I really like the EasyMenus and the event listen method looks pretty slick. I was having some trouble understanding the more advanced layout tools just from reading the docs but I have not dug into the sample yet to see if it clears up anything. I also have 2 small patches: - The first one changes the sample in layout.rb to use CheckBox instead of Checkbox so the sample will run if copy and pasted. - The second clears up the docs for the event listen method that if the source is set to nil all controls of that type will trigger an event, the default value does not trigger all as the docs made it sound. Anyway good work Alex I like the direction you are going with this library. Sean On 9/15/06, Alex Fenton wrote: > Hi > > WxSugar 0.1.1 is now available for download from: > > http://rubyforge.org/frs/?group_id=35 > > And in subversion > > svn co svn://rubyforge.org/var/svn/wxruby/trunk/wxsugar > > This version speeds up accessors.rb (thanks to Sean's suggestion), and > fixes a few bugs. > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: layout_rb.patch Type: application/octet-stream Size: 810 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/922dfced/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: event_connector_rb.patch Type: application/octet-stream Size: 666 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/922dfced/attachment-0001.obj From roys at mindspring.com Sun Sep 17 03:59:07 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 03:59:07 -0400 Subject: [Wxruby-users] run.rb Message-ID: <450D004B.3000502@mindspring.com> This is a first stab at a run.rb file that will let you run a sample in the bigdemo directory by itself. You have to add the following to the bottom of every sample file: if __FILE__ == $0 load "run.rb" run(File.basename($0)) end Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: run.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/cf1a3a27/attachment-0001.pl From alex at pressure.to Sun Sep 17 07:23:55 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 17 Sep 2006 12:23:55 +0100 Subject: [Wxruby-users] wxSashWindow.rbw In-Reply-To: <450CB44A.7030903@mindspring.com> References: <450CB44A.7030903@mindspring.com> Message-ID: <450D304B.8020200@pressure.to> Roy Sutton wrote: > This patch includes changes to implement the SashWindow sample. > Committed, thanks for this and all the recent patches. I would like to try and integrate Scintilla soon with a view to doing a build, if you're able to please. > 1) You can't resize the sash windows due to events not returning the > correct objects Have entered it as a bug; it seems to affect other Event types. A workaround is: Wx::Window::find_window_by_id( event.get_id ) > 4) Changing events.rb won't cause src/Event.cpp|h to reswig. Fixed in SVN - dependency should work next time you do an update. alex From alex at pressure.to Sun Sep 17 08:04:32 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 17 Sep 2006 13:04:32 +0100 Subject: [Wxruby-users] wxSugar 0.1.1, in subversion In-Reply-To: References: <450AC6A6.3000305@pressure.to> Message-ID: <450D39D0.5020909@pressure.to> Sean Long wrote: > I learned a lot more about how the library is written by > digging through it but the sample sure would have been nice at the > start. Oops, now added it to the gem specification. > I was having some trouble understanding the more advanced layout tools > just from reading the docs but I have not dug into the sample yet to > see if it clears up anything. Hopefully it will, but I will look to review the docs for it. It is the feature that departs from wxWidgets API the most, but also one I find useful in reducing tedium and common errors. Working with nested sizers in the default API is flexible but a git to write and refactor because you have to remember which one is within which. It seemed a nice fit with Ruby's use of block syntax for scoping effects. > > I also have 2 small patches: committed, thanks alex From roys at mindspring.com Sun Sep 17 10:42:19 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 10:42:19 -0400 Subject: [Wxruby-users] ShapedWindow.rbw Message-ID: <450D5ECB.4030807@mindspring.com> These patches implement wxRegion and the ShapedWindow sample. I stole the ruby image from ruby-lang.org. Shamelessly. Maybe someone has a better image we can use for the shaped window. It didn't seem to make sense to use the Python image. I'd like something even bigger than what I stol^h^h^h^hmade, preferably. Image goes in icons. I had to %ignore one function in wxRegion. Hopefully I'll get back to that someday. Also note I added the constants Platform and PlatName. These are taken directly from wxPython and allow us to test which platform we're compiled to. The patch files include previous patches to those files not applied. Sorry. Roy - This was initially rejected as being too large so I changed the .bmp into a .png and also added support for run.rb -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ShapedWindow.rbw Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/aceb6582/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/aceb6582/attachment-0005.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/aceb6582/attachment-0006.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Region.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/aceb6582/attachment-0007.pl -------------- next part -------------- A non-text attachment was scrubbed... Name: ruby.png Type: image/png Size: 32420 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/aceb6582/attachment-0001.png From roys at mindspring.com Sun Sep 17 12:51:15 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 12:51:15 -0400 Subject: [Wxruby-users] Scintilla Message-ID: <450D7D03.3030200@mindspring.com> Here are the patch files for Scintilla. You'll need to download (and compile) the Scintilla from the wxCode archive on SourceForge http://sourceforge.net/projects/wxcode You'll need to place the Scintilla.i file into swig/classes/optional scintilla.rb goes into samples/scintilla I didn't modify any of the other platform rakefiles so you'll need to make your own patches for those. You must set the WXSCINTILLA environment variable to point to the base Scintilla directory. If you don't set it, you won't get Scintilla compiled in (i.e. a build as before) Comments are welcome. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakewx.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Events.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: events.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: EvtHandler.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0003.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rakemswin.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0004.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: scintilla.rb Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0005.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Scintilla.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060917/bc37b047/attachment-0006.pl From roys at mindspring.com Sun Sep 17 14:44:30 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 17 Sep 2006 14:44:30 -0400 Subject: [Wxruby-users] wxSound Message-ID: <450D978E.2010004@mindspring.com> wxSound is missing from the documentation and the include directory. I'm not so motivated to tackle that right now but if anyone else wants to... Roy From alex at pressure.to Mon Sep 18 03:52:42 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 18 Sep 2006 08:52:42 +0100 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450D5ECB.4030807@mindspring.com> References: <450D5ECB.4030807@mindspring.com> Message-ID: <450E504A.8090209@pressure.to> Roy Sutton wrote: > These patches implement wxRegion and the ShapedWindow sample. Committed, thanks. Nice. I tweaked the demo slightly. > Also note I added the constants Platform and PlatName. Our other constants have all upper-case names, so I would like these to be the same. I wonder if a single simple constant Wx::PLATFORM (or maybe Wx::GUI_PLATFORM; 0.6.0 provided Wx::RUBY_PLATFORM but I think this is misleading) is all that's needed, with values 'Mac', 'GTK', 'MSW', etc,. Thoughts? Thank you very much for the Scintilla patches. Will look to review and test out this evening. alex From roys at mindspring.com Mon Sep 18 09:34:57 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 09:34:57 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450E504A.8090209@pressure.to> References: <450D5ECB.4030807@mindspring.com> <450E504A.8090209@pressure.to> Message-ID: <450EA081.5020807@mindspring.com> Alex Fenton wrote: > Our other constants have all upper-case names, so I would like these to > be the same. I wonder if a single simple constant Wx::PLATFORM (or maybe > Wx::GUI_PLATFORM; 0.6.0 provided Wx::RUBY_PLATFORM but I think this is > misleading) is all that's needed, with values 'Mac', 'GTK', 'MSW', etc,. > Thoughts? > I did hesitate over that for a bit and just couldn't decide what I preferred. All-caps is fine. As to the underscores, I was thinking about removing them but some amount of overlap with wxPython means that we can piggyback on their docs some. RUBY_PLATFORM is actually (also?) a Ruby constant. But it's not so useful. You'll notice we have a sample that tests it but on my machine RUBY_PLATFORM is i386-mswin32. > Thank you very much for the Scintilla patches. Will look to review and > test out this evening. > Let me know if it works! Roy From wxruby at qualitycode.com Mon Sep 18 09:37:27 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 18 Sep 2006 09:37:27 -0400 Subject: [Wxruby-users] ruby-lang.org In-Reply-To: <450CC9AD.7050905@mindspring.com> References: <450CC9AD.7050905@mindspring.com> Message-ID: <450EA117.1020503@qualitycode.com> Roy Sutton wrote: > How'd we get listed on the top page of projects for Ruby? (See right > side below 'Top Ruby Projects') We are also listed first among GUI toolkits on the "Ruby from Java" page: http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-java/ A bit premature, surely, but hopefully we can live up to the expectations. Kevin From wxruby at qualitycode.com Mon Sep 18 09:44:47 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 18 Sep 2006 09:44:47 -0400 Subject: [Wxruby-users] mailing lists In-Reply-To: <450AC8EE.2030508@pressure.to> References: <450AC8EE.2030508@pressure.to> Message-ID: <450EA2CF.2090101@qualitycode.com> Alex Fenton wrote: > Is it worth splitting this mailing list into two: wxruby-users and > wxruby-dev? I think we are at the point where that would be a good idea. Perhaps before our public alpha would make sense. Kevin From wxruby at qualitycode.com Mon Sep 18 09:56:28 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 18 Sep 2006 09:56:28 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450D5ECB.4030807@mindspring.com> References: <450D5ECB.4030807@mindspring.com> Message-ID: <450EA58C.9080908@qualitycode.com> Thanks for all your recent work Roy! A couple comments/questions: > if Platform != '__WXMAC__' > # wxMac clips the tooltip to the window shape, YUCK!!! > set_tool_tip("Right-click to close the window\n" + > "Double-click the image to set/unset the window shape") > end Since we are a cross-platform toolkit, the fewer platform checks, the better. Could we set the tool_tip on all platforms, but has a comment saying it will get clipped on Mac? That way, if it is ever "fixed" in wx, the demo will work right away. And users will be able to see what would happen on Mac if they did choose to have a tool tip. > > if Platform == '__WXGTK__' > # wxGTK requires that the window be created before you can > # set its shape, so delay the call to SetWindowShape until > # this event. > evt_window_create {set_window_shape} > else > # On wxMSW and wxMac the window has already been created, so go for it. > set_window_shape > end Is there any reason not to use evt_window_create for all platforms here? Kevin From wxruby at qualitycode.com Mon Sep 18 10:04:08 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 18 Sep 2006 10:04:08 -0400 Subject: [Wxruby-users] wxPlatform etc. (was: ShapedWindow.rbw) In-Reply-To: <450E504A.8090209@pressure.to> References: <450D5ECB.4030807@mindspring.com> <450E504A.8090209@pressure.to> Message-ID: <450EA758.70000@qualitycode.com> Alex Fenton wrote: > Our other constants have all upper-case names, so I would like these to > be the same. I wonder if a single simple constant Wx::PLATFORM (or maybe > Wx::GUI_PLATFORM; 0.6.0 provided Wx::RUBY_PLATFORM but I think this is > misleading) is all that's needed, with values 'Mac', 'GTK', 'MSW', etc,. > Thoughts? I agree with using all caps for these. I also wonder why Python's PLATFORM is so ugly. I would like to be as compatible with wxPython as possible, but when they make odd choices like this it is a hard decision whether to follow them or do something better. Maybe we only define PLATNAME and not bother with PLATFORM? Kevin From roys at mindspring.com Mon Sep 18 11:39:52 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 11:39:52 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450EA58C.9080908@qualitycode.com> References: <450D5ECB.4030807@mindspring.com> <450EA58C.9080908@qualitycode.com> Message-ID: <450EBDC8.1010601@mindspring.com> Kevin Smith wrote: > Since we are a cross-platform toolkit, the fewer platform checks, the > better. Could we set the tool_tip on all platforms, but has a comment > saying it will get clipped on Mac? That way, if it is ever "fixed" in > wx, the demo will work right away. And users will be able to see what > would happen on Mac if they did choose to have a tool tip. > Since I didn't have a Mac to test on I wasn't sure what would happen. I think explanatory text next to the button to launch the test would be good. Also see answer below > Is there any reason not to use evt_window_create for all platforms here? > At first I considered that then I realized that people using our samples as a launching point for their own applications may wish to know what's really going on so they can be aware of those places where the cross-platform toolkit has some 'holes.' I wouldn't fight changing it as it makes the sample cleaner. Just letting you know my thought process. Roy From roys at mindspring.com Mon Sep 18 11:42:34 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 11:42:34 -0400 Subject: [Wxruby-users] wxPlatform etc. In-Reply-To: <450EA758.70000@qualitycode.com> References: <450D5ECB.4030807@mindspring.com> <450E504A.8090209@pressure.to> <450EA758.70000@qualitycode.com> Message-ID: <450EBE6A.70100@mindspring.com> Kevin Smith wrote: > Maybe we only define PLATNAME and not bother with PLATFORM? > > I would vote for PLATFORM, not least because 'PLATNAME' is just plain stupid sounding. I wouldn't fight changing PLATFORM to be the same text as PLATFORM is now, I don't like the decorated text so much either. Roy From alex at pressure.to Mon Sep 18 14:19:42 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 18 Sep 2006 19:19:42 +0100 Subject: [Wxruby-users] wxPlatform etc. In-Reply-To: <450EBE6A.70100@mindspring.com> References: <450D5ECB.4030807@mindspring.com> <450E504A.8090209@pressure.to> <450EA758.70000@qualitycode.com> <450EBE6A.70100@mindspring.com> Message-ID: <450EE33E.3040300@pressure.to> > I would vote for PLATFORM, +1. Real words easier to remember. > I wouldn't fight changing PLATFORM to be the same text > as PLATFORM is now, I don't like the decorated text so much either. > Yeah, it's ugly. I'll update SVN later. cheers alex From wxruby at qualitycode.com Mon Sep 18 14:46:35 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 18 Sep 2006 14:46:35 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450EBDC8.1010601@mindspring.com> References: <450D5ECB.4030807@mindspring.com> <450EA58C.9080908@qualitycode.com> <450EBDC8.1010601@mindspring.com> Message-ID: <450EE98B.5050408@qualitycode.com> Roy Sutton wrote: > Kevin Smith wrote: >> Is there any reason not to use evt_window_create for all platforms here? >> > At first I considered that then I realized that people using our samples > as a launching point for their own applications may wish to know what's > really going on so they can be aware of those places where the > cross-platform toolkit has some 'holes.' I wouldn't fight changing it > as it makes the sample cleaner. Just letting you know my thought process. I agree that our samples should guide folks as they write wxRuby apps. To that end, I would encourage us to use techniques that work across all platforms, so folks don't have to re-write their apps later to get them to work on a new platform. I would rather deal with cross-platform oddities in our docs, or perhaps in comments in the sample code, rather than in the code itself. Thanks, Kevin From roys at mindspring.com Mon Sep 18 16:21:21 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 16:21:21 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450EE98B.5050408@qualitycode.com> References: <450D5ECB.4030807@mindspring.com> <450EA58C.9080908@qualitycode.com> <450EBDC8.1010601@mindspring.com> <450EE98B.5050408@qualitycode.com> Message-ID: <450EFFC1.2030109@mindspring.com> Kevin Smith wrote: > I would rather deal with cross-platform oddities in our docs, or perhaps > in comments in the sample code, rather than in the code itself. > Like this? -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ShapedWindow.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060918/0115eb23/attachment.pl From roys at mindspring.com Mon Sep 18 17:06:20 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 17:06:20 -0400 Subject: [Wxruby-users] ShapedWindow.rbw In-Reply-To: <450EFFC1.2030109@mindspring.com> References: <450D5ECB.4030807@mindspring.com> <450EA58C.9080908@qualitycode.com> <450EBDC8.1010601@mindspring.com> <450EE98B.5050408@qualitycode.com> <450EFFC1.2030109@mindspring.com> Message-ID: <450F0A4C.90304@mindspring.com> Roy Sutton wrote: > Kevin Smith wrote: >> I would rather deal with cross-platform oddities in our docs, or >> perhaps in comments in the sample code, rather than in the code itself. >> > Like this? > Well, that doesn't work. I didn't even test it. We don't support evt_window_create yet. I added it and it doesn't fire (on MSW) so... We're back to what we had. Please disregard the patch for now. Roy From alex at pressure.to Mon Sep 18 17:43:16 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 18 Sep 2006 22:43:16 +0100 Subject: [Wxruby-users] Scintilla In-Reply-To: <450D7D03.3030200@mindspring.com> References: <450D7D03.3030200@mindspring.com> Message-ID: <450F12F4.8060803@pressure.to> Roy Sutton wrote: > Here are the patch files for Scintilla. You'll need to download (and > compile) the Scintilla from the wxCode archive on SourceForge > > http://sourceforge.net/projects/wxcode Scintilla doesn't build out the box on OS X, so I haven't yet got to make this work. By changing g++ option from -shared to -dynamiclib I could get it to compile a lib that would build and run the C++ Scintilla sample (with some tweaking of latter). Looks cool, but not working perfectly (some keybindings seem wrong, code-folding not working). > You'll need to place the Scintilla.i file into swig/classes/optional > > scintilla.rb goes into samples/scintilla All your patches and instructions worked well. I did a clean and reswig, and it all works, up until the last step when it tries to link everything into a .bundle. I get a load of errors like: /Users/alex/installers/wx/wxscintilla_1.68.1/lib/libwxscintilla.dylib(baselib_stream.o) definition of wxBufferedOutputStream::OnSysWrite(void const*, ... for just about every method under the sun. libwxscintilla.dylib looks big (9MB) and I wonder if it has wxwidgets statically linked into it, and if this is the problem. If so I probably need some other option when building Scintilla. Will have a search but let me know if any of this rings bells. alex From roys at mindspring.com Mon Sep 18 18:06:15 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 18:06:15 -0400 Subject: [Wxruby-users] EvtHanler.i / Events.i Message-ID: <450F1857.60405@mindspring.com> I decided to take a look at the way we set up event handlers as part of adding two missing events (EVT_WINDOW_CREATE and EVT_WINDOW_DESTROY) and I must say I completely don't understand how the passed block becomes a function that gets called during the callback. Anyone able to point me in the right direction here? Roy From roys at mindspring.com Mon Sep 18 18:21:58 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 18:21:58 -0400 Subject: [Wxruby-users] EvtHanler.i / Events.i In-Reply-To: <450F1857.60405@mindspring.com> References: <450F1857.60405@mindspring.com> Message-ID: <450F1C06.7030306@mindspring.com> Roy Sutton wrote: > I decided to take a look at the way we set up event handlers as part > of adding two missing events (EVT_WINDOW_CREATE and > EVT_WINDOW_DESTROY) and I must say I completely don't understand how > the passed block becomes a function that gets called during the callback. > > Anyone able to point me in the right direction here? > > Roy > I missed that 'call' is 'yield' for the block. I was expecting to see yield in there. (Also, messages are taking forever to percolate through the list today) From alex at pressure.to Mon Sep 18 18:58:08 2006 From: alex at pressure.to (Alex Fenton) Date: Mon, 18 Sep 2006 23:58:08 +0100 Subject: [Wxruby-users] Versioning in rake In-Reply-To: <450BE567.3040301@pressure.to> References: <450BE567.3040301@pressure.to> Message-ID: <450F2480.802@pressure.to> Alex Fenton wrote: > Attached a set of patches to remove hardcoded version strings in the > rakefiles and libs. Have committed these, and previous rake patch to fix ColourDialog on OS X. alex From alex at pressure.to Mon Sep 18 19:22:17 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Sep 2006 00:22:17 +0100 Subject: [Wxruby-users] run.rb In-Reply-To: <450D004B.3000502@mindspring.com> References: <450D004B.3000502@mindspring.com> Message-ID: <450F2A29.90303@pressure.to> Committed, thanks, along with updates to all the bigdemo sample files. alex Roy Sutton wrote: > This is a first stab at a run.rb file that will let you run a sample > in the bigdemo directory by itself. > > You have to add the following to the bottom of every sample file: > > if __FILE__ == $0 > load "run.rb" > run(File.basename($0)) > end > > Roy > ------------------------------------------------------------------------ > > # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith > # Freely reusable code: see SAMPLES-LICENSE.TXT for details > > require 'wx' > > class Log > def write_text(txt) > Wx::log_message(txt.chomp) > end > alias write write_text > end > > # Wx::App is the container class for any wxruby app - only a single > # instance is required > class MinimalApp < Wx::App > def initialize(sample) > @sample = sample > super() > end > > def on_init > frame = Wx::Frame.new(nil, -1, "wxRuby Demo: #{@sample}", > Wx::Point.new(50, 50), > Wx::Size.new(450, 340)) > > frame.create_status_bar > > menu_file = Wx::Menu.new() > menu_file.append(Wx::ID_EXIT, "E&xit\tAlt-X", "Quit this program") > menu_bar = Wx::MenuBar.new() > menu_bar.append(menu_file, "&File") > evt_menu(Wx::ID_EXIT) { frame.close } > > frame.set_menu_bar(menu_bar) > frame.show > > # TODO: Some samples may need clean-up calls? > frame.evt_close {|evt| evt.skip } > > win = Demo.run(frame, frame, Log.new) > # a window will be returned if the demo does not create > # its own top-level window > if win > frame.set_size(640, 480) > win.set_focus > else > return true > end > > set_top_window(frame) > true > end > > def on_assert(file, line, condition, message) > puts("ASSERT: #{file} #{line}: #{condition}; #{message}") > raise > end > end > > # ensure handlers for xpm images are loaded > Wx::init_all_image_handlers() > > def run(sample) > app = MinimalApp.new(sample) > app.main_loop() > end > > if __FILE__ == $0 > if ARGV[0] > begin > load ARGV[0] > run(ARGV[0]) > rescue(LoadError) > puts "Unable to load '#{ARGV[0]}'" > end > else > puts "You must specify the filename of the sample you want to run." > end > end > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Mon Sep 18 19:31:08 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Sep 2006 00:31:08 +0100 Subject: [Wxruby-users] docs Message-ID: <450F2C3C.7080306@pressure.to> Unless anyone's got any objections I'm going to check the class docs textile sources into SVN, for the ported classes at least. Think it makes more sense to open these up to editing and patching by human than trying to fix more edge cases in the latex translator. We can always alex From roys at mindspring.com Mon Sep 18 20:53:02 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 18 Sep 2006 20:53:02 -0400 Subject: [Wxruby-users] Scintilla In-Reply-To: <450F12F4.8060803@pressure.to> References: <450D7D03.3030200@mindspring.com> <450F12F4.8060803@pressure.to> Message-ID: <450F3F6E.1020707@mindspring.com> Alex Fenton wrote: > Scintilla doesn't build out the box on OS X, so I haven't yet got to > make this work. By changing g++ option from -shared to -dynamiclib I > could get it to compile a lib that would build and run the C++ Scintilla > sample (with some tweaking of latter). Looks cool, but not working > perfectly (some keybindings seem wrong, code-folding not working). > Try building Scintilla from the contrib folder in wxWidgets. When I was first starting I used that and it worked OK. It might compile better for you than the wxCode one. The header file is completely different though so you may have to fiddle around. I don't recall if the headers are compatible enough that you could substitute. Maybe I need to get me one of those macs to try out. Roy From alex at pressure.to Tue Sep 19 04:02:15 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 19 Sep 2006 09:02:15 +0100 Subject: [Wxruby-users] wxPlatform etc. In-Reply-To: <450EE33E.3040300@pressure.to> References: <450D5ECB.4030807@mindspring.com> <450E504A.8090209@pressure.to> <450EA758.70000@qualitycode.com> <450EBE6A.70100@mindspring.com> <450EE33E.3040300@pressure.to> Message-ID: <450FA407.1060003@pressure.to> Hi OK, now is Wx::PLATFORM == 'WXGTK' # or 'WXMAC' or 'WXMSW' etc I updated the GTK test in ShapedWindow.rbw, but removed the Mac test at there doesn't seem to be a problem with the tooltip clipping. alex Alex Fenton wrote: >> I would vote for PLATFORM, >> > +1. Real words easier to remember. > >> I wouldn't fight changing PLATFORM to be the same text >> as PLATFORM is now, I don't like the decorated text so much either. >> >> > Yeah, it's ugly. > > I'll update SVN later. > > cheers > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From wxruby at qualitycode.com Tue Sep 19 09:15:04 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 19 Sep 2006 09:15:04 -0400 Subject: [Wxruby-users] docs In-Reply-To: <450F2C3C.7080306@pressure.to> References: <450F2C3C.7080306@pressure.to> Message-ID: <450FED58.3010000@qualitycode.com> Alex Fenton wrote: > Unless anyone's got any objections I'm going to check the class docs > textile sources into SVN, for the ported classes at least. Think it > makes more sense to open these up to editing and patching by human than > trying to fix more edge cases in the latex translator. Sounds reasonable to me. Kevin From roys at mindspring.com Tue Sep 19 16:27:25 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 19 Sep 2006 16:27:25 -0400 Subject: [Wxruby-users] SVN and demo files Message-ID: <451052AD.7060205@mindspring.com> The files checked out of SVN come out without the ability to be executed. So, I can't run the samples without prefixing with 'ruby ' Before, the file associations allowed me to run samples just by putting the name on the command line. Can we fix this? Roy From wxruby at roadq.com Tue Sep 19 20:06:47 2006 From: wxruby at roadq.com (Mark Ping) Date: Tue, 19 Sep 2006 17:06:47 -0700 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <451052AD.7060205@mindspring.com> References: <451052AD.7060205@mindspring.com> Message-ID: <45108617.3010508@roadq.com> Roy Sutton wrote: > The files checked out of SVN come out without the ability to be > executed. So, I can't run the samples without prefixing with 'ruby ' > Before, the file associations allowed me to run samples just by putting > the name on the command line. Can we fix this? I don't have this problem (running Win XP). As long as the file ends in .rb it should be fine--SVN shouldn't affect it at all. --Mark From roys at mindspring.com Tue Sep 19 22:15:34 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 19 Sep 2006 22:15:34 -0400 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <45108617.3010508@roadq.com> References: <451052AD.7060205@mindspring.com> <45108617.3010508@roadq.com> Message-ID: <4510A446.9070204@mindspring.com> Mark Ping wrote: > Roy Sutton wrote: > >> The files checked out of SVN come out without the ability to be >> executed. So, I can't run the samples without prefixing with 'ruby ' >> Before, the file associations allowed me to run samples just by putting >> the name on the command line. Can we fix this? >> > I don't have this problem (running Win XP). As long as the file ends in > .rb it should be fine--SVN shouldn't affect it at all. > Checking the file's security settings it's marked as not executable for my user. It's SVN doing this, somehow. So you're saying in the executable directory you can type 'ShapedWindow.rbw' and press enter and not get 'Access is denied.'? bigdemo.rb works for me, just not the others in that directory, including run.rb I -think- Daniel has the right idea. I don't have write access to SVN though. Roy From roys at mindspring.com Wed Sep 20 01:11:21 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 20 Sep 2006 01:11:21 -0400 Subject: [Wxruby-users] Fix for non-centered windows Message-ID: <4510CD79.2000001@mindspring.com> Two patches here: First one removes virtual from a function that shouldn't have been virtual. Second one applies a typemap to catch GetRectFromChildWindow. For reasons that are completely beyond me the standard ruby OUTPUT typemaps don't define directorargouts. I will take a stab at patching SWIG's default typemaps someday so we get this fixed for free on all our OUTPUT typemaps. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060920/2d7097c8/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typemap.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060920/2d7097c8/attachment-0001.pl From wxruby at roadq.com Wed Sep 20 01:17:36 2006 From: wxruby at roadq.com (Mark Ping) Date: Tue, 19 Sep 2006 22:17:36 -0700 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <4510A446.9070204@mindspring.com> References: <451052AD.7060205@mindspring.com> <45108617.3010508@roadq.com> <4510A446.9070204@mindspring.com> Message-ID: <4510CEF0.2090304@roadq.com> Roy Sutton wrote: > Mark Ping wrote: > >> Roy Sutton wrote: >> >> >>> The files checked out of SVN come out without the ability to be >>> executed. So, I can't run the samples without prefixing with 'ruby ' >>> Before, the file associations allowed me to run samples just by putting >>> the name on the command line. Can we fix this? >>> >>> >> I don't have this problem (running Win XP). As long as the file ends in >> .rb it should be fine--SVN shouldn't affect it at all. >> >> > Checking the file's security settings it's marked as not executable for > my user. It's SVN doing this, somehow. So you're saying in the > executable directory you can type 'ShapedWindow.rbw' and press enter and > not get 'Access is denied.'? bigdemo.rb works for me, just not the > others in that directory, including run.rb Yes, I can execute just fine--but I'm running on Windows (which I thought you were as well). On a *nix system, it does probably need the svn flag set. --Marm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20060919/5ad6e5bd/attachment.html From roys at mindspring.com Wed Sep 20 03:01:19 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 20 Sep 2006 03:01:19 -0400 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <4510CEF0.2090304@roadq.com> References: <451052AD.7060205@mindspring.com> <45108617.3010508@roadq.com> <4510A446.9070204@mindspring.com> <4510CEF0.2090304@roadq.com> Message-ID: <4510E73F.2080708@mindspring.com> Mark Ping wrote: > Yes, I can execute just fine--but I'm running on Windows (which I > thought you were as well). On a *nix system, it does probably need > the svn flag set. > Odd. I am running on Windows XP. Best to set the flag anyhow, I suppose. Roy From roys at mindspring.com Wed Sep 20 03:11:19 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 20 Sep 2006 03:11:19 -0400 Subject: [Wxruby-users] typemap.i.patch Message-ID: <4510E997.6000006@mindspring.com> This patch implements a more generic solution to the problem that will work for all our integer types at least. Use this instead of the last version I sent, please. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typemap.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060920/99ae6880/attachment-0001.pl From alex at pressure.to Wed Sep 20 04:27:22 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 20 Sep 2006 09:27:22 +0100 Subject: [Wxruby-users] Scintilla In-Reply-To: <450F3F6E.1020707@mindspring.com> References: <450D7D03.3030200@mindspring.com> <450F12F4.8060803@pressure.to> <450F3F6E.1020707@mindspring.com> Message-ID: <4510FB6A.10808@pressure.to> Hi Roy Sutton wrote: > Try building Scintilla from the contrib folder in wxWidgets. It compiles and installs cleanly, thanks for the suggestion. > The header file is completely different > though so you may have to fiddle around. Yep - now I can at least build wxruby with WxScintilla against the version from contrib, using the WxCode header. But I get a slew of undefined symbols, so I guess they're not compatible enough. I think I'm a bit stuck now b/c I don't know the OS X compiler enough to fix the standalone distrib nor how to fix the headers from the main distribution version. Your patches look sound so I will commit them (and others) later. I would like to squeeze out an alpha release candidate over the weekend; I don't think it's a showstopper for Scintilla only to be integrated on Windows. The pieces will all be there for someone more adept to tie up the ends on OS X and Linux in the near future. alex From roys at mindspring.com Wed Sep 20 14:57:53 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 20 Sep 2006 14:57:53 -0400 Subject: [Wxruby-users] typemap.i.patch In-Reply-To: <4510E997.6000006@mindspring.com> References: <4510E997.6000006@mindspring.com> Message-ID: <45118F31.8090804@mindspring.com> OK, this one isn't working so well as I hoped. This is generally the right solution but there are problems with our wrapping that this exposes. Stick with the previous one for now. Roy Roy Sutton wrote: > This patch implements a more generic solution to the problem that will > work for all our integer types at least. Use this instead of the last > version I sent, please. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/swig/typemap.i > =================================================================== > --- wxruby2/swig/typemap.i (revision 574) > +++ wxruby2/swig/typemap.i (working copy) > @@ -21,6 +21,13 @@ > > %include "typemaps.i" > > +%typemap(directorargout) ( int * OUTPUT ) { > + if($1 != NULL) > + *$1 = (int)NUM2INT(rb_ary_shift(result)); > + else > + rb_ary_shift(result); // Guess we should shift it anyhow! > +} > + > /* > Currently incompatible with the ruby post-processing of swigged .cpp files > Needs to be fixed in fixdeleting.rb before this can be uncommented out > @@ -454,3 +461,5 @@ > %typemap(out) wxSystemMetric { > $result = INT2NUM((int)$1); > } > + > +%apply int *OUTPUT { int * x , int * y , int * w, int * h }; > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Wed Sep 20 20:51:34 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 20 Sep 2006 20:51:34 -0400 Subject: [Wxruby-users] typemap.i.patch: The Next Generatio Message-ID: <4511E216.5090502@mindspring.com> OK, I figured it out. It was basically right the first time. I was bit in the backside by macro side effects. Turns out NUM2INT causes its argument to be called twice so it was double shifting. This version doesn't do that. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typemap.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060920/9abff53a/attachment.pl From alex at pressure.to Wed Sep 20 23:40:10 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 04:40:10 +0100 Subject: [Wxruby-users] Fix for non-centered windows In-Reply-To: <4510CD79.2000001@mindspring.com> References: <4510CD79.2000001@mindspring.com> Message-ID: <4512099A.80402@pressure.to> Committed, thanks. For reference, does directorargout apply to any method called on a director? Or methods which return director instances? The ruby SWIG docs are pretty thin on this topic... alex Roy Sutton wrote: > Two patches here: > > First one removes virtual from a function that shouldn't have been > virtual. > > Second one applies a typemap to catch GetRectFromChildWindow. For > reasons that are completely beyond me the standard ruby OUTPUT > typemaps don't define directorargouts. I will take a stab at patching > SWIG's default typemaps someday so we get this fixed for free on all > our OUTPUT typemaps. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/swig/classes/include/wxWindow.h > =================================================================== > --- wxruby2/swig/classes/include/wxWindow.h (revision 574) > +++ wxruby2/swig/classes/include/wxWindow.h (working copy) > @@ -446,7 +446,7 @@ > * \param int* > */ > > - virtual void GetPosition(int* x , int* y ) const; > + void GetPosition(int* x , int* y ) const; > /** > * \brief This gets the position of the window in pixels, relative to the parent window > for the child windows or relative to the display origin for the top level > > ------------------------------------------------------------------------ > > Index: wxruby2/swig/typemap.i > =================================================================== > --- wxruby2/swig/typemap.i (revision 574) > +++ wxruby2/swig/typemap.i (working copy) > @@ -454,3 +454,15 @@ > %typemap(out) wxSystemMetric { > $result = INT2NUM((int)$1); > } > + > +%apply int *OUTPUT { int * x , int * y , int * w, int * h }; > + > +%typemap(directorargout) ( int * x , int * y , int * w, int * h ) { > + if((TYPE(result) == T_ARRAY) && (RARRAY(result)->len == 4)) > + { > + *$1 = ($*1_ltype)NUM2INT(rb_ary_entry(result,0)); > + *$2 = ($*2_ltype)NUM2INT(rb_ary_entry(result,1)); > + *$3 = ($*3_ltype)NUM2INT(rb_ary_entry(result,2)); > + *$4 = ($*4_ltype)NUM2INT(rb_ary_entry(result,3)); > + } > +} > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From roys at mindspring.com Thu Sep 21 01:40:40 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 21 Sep 2006 01:40:40 -0400 Subject: [Wxruby-users] on_paint nightmare Message-ID: <451225D8.8090008@mindspring.com> I was trying out the RMagick sample from the wiki and ran into an interesting(?) problem: If you resized the window it got stuck in an endless loop calling onPaint. After a bit, if you had the mouse in the window it would crash. Anyone seen this behavior before? I wonder if this is related to other crashes we've seen? Roy From roys at mindspring.com Thu Sep 21 01:56:41 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 21 Sep 2006 01:56:41 -0400 Subject: [Wxruby-users] wxImage patches Message-ID: <45122999.5020507@mindspring.com> These patches allow the RMagick sample to work with wxRuby2. They also open up some functions that were %ignored that probably shouldn't be (at least with the typemap adjustment). I think we may need to visit (or document carefully) what happens when you pass in a string of data to the constructor or to SetAlpha. We need to decide which setting of static_data is correct for the library. Does anyone know of any reason we would or wouldn't want to just set the unsigned char * typemap in typemap.i? Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Image.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060921/2dbb6671/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxImage.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060921/2dbb6671/attachment-0001.pl From roys at mindspring.com Thu Sep 21 02:06:39 2006 From: roys at mindspring.com (Roy Sutton) Date: Thu, 21 Sep 2006 02:06:39 -0400 Subject: [Wxruby-users] Fix for non-centered windows In-Reply-To: <4512099A.80402@pressure.to> References: <4510CD79.2000001@mindspring.com> <4512099A.80402@pressure.to> Message-ID: <45122BEF.6050003@mindspring.com> Alex Fenton wrote: > For reference, does directorargout apply to any method called on a > director? Or methods which return director instances? The ruby SWIG docs > are pretty thin on this topic... > Pretty thin is generous. directorargout puts code after the internal call to a ruby function (when it's called back from either C or ruby) to handle any 'argument' 'out'puts. It's required on pretty much every function that returns something through a pointer argument. Unwrapped pointers will work OK because the underlying SWIG wrapper just passes them through as the pointer type and we can't (generally) call them from Ruby. The big issue arises when we muck with the returns, like putting them into a list. Roy From sean.m.long at gmail.com Thu Sep 21 11:08:13 2006 From: sean.m.long at gmail.com (Sean Long) Date: Thu, 21 Sep 2006 08:08:13 -0700 Subject: [Wxruby-users] Fix for non-centered windows In-Reply-To: <45122BEF.6050003@mindspring.com> References: <4510CD79.2000001@mindspring.com> <4512099A.80402@pressure.to> <45122BEF.6050003@mindspring.com> Message-ID: Roy, Thanks for the fix, I can finally run the Big demo again on OS X. This was one of the most annoying bugs for me. Sean On 9/20/06, Roy Sutton wrote: > Alex Fenton wrote: > > For reference, does directorargout apply to any method called on a > > director? Or methods which return director instances? The ruby SWIG docs > > are pretty thin on this topic... > > > Pretty thin is generous. directorargout puts code after the internal > call to a ruby function (when it's called back from either C or ruby) to > handle any 'argument' 'out'puts. It's required on pretty much every > function that returns something through a pointer argument. Unwrapped > pointers will work OK because the underlying SWIG wrapper just passes > them through as the pointer type and we can't (generally) call them from > Ruby. The big issue arises when we muck with the returns, like putting > them into a list. > > Roy > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From alex at pressure.to Thu Sep 21 13:06:26 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 18:06:26 +0100 Subject: [Wxruby-users] typemap.i.patch: The Next Generatio In-Reply-To: <4511E216.5090502@mindspring.com> References: <4511E216.5090502@mindspring.com> Message-ID: <4512C692.9010806@pressure.to> Committed, thanks alex Roy Sutton wrote: > OK, I figured it out. It was basically right the first time. I was > bit in the backside by macro side effects. Turns out NUM2INT causes > its argument to be called twice so it was double shifting. This > version doesn't do that. From alex at pressure.to Thu Sep 21 13:47:07 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 18:47:07 +0100 Subject: [Wxruby-users] wxImage patches In-Reply-To: <45122999.5020507@mindspring.com> References: <45122999.5020507@mindspring.com> Message-ID: <4512D01B.8010803@pressure.to> Roy Sutton wrote: > These patches allow the RMagick sample to work with wxRuby2. Committed, thanks. I get several warnings now when compiling Image.cpp of the type: src/Image.cpp: In function `VALUE _wrap_new_wxImage__SWIG_3(int, VALUE*, long unsigned int)': src/Image.cpp:2560: warning: invalid conversion from `char*' to `unsigned char* ' > I think we may need to visit (or document carefully) what happens when > you pass in a string of data to the constructor or to SetAlpha. We should have aliases that disambiguate the different forms of new - maybe Image.from_data or .new_from_data. > Does anyone know of any reason we would or wouldn't want to just set > the unsigned char * typemap in typemap.i? Nope, but I probably wouldn't if there was one. Would be nice to fix Icon.new(data) as well. There is Icon.new(void*data) and Icon.new(char**bits) ... thanks alex From alex at pressure.to Thu Sep 21 16:03:55 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 21:03:55 +0100 Subject: [Wxruby-users] docs In-Reply-To: <450FED58.3010000@qualitycode.com> References: <450F2C3C.7080306@pressure.to> <450FED58.3010000@qualitycode.com> Message-ID: <4512F02B.4050304@pressure.to> OK, the textile docs are now in SVN. Anyone is very welcome to edit these - another task that doesn't need any knowledge of SWIG (hint...) To generate and see the HTML output, just run 'rake html_docs'. You will need redcloth installed. Having looked at the packaging options for docs, I think it's better just to tar/zip the html files and offer them as a separate download. Everyone knows what they're getting with that. Ideally someone could write a patch (in ruby) to rubygems so that it could create a link to non-RDoc documentation when it installs a gem. cheers alex Kevin Smith wrote: > Alex Fenton wrote: > >> Unless anyone's got any objections I'm going to check the class docs >> textile sources into SVN, for the ported classes at least. Think it >> makes more sense to open these up to editing and patching by human than >> trying to fix more edge cases in the latex translator. >> > > Sounds reasonable to me. > > Kevin > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From alex at pressure.to Thu Sep 21 17:13:47 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 22:13:47 +0100 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point Message-ID: <4513008B.7020405@pressure.to> I'm trying to un-ignore TextCtrl#get_selection. The typemaps work fine, but in the process it breaks get_insertion_point. This is because (on Mac, tho not GTK), get_insertion_point calls get_selection internally and simply returns the first value. I think the return value is being converted from a long to a ruby int twice, because when get_selection is wrapped, it works fine but the value for get_insertion_point becomes a gobbledygook integer. Is there a bit of SWIG magic to stop the values being unwrapped twice for this function? thanks aelx From kees.jongenburger at gmail.com Thu Sep 21 17:25:59 2006 From: kees.jongenburger at gmail.com (Kees Jongenburger) Date: Thu, 21 Sep 2006 23:25:59 +0200 Subject: [Wxruby-users] ArtProvider.i.patch Message-ID: ArtProvider.i patch to make wxruby compile with gcc 4.1.1(gentoo) the error message was: src/ArtProvider.cpp:1664: error: extra qualification 'wxRubyArtProvider::' on member 'GetIcon' -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: text/x-patch Size: 482 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060921/bd4c217f/attachment.bin From alex at pressure.to Thu Sep 21 18:12:49 2006 From: alex at pressure.to (Alex Fenton) Date: Thu, 21 Sep 2006 23:12:49 +0100 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <200609192346.k8JNkeNa030324@yoda.savarese.org> References: <200609192346.k8JNkeNa030324@yoda.savarese.org> Message-ID: <45130E61.2000503@pressure.to> Daniel F. Savarese wrote: > Assuming I understand the problem correctly, this should do the trick: > svn propset svn:executable '' filename > Yep, this seems to do it on OS X. Surprised it affects Windows, but will correct in SVN. alex From alex at pressure.to Thu Sep 21 19:06:51 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 22 Sep 2006 00:06:51 +0100 Subject: [Wxruby-users] Scintilla In-Reply-To: <450D7D03.3030200@mindspring.com> References: <450D7D03.3030200@mindspring.com> Message-ID: <45131B0B.9040301@pressure.to> Roy Sutton wrote: > Here are the patch files for Scintilla. Committed, thank you, this is very nice. Currently windows only. alex From alex at pressure.to Thu Sep 21 19:12:00 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 22 Sep 2006 00:12:00 +0100 Subject: [Wxruby-users] on_paint nightmare In-Reply-To: <451225D8.8090008@mindspring.com> References: <451225D8.8090008@mindspring.com> Message-ID: <45131C40.90604@pressure.to> Roy Sutton wrote: > I was trying out the RMagick sample from the wiki and ran into an > interesting(?) problem: If you resized the window it got stuck in an > endless loop calling onPaint. Haven't seen that, but there is a recent bug filed against evt_paint handlers: http://rubyforge.org/tracker/index.php?func=detail&aid=5383&group_id=35&atid=218 Which sounds like some sort of thingie isn't being memory-managed properly. alex From roys at mindspring.com Fri Sep 22 08:27:36 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 22 Sep 2006 08:27:36 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4513008B.7020405@pressure.to> References: <4513008B.7020405@pressure.to> Message-ID: <4513D6B8.4060905@mindspring.com> Try these patches. I think I'm becoming convinced that the right way to wrap these since we are already including our own .h files instead of SWIGing from the wxWidgets source is to modify the signatures of the functions as follows: virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; If we do this, we don't have to have the %apply in the .i files. Check out the .h file that comes with wxScintilla as an example of a properly prepared .h file. The patch I've included does -not- change the .h file since we haven't committed to this yet. I also patched wxTextCtrl.rbw to show get_selection and added a comment about how it works differently on the PC. I didn't mention that setting TE_RICH2 /should/ allow it to work correctly on all platforms (maybe this is only correct if it's a text control v. 3.0 on Windows?) Roy Alex Fenton wrote: > I'm trying to un-ignore TextCtrl#get_selection. The typemaps work fine, > but in the process it breaks get_insertion_point. > > This is because (on Mac, tho not GTK), get_insertion_point calls > get_selection internally and simply returns the first value. I think the > return value is being converted from a long to a ruby int twice, because > when get_selection is wrapped, it works fine but the value for > get_insertion_point becomes a gobbledygook integer. > > Is there a bit of SWIG magic to stop the values being unwrapped twice > for this function? > > thanks > aelx > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: typemap.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/705ad622/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TextCtrl.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/705ad622/attachment-0001.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxTextCtrl.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/705ad622/attachment-0002.pl From roys at mindspring.com Fri Sep 22 08:28:31 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 22 Sep 2006 08:28:31 -0400 Subject: [Wxruby-users] Patch to bigdemo.rb Message-ID: <4513D6EF.9040600@mindspring.com> This patch changes the overview panel to wrap text to fit the window. Much nicer to look at. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/4a959f72/attachment.pl From roys at mindspring.com Fri Sep 22 08:31:54 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 22 Sep 2006 08:31:54 -0400 Subject: [Wxruby-users] wxImage patches In-Reply-To: <4512D01B.8010803@pressure.to> References: <45122999.5020507@mindspring.com> <4512D01B.8010803@pressure.to> Message-ID: <4513D7BA.4000100@mindspring.com> Alex Fenton wrote: > Committed, thanks. I get several warnings now when compiling Image.cpp > of the type: > > src/Image.cpp: In function `VALUE _wrap_new_wxImage__SWIG_3(int, VALUE*, > long > unsigned int)': > src/Image.cpp:2560: warning: invalid conversion from `char*' to > `unsigned char* > ' > Hmm... Yeah, that's not ideal. I may have to visit that to see if there's a good workaround. I also was noticing that SWIG already handles unsigned char (not the pointer) so I may patch to remove that particular one. >> I think we may need to visit (or document carefully) what happens when >> you pass in a string of data to the constructor or to SetAlpha. >> > We should have aliases that disambiguate the different forms of new - > maybe Image.from_data or .new_from_data. > Could be good. I think wxPython does this. Most of the time we've been able to disambiguate without the use of new method names. Roy From roys at mindspring.com Fri Sep 22 08:40:05 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 22 Sep 2006 08:40:05 -0400 Subject: [Wxruby-users] rubyforge Message-ID: <4513D9A5.9010106@mindspring.com> I think it's time to get me onto the project at rubyforge so I can subscribe to the bug tracker. As we move forwards with more maintenance oriented tasks it will be helpful to be able to patch directly to SVN. For now, I'll keep submitting patches to the list. Roy From roys at mindspring.com Fri Sep 22 16:22:02 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 22 Sep 2006 16:22:02 -0400 Subject: [Wxruby-users] trackobjects and SWIG 1.3.30 Message-ID: <451445EA.2090201@mindspring.com> I have some conditional code based on the SWIG version. Current versions of SWIG 1.3.30 still don't fix %trackobjects correctly so I'm going to remove the test for now so it builds correctly with my version of SWIG. Hopefully before 1.3.30 is released we'll have a better trackobjects in SWIG. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmodule.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/c2869896/attachment-0002.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmainmodule.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060922/c2869896/attachment-0003.pl From wxruby at qualitycode.com Fri Sep 22 20:43:08 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Fri, 22 Sep 2006 20:43:08 -0400 Subject: [Wxruby-users] rubyforge In-Reply-To: <4513D9A5.9010106@mindspring.com> References: <4513D9A5.9010106@mindspring.com> Message-ID: <4514831C.3090104@qualitycode.com> Roy Sutton wrote: > I think it's time to get me onto the project at rubyforge so I can > subscribe to the bug tracker. As we move forwards with more maintenance > oriented tasks it will be helpful to be able to patch directly to SVN. > For now, I'll keep submitting patches to the list. I'm fine with that. Are you "roys" on rubyforge? Kevin From roys at mindspring.com Sat Sep 23 03:03:49 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 23 Sep 2006 03:03:49 -0400 Subject: [Wxruby-users] rubyforge In-Reply-To: <4514831C.3090104@qualitycode.com> References: <4513D9A5.9010106@mindspring.com> <4514831C.3090104@qualitycode.com> Message-ID: <4514DC55.2050006@mindspring.com> Kevin Smith wrote: > I'm fine with that. Are you "roys" on rubyforge? > > Kevin > > Yep, that's me. From roys at mindspring.com Sat Sep 23 05:26:47 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 23 Sep 2006 05:26:47 -0400 Subject: [Wxruby-users] Swig 1.3.30 Message-ID: <4514FDD7.6080500@mindspring.com> Latest CVS copy of SWIG 1.3.30 breaks wxRuby builds. You'll need to grab something before 9/13/06 if you're working from the CVS source. From roys at mindspring.com Sun Sep 24 00:06:08 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 24 Sep 2006 00:06:08 -0400 Subject: [Wxruby-users] Fixed events returning correct object Message-ID: <45160430.8020803@mindspring.com> I have successfully patched the files to return the correct objects from events (and other places where we request back objects and have been getting the wrong thing). In doing so, I found a buglet in the wxSashWindow.rbw file. Here is a patch for that. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxSashWindow.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060924/f8180929/attachment.ksh From ruby at portfolio16.de Sun Sep 24 04:36:21 2006 From: ruby at portfolio16.de (Tobias Gruetzmacher) Date: Sun, 24 Sep 2006 10:36:21 +0200 Subject: [Wxruby-users] Darcs mirror, some fixes & rake patches... Message-ID: <20060924083619.GA5552@portfolio16.de> Hi, as our repository has now been switched to SVN I have stopped my darcs-mirror. Is anyone still interested in the darcs mirror? I would have to set up a new one for the SVN then, since I can't reuse the history of the CVS import. If no one requires the darcs mirror, I would just trash the darcs repository and reactivate it if need arises. In other news, I have some small fixes for GCC 4.1 nitpicking :) The first one (stdcpp.diff) fixes a C++-construct which is not valid C++ at all but wasn't detected by older GCC-versions. The second patch (type-conflict.diff) fixes a GCC compile error, but I'm not sure it's the right fix for the problem. The other two patches are things I noticed when looking through compile messages and the rake files. rake-cleanup.diff removes some code for wx-2.4, which IIRC we don't support anymore, right? ld-reorder.diff takes advantage of the fact that wx-config appends the "-o" to the LD command automatically. This was only tested on Linux, tests on OS X and Windows are welcome. Greetings, Tobi PS: I'm currently using quilt to manage my local patches, which is a very cool tool for that purpose. -- GPG-Key 0xE2BEA341 - signed/encrypted mail preferred My, oh so small, homepage: http://portfolio16.de/ http://www.fli4l.de/ - ISDN- & DSL-Router on one disk! Registered FLI4L-User #00000003 -------------- next part -------------- Index: wxruby2-trunk/swig/classes/ArtProvider.i =================================================================== --- wxruby2-trunk.orig/swig/classes/ArtProvider.i 2006-09-24 09:39:52.312517233 +0200 +++ wxruby2-trunk/swig/classes/ArtProvider.i 2006-09-24 09:40:11.005163390 +0200 @@ -51,9 +51,9 @@ return wxArtProvider::GetBitmap(id, client, size); } - static wxIcon wxRubyArtProvider::GetIcon(const wxArtID& id, - const wxArtClient& client, - const wxSize& size) + static wxIcon GetIcon(const wxArtID& id, + const wxArtClient& client, + const wxSize& size) { return wxArtProvider::GetIcon(id, client, size); } -------------- next part -------------- Index: wxruby2-trunk/swig/classes/Image.i =================================================================== --- wxruby2-trunk.orig/swig/classes/Image.i 2006-09-24 09:41:12.228960759 +0200 +++ wxruby2-trunk/swig/classes/Image.i 2006-09-24 09:41:25.927325576 +0200 @@ -9,7 +9,6 @@ #include %} -%apply char * { unsigned char * } %apply char { unsigned char } %ignore wxImage::Create(); -------------- next part -------------- Index: wxruby2-trunk/rake/rakewx.rb =================================================================== --- wxruby2-trunk.orig/rake/rakewx.rb 2006-09-24 09:48:32.858257464 +0200 +++ wxruby2-trunk/rake/rakewx.rb 2006-09-24 09:49:02.903434572 +0200 @@ -92,11 +92,6 @@ def use_wx_config $wx_version = wx_config("--version") $wx_cppflags = wx_config("--cppflags") - if ($wx_version >= "2.5") - $wx_ldflags = "" - else - $wx_ldflags = wx_config("--ldflags") - end $wx_libs = wx_config("--libs") $cpp = wx_config("--cxx") $ld = wx_config("--ld") Index: wxruby2-trunk/rakefile =================================================================== --- wxruby2-trunk.orig/rakefile 2006-09-24 09:49:30.393175312 +0200 +++ wxruby2-trunk/rakefile 2006-09-24 09:50:00.963638792 +0200 @@ -50,7 +50,7 @@ ############################# # put it all together $cppflags = [$wx_cppflags, $ruby_cppflags, $extra_cppflags, $ruby_includes].join(' ') -$ldflags = [$wx_ldflags, $ruby_ldflags, $extra_ldflags].join(' ') +$ldflags = [$ruby_ldflags, $extra_ldflags].join(' ') $libs = [$wx_libs, $ruby_libs, $extra_libs].join(' ') $extra_objs = $extra_objs $dl_lib = "wxruby2.#{$dl_ext}" -------------- next part -------------- Index: wxruby2-trunk/rake/rakemswin.rb =================================================================== --- wxruby2-trunk.orig/rake/rakemswin.rb 2006-09-24 09:54:49.956859104 +0200 +++ wxruby2-trunk/rake/rakemswin.rb 2006-09-24 09:54:56.124048773 +0200 @@ -10,8 +10,7 @@ include Config $cpp = "cl.exe" -$ld = "link" -$link_output_flag = "/dll /out:" +$ld = "link /dll /out:" # native Windows - requires a static build of wxWindows $WXDIR=ENV['WXWIN'] Index: wxruby2-trunk/rake/rakewx.rb =================================================================== --- wxruby2-trunk.orig/rake/rakewx.rb 2006-09-24 09:55:20.327598717 +0200 +++ wxruby2-trunk/rake/rakewx.rb 2006-09-24 09:55:45.766977428 +0200 @@ -333,7 +333,7 @@ file($target_lib => all_obj_files) do |t| objs = $extra_objs + " " + all_obj_files.join(' ') force_mkdir($dest_dir) - sh "#{$ld} #{$ldflags} #{objs} #{$libs} #{$link_output_flag}#{t.name}" + sh "#{$ld}#{t.name} #{$ldflags} #{objs} #{$libs}" end end Index: wxruby2-trunk/rakefile =================================================================== --- wxruby2-trunk.orig/rakefile 2006-09-24 09:53:17.568354401 +0200 +++ wxruby2-trunk/rakefile 2006-09-24 09:53:47.438038663 +0200 @@ -33,7 +33,6 @@ $extra_ldflags = "" $extra_objs = "" $extra_libs = "" -$link_output_flag = "-o " ############################# # platform-specific -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060924/e6ff474b/attachment.bin From alex at pressure.to Sun Sep 24 05:48:01 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 10:48:01 +0100 Subject: [Wxruby-users] ArtProvider.i.patch In-Reply-To: References: Message-ID: <45165451.2050708@pressure.to> Kees Jongenburger wrote: > ArtProvider.i patch to make wxruby compile with gcc 4.1.1(gentoo) Committed, thank you alex From roys at mindspring.com Sun Sep 24 08:38:07 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 24 Sep 2006 08:38:07 -0400 Subject: [Wxruby-users] Patch to fix get_event_object Message-ID: <45167C2F.4000208@mindspring.com> This patch will fix the files so that SWIG returns the correct object when get_event_object is called. I think I had submitted part of this before but it looks like I either forgot to sync or it hasn't been applied yet. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmodule.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060924/2b0e4460/attachment.pl From roys at mindspring.com Sun Sep 24 08:40:10 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 24 Sep 2006 08:40:10 -0400 Subject: [Wxruby-users] Darcs mirror, some fixes & rake patches... In-Reply-To: <20060924083619.GA5552@portfolio16.de> References: <20060924083619.GA5552@portfolio16.de> Message-ID: <45167CAA.2020503@mindspring.com> Tobias Gruetzmacher wrote: > Hi, > > as our repository has now been switched to SVN I have stopped my > darcs-mirror. Is anyone still interested in the darcs mirror? I would > have to set up a new one for the SVN then, since I can't reuse the > history of the CVS import. If no one requires the darcs mirror, I would > just trash the darcs repository and reactivate it if need arises. > That sounds good. I haven't used the darcs mirror since we tested it long ago. > > Index: wxruby2-trunk/swig/classes/Image.i > =================================================================== > --- wxruby2-trunk.orig/swig/classes/Image.i 2006-09-24 09:41:12.228960759 +0200 > +++ wxruby2-trunk/swig/classes/Image.i 2006-09-24 09:41:25.927325576 +0200 > @@ -9,7 +9,6 @@ > #include > %} > > -%apply char * { unsigned char * } > %apply char { unsigned char } > > %ignore wxImage::Create(); > > Since I just applied this change let me re-patch this with a typemap that doesn't give warnings. Roy From alex at pressure.to Sun Sep 24 08:52:34 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 13:52:34 +0100 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4513D6B8.4060905@mindspring.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> Message-ID: <45167F92.8050409@pressure.to> Roy Sutton wrote: > Try these patches. Committed, thanks. > I think I'm becoming convinced that the right way to wrap these since > we are already including our own .h files instead of SWIGing from the > wxWidgets source is to modify the signatures of the functions as follows: I'm inclined to agree - when relatively few methods are affected, I think it's clearer to have the mapping done with the method, rather than through the global and rather obscure 'apply' technique. > I didn't mention that setting TE_RICH2 /should/ allow it to work > correctly on all platforms (maybe this is only correct if it's a text > control v. 3.0 on Windows?) I think TE_RICH2 makes it work correctly across all platforms. I don't know if there are any circumstances where TE_RICH alone is more useful? alex From alex at pressure.to Sun Sep 24 08:53:19 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 13:53:19 +0100 Subject: [Wxruby-users] trackobjects and SWIG 1.3.30 In-Reply-To: <451445EA.2090201@mindspring.com> References: <451445EA.2090201@mindspring.com> Message-ID: <45167FBF.8090503@pressure.to> Roy Sutton wrote: > I have some conditional code based on the SWIG version. Current > versions of SWIG 1.3.30 still don't fix %trackobjects correctly so I'm > going to remove the test for now so it builds correctly with my > version of SWIG. Hopefully before 1.3.30 is released we'll have a > better trackobjects in SWIG. Applied. Thanks for the patches, and for keeping a watch on SWIG dev. cheers alex From alex at pressure.to Sun Sep 24 09:04:58 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 14:04:58 +0100 Subject: [Wxruby-users] Patch to bigdemo.rb In-Reply-To: <4513D6EF.9040600@mindspring.com> References: <4513D6EF.9040600@mindspring.com> Message-ID: <4516827A.9080101@pressure.to> Roy Sutton wrote: > This patch changes the overview panel to wrap text to fit the window. > Much nicer to look at. Applied, thanks. Alex From alex at pressure.to Sun Sep 24 09:09:09 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 14:09:09 +0100 Subject: [Wxruby-users] rubyforge In-Reply-To: <4513D9A5.9010106@mindspring.com> References: <4513D9A5.9010106@mindspring.com> Message-ID: <45168375.9050702@pressure.to> Roy Sutton wrote: > I think it's time to get me onto the project at rubyforge so I can > subscribe to the bug tracker. I fully support this - will save time with patches to docs, samples etc. Think it's still preferable to review larger SWIG changes cross-platform. alex From alex at pressure.to Sun Sep 24 16:10:36 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 21:10:36 +0100 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <451052AD.7060205@mindspring.com> References: <451052AD.7060205@mindspring.com> Message-ID: <4516E63C.80801@pressure.to> Roy Sutton wrote: > The files checked out of SVN come out without the ability to be > executed. So, I can't run the samples without prefixing with 'ruby ' > Before, the file associations allowed me to run samples just by putting > the name on the command line. Can we fix this? > All samples files should have the svn:executable property set now. alex From alex at pressure.to Sun Sep 24 16:12:46 2006 From: alex at pressure.to (Alex Fenton) Date: Sun, 24 Sep 2006 21:12:46 +0100 Subject: [Wxruby-users] Patch to fix get_event_object In-Reply-To: <45167C2F.4000208@mindspring.com> References: <45167C2F.4000208@mindspring.com> Message-ID: <4516E6BE.6060704@pressure.to> Roy Sutton wrote: > This patch will fix the files so that SWIG returns the correct object > when get_event_object is called. I think I had submitted part of this > before but it looks like I either forgot to sync or it hasn't been > applied yet. I don't think I have seen a patch to fix get_event_object before, but some of the attached patch has been committed. I think a problem with the laggy mailing lists at the moment. Could you update and re-submit the patch please? thanks alex From roys at mindspring.com Sun Sep 24 18:28:22 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 24 Sep 2006 18:28:22 -0400 Subject: [Wxruby-users] SVN and demo files In-Reply-To: <4516E63C.80801@pressure.to> References: <451052AD.7060205@mindspring.com> <4516E63C.80801@pressure.to> Message-ID: <45170686.3000001@mindspring.com> Alex Fenton wrote: > All samples files should have the svn:executable property set now. > > Thanks! From roys at mindspring.com Sun Sep 24 18:34:54 2006 From: roys at mindspring.com (Roy Sutton) Date: Sun, 24 Sep 2006 18:34:54 -0400 Subject: [Wxruby-users] SWIG exceptions Message-ID: <4517080E.2040409@mindspring.com> I was trying to fix the problem with wxImage and the char */unsigned char * thing today and I was going to hand-write the functions to translate between the two. While doing so I decided I'd clean up the SWIG error message to make it more clear. Here's an example SWIG-generated argument error: in method SetData', argument 2 of type 'wxImage *' This seems to require a bit of knowledge about the wxWidgets library and C types. I thought it might be a bit clearer to change these to something like: in method 'set_data', argument 1 expected 'Wx::Image' (note argument errors are off by one since the calling object is argument 1) How do you feel about this? From sean.m.long at gmail.com Sun Sep 24 23:34:10 2006 From: sean.m.long at gmail.com (Sean Long) Date: Sun, 24 Sep 2006 20:34:10 -0700 Subject: [Wxruby-users] SWIG exceptions In-Reply-To: <4517080E.2040409@mindspring.com> References: <4517080E.2040409@mindspring.com> Message-ID: Could we have the current way when building in debug mode and use the new version for release? Or possibly someway to enable the old behavior if it is needed for debugging. 99% of the time the new way is what I would want but the original may come in handy if you need to dive into the swig generated code. Also Roy you are doing a lot of good work lately keep it up! Thanks. Sean On 9/24/06, Roy Sutton wrote: > I was trying to fix the problem with wxImage and the char */unsigned > char * thing today and I was going to hand-write the functions to > translate between the two. While doing so I decided I'd clean up the > SWIG error message to make it more clear. Here's an example > SWIG-generated argument error: > > in method SetData', argument 2 of type 'wxImage *' > > This seems to require a bit of knowledge about the wxWidgets library and > C types. I thought it might be a bit clearer to change these to > something like: > > in method 'set_data', argument 1 expected 'Wx::Image' > > (note argument errors are off by one since the calling object is argument 1) > > How do you feel about this? > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From roys at mindspring.com Mon Sep 25 00:02:47 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 25 Sep 2006 00:02:47 -0400 Subject: [Wxruby-users] Image.i.patch Message-ID: <451754E7.8080007@mindspring.com> This patch should fix the problems with the compiler warnings/errors associated with the unsigned/signed char * typemap I had before. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Image.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060925/cbd3bbcf/attachment.ksh From roys at mindspring.com Mon Sep 25 09:12:59 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 25 Sep 2006 09:12:59 -0400 Subject: [Wxruby-users] SWIG exceptions In-Reply-To: References: <4517080E.2040409@mindspring.com> Message-ID: <4517D5DB.7020405@mindspring.com> Sean Long wrote: > Could we have the current way when building in debug mode and use the > new version for release? Or possibly someway to enable the old > behavior if it is needed for debugging. > > 99% of the time the new way is what I would want but the original may > come in handy if you need to dive into the swig generated code. > Well, absolutely. I think we should do this in Ruby with fixmodule.rb and fixmainmodule.rb. In fact, anyone with some ruby experience should be able to whip this one up (hint hint). I won't take a crack at this for a while so I'd be pleased to have someone beat me to it. > Also Roy you are doing a lot of good work lately keep it up! Thanks. > Shucks. Now if only I were making as much progress on the things I get paid for... Roy From wxruby at qualitycode.com Mon Sep 25 09:39:14 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 09:39:14 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4513D6B8.4060905@mindspring.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> Message-ID: <4517DC02.4010600@qualitycode.com> Roy Sutton wrote: > I think I'm becoming convinced that the right way to wrap these since we > are already including our own .h files instead of SWIGing from the > wxWidgets source is to modify the signatures of the functions as follows: > > virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; I like the concept, but am not quite happy with the details. From looking at the signature above, I have no idea what each of the two parameters mean (X, Y? start, end?). Can we come up with a way to mark them as output without losing any information? If not, then I think I would favor simply having one SWIG directive for each method. (I'm not fond of having a generic SWIG directive that applies to a signature if that signature is ambiguous and could happen in cases that we don't want to affect. Kevin From wxruby at qualitycode.com Mon Sep 25 09:47:54 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 09:47:54 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4513D6B8.4060905@mindspring.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> Message-ID: <4517DE0A.10504@qualitycode.com> Roy Sutton wrote: > def on_test_get_selection(event) > - text = @tc.get_string_selection() > - @log.write_text("get_string_selection(): " + text) > + start, stop = @tc.get_selection > + text = @tc.get_string_selection # On WXMSW, is you select text using > + # the results of get_selection you > + # must replace \r\n\ with \n before > + # taking your selection > + @log.write_text("get_string_selection [#{start}..#{stop}]: " + text) > end Again, thanks for all your work recently! I'm sorry I have again been somewhat unavailable. I would slightly prefer this formatting: start, stop = @tc.get_selection # On WXMSW, is you select text using the results of get_selection # you must replace \r\n\ with \n before taking your selection text = @tc.get_string_selection @log.write_text("get_string_selection [#{start}..#{stop}]: " + text) There is also a typo ("is" should be "if). From that wording though, it is not clear to me whether this code, as is, will work on MSW. It sounds like it won't. But I'm not sure. Would I need to do something before the @tc.get_selection call, or before the @tc.get_string_selection call, or later in the program? Thanks, Kevin From wxruby at qualitycode.com Mon Sep 25 09:53:42 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 09:53:42 -0400 Subject: [Wxruby-users] rubyforge In-Reply-To: <45168375.9050702@pressure.to> References: <4513D9A5.9010106@mindspring.com> <45168375.9050702@pressure.to> Message-ID: <4517DF66.1030406@qualitycode.com> Alex Fenton wrote: > Roy Sutton wrote: >> I think it's time to get me onto the project at rubyforge so I can >> subscribe to the bug tracker. > I fully support this - will save time with patches to docs, samples etc. Ok. I added "roys" as a "Senior Developer", allowing SCM access, plus the ability to directly upload to the Files area, and to manage bugs. > Think it's still preferable to review larger SWIG changes cross-platform. Yes. Kevin From wxruby at qualitycode.com Mon Sep 25 09:58:12 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 09:58:12 -0400 Subject: [Wxruby-users] Darcs mirror, In-Reply-To: <20060924083619.GA5552@portfolio16.de> References: <20060924083619.GA5552@portfolio16.de> Message-ID: <4517E074.9010005@qualitycode.com> Tobias Gruetzmacher wrote: > Hi, > > as our repository has now been switched to SVN I have stopped my > darcs-mirror. Is anyone still interested in the darcs mirror? If anyone has been using it, I hope they let us know. Personally, I have not used it recently. I never learned to like darcs enough to use it over CVS. I'm still waiting for bzr. Thanks for hosting the darcs repo, though. I think it was a valuable experiment. Kevin From wxruby at qualitycode.com Mon Sep 25 10:05:37 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 10:05:37 -0400 Subject: [Wxruby-users] SWIG exceptions In-Reply-To: <4517080E.2040409@mindspring.com> References: <4517080E.2040409@mindspring.com> Message-ID: <4517E231.7050003@qualitycode.com> Roy Sutton wrote: > in method SetData', argument 2 of type 'wxImage *' > > This seems to require a bit of knowledge about the wxWidgets library and > C types. I thought it might be a bit clearer to change these to > something like: > > in method 'set_data', argument 1 expected 'Wx::Image' To borrow a convention from other lists[1], I think I am +0 on this. Sean raises an interesting idea (deciding what to display based on whether it is a debug build), but I don't think I like that. I would prefer to keep it always one way or always the other. Since we are mangling the name, and since this is first an foremost a Ruby project with a Ruby audience, I don't see a problem with providing the error message customized to a Ruby context. Assuming it's fairly clean and simple to do so. Kevin [1] A means of succinctly "voting" on proposals: +1 = support +0 = slightly positive, but not full support -0 = slightly negative, but not opposed -1 = opposed From wxruby at qualitycode.com Mon Sep 25 10:27:23 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 25 Sep 2006 10:27:23 -0400 Subject: [Wxruby-users] Versioning in rake In-Reply-To: <450BE567.3040301@pressure.to> References: <450BE567.3040301@pressure.to> Message-ID: <4517E74B.3040702@qualitycode.com> Alex Fenton wrote: > Attached a set of patches to remove hardcoded version strings in the > rakefiles and libs. Sorry about the late feedback, but this was very nicely done. Thanks! Kevin From roys at mindspring.com Mon Sep 25 12:46:09 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 25 Sep 2006 12:46:09 -0400 Subject: [Wxruby-users] Frame and MiniFrame Message-ID: <451807D1.1020700@mindspring.com> In my builds on my system I cannot run both the MiniFrame and Frame examples in BigDemo one after the other. Does this happen for anyone else with the current checked-in code? I'm not sure if it's my SWIG or recent changes. I get the following error: superclass mismatch for class MyFrame Anyone? From roys at mindspring.com Mon Sep 25 13:32:13 2006 From: roys at mindspring.com (Roy Sutton) Date: Mon, 25 Sep 2006 13:32:13 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4517DC02.4010600@qualitycode.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> <4517DC02.4010600@qualitycode.com> Message-ID: <4518129D.1090309@mindspring.com> Kevin Smith wrote: > Roy Sutton wrote: > >> I think I'm becoming convinced that the right way to wrap these since we >> are already including our own .h files instead of SWIGing from the >> wxWidgets source is to modify the signatures of the functions as follows: >> >> virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; >> > > I like the concept, but am not quite happy with the details. From > looking at the signature above, I have no idea what each of the two > parameters mean (X, Y? start, end?). > > Can we come up with a way to mark them as output without losing any > information? If not, then I think I would favor simply having one SWIG > directive for each method. (I'm not fond of having a generic SWIG > directive that applies to a signature if that signature is ambiguous and > could happen in cases that we don't want to affect. > > Unfortunately you can't apply (most) swig directives by method. Only by parameters. I would say that anyone using our copy of the header files to figure out what the parameters do is probably not doing himself a favor anyhow. The other alternative is doing this: #ifdef SWIG virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; #else virtual void GetSelection(long* from, long* to) const; #endif From roys at mindspring.com Tue Sep 26 02:25:12 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 02:25:12 -0400 Subject: [Wxruby-users] Frame and MiniFrame patch Message-ID: <4518C7C8.4020608@mindspring.com> This patch allows them to both work. Basically, I renamed the class for the MiniFrame sample. I was under the mistaken impression that Ruby let you redefine a class. Anyone know how to do that? The wxFrame.rbw patch just centers the window for looks. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxMiniFrame.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/d739cdeb/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxFrame.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/d739cdeb/attachment-0001.pl From roys at mindspring.com Tue Sep 26 03:28:53 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 03:28:53 -0400 Subject: [Wxruby-users] WindowDC.i.patch Message-ID: <4518D6B5.3030606@mindspring.com> unignores GetTextExtent (fixes problem with new SWIG 1.3.30 builds) -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: WindowDC.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/c228f4df/attachment.pl From roys at mindspring.com Tue Sep 26 03:51:51 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 03:51:51 -0400 Subject: [Wxruby-users] ScrolledWindow.i.patch Message-ID: <4518DC17.10907@mindspring.com> Fixes up some methods used in the scrolled window. [For giggles, try putting a GC.disable into wxScrolledWindow.rbw and try the sample. With my current build on Windows, it's very ugly what happens after a certain point.] -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ScrolledWindow.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/b0bb6aa5/attachment.pl From ruby at portfolio16.de Tue Sep 26 07:34:16 2006 From: ruby at portfolio16.de (Tobias Gruetzmacher) Date: Tue, 26 Sep 2006 13:34:16 +0200 Subject: [Wxruby-users] Fix for rubygems-less systems Message-ID: <20060926113416.GA6048@portfolio16.de> Hi, here is just a quick fix for systems without rubygems. As an alternative, one could define the method in the LoadError exception handler of the rakepackage-require at the beginning of the file, but I like this solution better. Greetings, Tobi -- GPG-Key 0xE2BEA341 - signed/encrypted mail preferred My, oh so small, homepage: http://portfolio16.de/ http://www.fli4l.de/ - ISDN- & DSL-Router on one disk! Registered FLI4L-User #00000003 -------------- next part -------------- Index: wxruby2/rakefile =================================================================== --- wxruby2/rakefile (Revision 592) +++ wxruby2/rakefile (Arbeitskopie) @@ -69,9 +69,12 @@ ############################# # public tasks begin - create_internal_non_swig_tasks - create_internal_swig_tasks - create_release_tasks + create_internal_non_swig_tasks + create_internal_swig_tasks + if self.respond_to? :create_release_tasks + create_release_tasks + end + desc "Create the binary Ruby library file" task :default => :link -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/ca3b65ec/attachment.bin From wxruby at qualitycode.com Tue Sep 26 10:38:26 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 26 Sep 2006 10:38:26 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4518129D.1090309@mindspring.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> <4517DC02.4010600@qualitycode.com> <4518129D.1090309@mindspring.com> Message-ID: <45193B62.2050205@qualitycode.com> Roy Sutton wrote: > Unfortunately you can't apply (most) swig directives by method. Only by > parameters. I would say that anyone using our copy of the header files > to figure out what the parameters do is probably not doing himself a > favor anyhow. > > The other alternative is doing this: > > #ifdef SWIG > > virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; > #else > virtual void GetSelection(long* from, long* to) const; > #endif Ugh. That's worse. How about: virtual void GetSelection(long* from_OUTPUT, long* to_OUTPUT) const; It would still require adding a specific directive for each method. I view that as both an advantage (avoids accidental misinterpretation of other methods) and disadvantage (more work and maintenance). Thoughts? Kevin From alex at pressure.to Tue Sep 26 13:40:57 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 18:40:57 +0100 Subject: [Wxruby-users] SWIG exceptions In-Reply-To: <4517080E.2040409@mindspring.com> References: <4517080E.2040409@mindspring.com> Message-ID: <45196629.9040003@pressure.to> Roy Sutton wrote: > I thought it might be a bit clearer to change these to something like: > > in method 'set_data', argument 1 expected 'Wx::Image' > +1, prefer it to be standard across all builds Incidentally, I think SWIG should be raising a TypeError not an ArgumentError here: irb(main):001:0> 'abcdef'.index(:foo) TypeError: type mismatch: Symbol given from (irb):1:in `index' from (irb):1 irb(main):002:0> 'abcdef'.index(4, 5, :foo) ArgumentError: wrong number of arguments (3 for 2) from (irb):2:in `index' from (irb):2 alex From alex at pressure.to Tue Sep 26 16:24:04 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 21:24:04 +0100 Subject: [Wxruby-users] Frame and MiniFrame patch In-Reply-To: <4518C7C8.4020608@mindspring.com> References: <4518C7C8.4020608@mindspring.com> Message-ID: <45198C64.9040106@pressure.to> Roy Sutton wrote: > This patch allows them to both work. Applied, plus fix for constant redefinition warning. > I was under the mistaken impression that Ruby let you redefine a > class. Anyone know how to do that? You can reopen a class, and redefine methods within it. But you can't redefine a class's superclass. > The wxFrame.rbw patch just centers the window for looks. applied alex From alex at pressure.to Tue Sep 26 16:34:21 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 21:34:21 +0100 Subject: [Wxruby-users] WindowDC.i.patch In-Reply-To: <4518D6B5.3030606@mindspring.com> References: <4518D6B5.3030606@mindspring.com> Message-ID: <45198ECD.1010307@pressure.to> Roy Sutton wrote: > unignores GetTextExtent (fixes problem with new SWIG 1.3.30 builds) committed, thank you for the patch. alex From roys at mindspring.com Tue Sep 26 17:04:25 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 17:04:25 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <45193B62.2050205@qualitycode.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> <4517DC02.4010600@qualitycode.com> <4518129D.1090309@mindspring.com> <45193B62.2050205@qualitycode.com> Message-ID: <451995D9.1060702@mindspring.com> Kevin Smith wrote: > Roy Sutton wrote: > >> Unfortunately you can't apply (most) swig directives by method. Only by >> parameters. I would say that anyone using our copy of the header files >> to figure out what the parameters do is probably not doing himself a >> favor anyhow. >> >> The other alternative is doing this: >> >> #ifdef SWIG >> >> virtual void GetSelection(long* OUTPUT, long* OUTPUT) const; >> #else >> virtual void GetSelection(long* from, long* to) const; >> #endif >> > > Ugh. That's worse. > > How about: > > > virtual void GetSelection(long* from_OUTPUT, long* to_OUTPUT) const; > > It would still require adding a specific directive for each method. I > view that as both an advantage (avoids accidental misinterpretation of > other methods) and disadvantage (more work and maintenance). > > Thoughts? My initial thought is: Let's shelve this until we figure out how wxPython has it all sorted out. If we someday move to some sort of XML post-processing I don't want to have spent even more time on this than necessary. I already feel like a lot of my SWIG work will be obviated by whatever new method we choose. Roy From alex at pressure.to Tue Sep 26 17:55:16 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 22:55:16 +0100 Subject: [Wxruby-users] Image.i.patch In-Reply-To: <451754E7.8080007@mindspring.com> References: <451754E7.8080007@mindspring.com> Message-ID: <4519A1C4.7080806@pressure.to> Roy Sutton wrote: > This patch should fix the problems with the compiler warnings/errors > associated with the unsigned/signed char * typemap I had before. Applied, thanks. Alex From alex at pressure.to Tue Sep 26 18:02:55 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 23:02:55 +0100 Subject: [Wxruby-users] ScrolledWindow.i.patch In-Reply-To: <4518DC17.10907@mindspring.com> References: <4518DC17.10907@mindspring.com> Message-ID: <4519A38F.1030806@pressure.to> Roy Sutton wrote: > Fixes up some methods used in the scrolled window. Neat. Applied, thanks. This fixes the following methods - would be good if someone has time to update the docs for ScrolledWindow (doc/textile/scrolledwindow.txtl) with the correct ruby signatures: calc_scrolled_position(x,y) calc_unscrolled_position(x,y) get_scroll_pixels_per_unit() get_view_start() get_virtual_size() Funnily enough, disabling GC has no effect (release). I was looking forward to a giggle... alex From alex at pressure.to Tue Sep 26 18:17:49 2006 From: alex at pressure.to (Alex Fenton) Date: Tue, 26 Sep 2006 23:17:49 +0100 Subject: [Wxruby-users] Fix for rubygems-less systems In-Reply-To: <20060926113416.GA6048@portfolio16.de> References: <20060926113416.GA6048@portfolio16.de> Message-ID: <4519A70D.9090300@pressure.to> Tobias Gruetzmacher wrote: > here is just a quick fix for systems without rubygems. Thanks. This was applied as: if Object.respond_to?(:create_release_tasks, true) ... b/c the patch wasn't picking up the definition of the top-level method alex ps I've not forgotten your other rake patches - but short of time so leaving patches that'll need a full recompile. From alex at pressure.to Tue Sep 26 19:08:21 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 27 Sep 2006 00:08:21 +0100 Subject: [Wxruby-users] tag and release 0.0.36 Message-ID: <4519B2E5.4060203@pressure.to> I'm planning to tag 0.0.36 and release binaries from it. We have lots of good new methods & classes & samples (mainly thanks to Roy), and I would like to get a unicode Windows binary gem out there. TODO are integrate Scintilla on OS X and Linux, and apply Tobias's patches to rakefiles. These'll be for early in 0.0.37. Maybe someone with Subversion experience could confirm that this looks like the right command to 'tag': svn copy svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/trunk/wxruby2 svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/tags/v0_0_36 Was a discussion on the ruby mailing list in the last day or two where someone wanted a 'cross-platform GUI toolkit with native widgets' but it took a while before anyone suggested wxruby... will be good to have 'mindshare' again among people newly finding ruby ... alex From roys at mindspring.com Tue Sep 26 20:10:59 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 20:10:59 -0400 Subject: [Wxruby-users] ScrolledWindow.i.patch In-Reply-To: <4519A38F.1030806@pressure.to> References: <4518DC17.10907@mindspring.com> <4519A38F.1030806@pressure.to> Message-ID: <4519C193.8050008@mindspring.com> Alex Fenton wrote: > Funnily enough, disabling GC has no effect (release). I was looking > forward to a giggle... > Did you remove the call to free from the sample? I didn't patch that yet as I still don't have it working well. Roy From roys at mindspring.com Tue Sep 26 20:27:23 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 20:27:23 -0400 Subject: [Wxruby-users] Window.i Message-ID: <4519C56B.3030506@mindspring.com> Does anyone know if the XRC hand-coded methods in Window.i are still required after my recent change to return the correct types? Also, given that wxWindow.h is included all over the place, I think we need to move some of that stuff out into a common .i that's included for all wxWindow descendants. Roy From roys at mindspring.com Tue Sep 26 20:30:56 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 20:30:56 -0400 Subject: [Wxruby-users] GetSize and GetPosition Message-ID: <4519C640.5000203@mindspring.com> Right now we default to returning objects instead of arrays. perl/python have alternates that return tuples/lists. Do we want to %alias those so we can get arrays back or does it really matter? From roys at mindspring.com Tue Sep 26 22:04:41 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 22:04:41 -0400 Subject: [Wxruby-users] tag and release 0.0.36 In-Reply-To: <4519B2E5.4060203@pressure.to> References: <4519B2E5.4060203@pressure.to> Message-ID: <4519DC39.3040001@mindspring.com> I have a couple good patches to get in quickly if we can. It -almost- makes wxScrolledWindow a functional example. Rroy Alex Fenton wrote: > I'm planning to tag 0.0.36 and release binaries from it. We have lots of > good new methods & classes & samples (mainly thanks to Roy), and I would > like to get a unicode Windows binary gem out there. > > TODO are integrate Scintilla on OS X and Linux, and apply Tobias's > patches to rakefiles. These'll be for early in 0.0.37. > > Maybe someone with Subversion experience could confirm that this looks > like the right command to 'tag': > > svn copy > svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/trunk/wxruby2 > svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/tags/v0_0_36 > > Was a discussion on the ruby mailing list in the last day or two where > someone wanted a 'cross-platform GUI toolkit with native widgets' but it > took a while before anyone suggested wxruby... will be good to have > 'mindshare' again among people newly finding ruby ... > > alex > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Tue Sep 26 22:06:45 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 22:06:45 -0400 Subject: [Wxruby-users] wxWindow.h.patch Message-ID: <4519DCB5.20407@mindspring.com> This patch file removes 'virtual' from several methods that aren't supposed to have it. Also, it changes two parameters to x_INOUT and y_INOUT as was suggested by Kevin. I broke down and did this because it's one of the few places that int *'s are used for input and output. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxWindow.h.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/90a613a1/attachment.pl From roys at mindspring.com Tue Sep 26 22:07:53 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 22:07:53 -0400 Subject: [Wxruby-users] Window.i.patch Message-ID: <4519DCF9.4020707@mindspring.com> This patch file takes advantage of the parameter name change I made in wxWindow.h -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Window.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/076f0889/attachment-0001.pl From roys at mindspring.com Tue Sep 26 22:10:51 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 22:10:51 -0400 Subject: [Wxruby-users] Menu.i.patch Message-ID: <4519DDAB.2080201@mindspring.com> Patch to disown wxMenuItems after they are attached to a menu. I'll have a few more like this shortly. I'm using wxPython as a cheat-sheet for parameters that should be 'DISOWN' Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Menu.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/a303c0e7/attachment.pl From roys at mindspring.com Tue Sep 26 22:13:11 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 22:13:11 -0400 Subject: [Wxruby-users] wxScrolledWindow.rbw Message-ID: <4519DE37.1080102@mindspring.com> This patch removes the call to 'free' from the sample. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxScrolledWindow.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/8db81f84/attachment.pl From roys at mindspring.com Tue Sep 26 23:10:26 2006 From: roys at mindspring.com (Roy Sutton) Date: Tue, 26 Sep 2006 23:10:26 -0400 Subject: [Wxruby-users] Scintilla into bigdemo.rb Message-ID: <4519EBA2.1020604@mindspring.com> This patch changes the code box to use Scintilla if it's available. I also added a couple of notes in there for things to fix in the future. I never knew we -had- a search feature. Find and Find Next were probably broken before and may not work too well on systems without scintilla. At least it works with Scintilla now. Things look pretty darn spiffy right now. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060926/40e41c9e/attachment.pl From florian.assmann at email.de Wed Sep 27 01:56:14 2006 From: florian.assmann at email.de (=?ISO-8859-1?Q?Florian_A=DFmann?=) Date: Wed, 27 Sep 2006 07:56:14 +0200 Subject: [Wxruby-users] Installation success, execution failed Message-ID: Hello, after I wasn't able to install wxruby via gem (404) I downloaded the file from rubyforge and installed it on my intel mac. No failure the so I tried to start the minimal.rb with ruby -r/r?/ ubegems ... This didn't work so I tried to do it in irb but the same error occured: irb(main):001:0> require 'rubygems' => true irb(main):002:0> load '/usr/local/lib/ruby/gems/1.8/gems/wxruby2- preview-0.0.35-i686-darwin8.4.1/samples/minimal/minimal.rb' dyld: NSLinkModule() error dyld: Library not loaded: /usr/local/lib/libpng.3.dylib Referenced from: /usr/local/lib/ruby/gems/1.8/gems/wxruby2- preview-0.0.35-i686-darwin8.4.1/lib/wxruby2.bundle Reason: image not found Trace/BPT trap Regards Florian From roys at mindspring.com Wed Sep 27 03:05:01 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 27 Sep 2006 03:05:01 -0400 Subject: [Wxruby-users] New, more different bigdemo.rb Message-ID: <451A229D.6080609@mindspring.com> This version lays the groundwork for even more scintilla goodness. I did find a disturbing little bug though that I documented in there: If you inherit from TextCtrl then text you load into it (on Windows at least) gets compressed onto all one line. Sorry again it's not incremental. Hopefully you haven't applied the old one. (I did download quilt but I have no idea where to start with it) Roy From roys at mindspring.com Wed Sep 27 03:05:30 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 27 Sep 2006 03:05:30 -0400 Subject: [Wxruby-users] missing file Message-ID: <451A22BA.1040709@mindspring.com> Here's that bigdemo.rb.patch I talked about. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bigdemo.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060927/ca40df2d/attachment.ksh From yvon_thoraval at mac.com Wed Sep 27 04:05:01 2006 From: yvon_thoraval at mac.com (Yvon Thoraval) Date: Wed, 27 Sep 2006 10:05:01 +0200 Subject: [Wxruby-users] Installation success, execution failed In-Reply-To: References: Message-ID: <0C141730-2B20-48E5-8839-794BC2F00AA8@mac.com> Le 27 sept. 06 ? 07:56, Florian A?mann a ?crit : > Hello, after I wasn't able to install wxruby via gem (404) I may be the server was down ? try again, i did that this morning the finge in the noze ))) best, Yvon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20060927/d08b6867/attachment.html From wxruby at qualitycode.com Wed Sep 27 10:43:05 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 27 Sep 2006 10:43:05 -0400 Subject: [Wxruby-users] tag and release 0.0.36 In-Reply-To: <4519B2E5.4060203@pressure.to> References: <4519B2E5.4060203@pressure.to> Message-ID: <451A8DF9.3@qualitycode.com> Alex Fenton wrote: > Maybe someone with Subversion experience could confirm that this looks > like the right command to 'tag': > > svn copy > svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/trunk/wxruby2 > svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/tags/v0_0_36 Ugh. How hard would it have been for the svn folks to have a "tag" command that does the copy for you? Sheesh. The command looks ok, except maybe that it creates a wxruby2 branch (tag) at the top level. I could imagine that the last part might instead be: /svn/wxruby/tags/wxruby2/v0_0_36 I'm not sure. I'm sure there are other projects out there that have two top-level subprojects, but I have no idea how to find them. Also, we used underlines in CVS because CVS won't allow dots, and we included the v because CVS won't allow tags to start with a digit. Could we name it v0.0.36 or just 0.0.36 instead? Kevin From wxruby at qualitycode.com Wed Sep 27 10:47:11 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 27 Sep 2006 10:47:11 -0400 Subject: [Wxruby-users] Installation success, execution failed In-Reply-To: References: Message-ID: <451A8EEF.9090007@qualitycode.com> Florian A?mann wrote: > Hello, after I wasn't able to install wxruby via gem (404) I > downloaded the file from rubyforge and installed it on my intel mac. > No failure the so I tried to start the minimal.rb with ruby -r/r?/ > ubegems ... > This didn't work so I tried to do it in irb but the same error occured: when you simply run "ruby -rubygems minimal.rb" you get an error about dyld not being loaded? That seems very strange. > > irb(main):001:0> require 'rubygems' > => true After that, try: require 'wx' That should load the wxruby2 library, without mixing in any possible problems with the minimal sample. Kevin From wxruby at qualitycode.com Wed Sep 27 10:51:37 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 27 Sep 2006 10:51:37 -0400 Subject: [Wxruby-users] GetSize and GetPosition In-Reply-To: <4519C640.5000203@mindspring.com> References: <4519C640.5000203@mindspring.com> Message-ID: <451A8FF9.3060409@qualitycode.com> Roy Sutton wrote: > Right now we default to returning objects instead of arrays. > perl/python have alternates that return tuples/lists. Do we want to > %alias those so we can get arrays back or does it really matter? I don't think it's important. Eventually we might want to, but it could (and perhaps should) be done in wxSugar. Kevin From wxruby at qualitycode.com Wed Sep 27 10:53:24 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 27 Sep 2006 10:53:24 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <451995D9.1060702@mindspring.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> <4517DC02.4010600@qualitycode.com> <4518129D.1090309@mindspring.com> <45193B62.2050205@qualitycode.com> <451995D9.1060702@mindspring.com> Message-ID: <451A9064.9070406@qualitycode.com> Roy Sutton wrote: > My initial thought is: Let's shelve this until we figure out how > wxPython has it all sorted out. If we someday move to some sort of XML > post-processing I don't want to have spent even more time on this than > necessary. I already feel like a lot of my SWIG work will be obviated > by whatever new method we choose. I am inclined to agree, assuming shelving it means that the .h files won't be modified. If we were going to spin through them modifying all the parameter names to OUTPUT then I would like to discuss it further, because that would be effort spent destroying potentially valuable information. Thanks, Kevin From roys at mindspring.com Wed Sep 27 13:26:43 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 27 Sep 2006 13:26:43 -0400 Subject: [Wxruby-users] SplashScreen Message-ID: <451AB453.30301@mindspring.com> Because it was easy, I added SplashScreen support Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RubyConstants.i.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060927/ae007b98/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SplashScreen.i Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060927/ae007b98/attachment-0001.pl From roys at mindspring.com Wed Sep 27 13:39:42 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 27 Sep 2006 13:39:42 -0400 Subject: [Wxruby-users] SplashScreen Message-ID: <451AB75E.5000907@mindspring.com> Can someone graphically inclined come up with a nice splash screen for the bigdemo application? It might be good to come up with an original graphic to use in the ShapedWindow example, too. Roy From roys at mindspring.com Wed Sep 27 14:08:14 2006 From: roys at mindspring.com (Roy Sutton) Date: Wed, 27 Sep 2006 14:08:14 -0400 Subject: [Wxruby-users] problem with TextCtrl#get_insertion_point In-Reply-To: <4517DE0A.10504@qualitycode.com> References: <4513008B.7020405@pressure.to> <4513D6B8.4060905@mindspring.com> <4517DE0A.10504@qualitycode.com> Message-ID: <451ABE0E.1060206@mindspring.com> Kevin Smith wrote: > From that wording though, it is not clear to me whether this code, as > is, will work on MSW. It sounds like it won't. But I'm not sure. Would I > need to do something before the @tc.get_selection call, or before the > @tc.get_string_selection call, or later in the program? > > > Try this one instead. It's much clearer and even more correct. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wxTextCtrl.rbw.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060927/1e845fb7/attachment.pl From alex at pressure.to Wed Sep 27 17:33:53 2006 From: alex at pressure.to (Alex Fenton) Date: Wed, 27 Sep 2006 22:33:53 +0100 Subject: [Wxruby-users] tag and release 0.0.36 In-Reply-To: <451A8DF9.3@qualitycode.com> References: <4519B2E5.4060203@pressure.to> <451A8DF9.3@qualitycode.com> Message-ID: <451AEE41.1050706@pressure.to> >> svn copy >> svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/trunk/wxruby2 >> svn+ssh:///developername/@rubyforge.org/var/svn/wxruby/tags/v0_0_36 >> > > Ugh. How hard would it have been for the svn folks to have a "tag" > command that does the copy for you? Sheesh. > too right. > The command looks ok, except maybe that it creates a wxruby2 branch > (tag) at the top level. I could imagine that the last part might instead > be: /svn/wxruby/tags/wxruby2/v0_0_36 > i prefer this too > Also, we used underlines in CVS because CVS won't allow dots, and we > included the v because CVS won't allow tags to start with a digit. Could > we name it v0.0.36 or just 0.0.36 instead? yep. alex From tbutzon at gmail.com Thu Sep 28 23:07:04 2006 From: tbutzon at gmail.com (Toby Butzon) Date: Thu, 28 Sep 2006 23:07:04 -0400 Subject: [Wxruby-users] ObjectPreviouslyDeleted when trying to paint Message-ID: <489be1d0609282007l84cf3ffiacf802c879f31091@mail.gmail.com> Hi, I'm running into something along the lines of bug 5383. I'm hoping I'm doing something obviously wrong and that someone can point me in the right direction. I've got a custom paint event handler: def on_paint puts "mainframe on_paint" paint do |dc| dc.clear @cl.draw dc end end Then I've got a key press handler that changes @cl and calls refresh on the frame to get it to redraw. Without calling refresh, things seem to be fine. (Although obviously my app doesn't display the changed state.) With the refresh, I get: mainframe on_paint ./View/mainframe.rb:79:in `clear': in method 'Clear', argument 1 of type 'wxWindowDC *' (ObjectPreviouslyDeleted) from ./View/mainframe.rb:79:in `on_paint' from ./View/mainframe.rb:78:in `paint' from ./View/mainframe.rb:78:in `on_paint' from ./View/mainframe.rb:29:in `initialize' ... Anyone have an idea of what might be going on? Is there a "better" way to trigger the redraw? Thanks in advance, -- Toby Butzon From alex at pressure.to Fri Sep 29 14:16:04 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 19:16:04 +0100 Subject: [Wxruby-users] Darcs mirror, some fixes & rake patches... In-Reply-To: <20060924083619.GA5552@portfolio16.de> References: <20060924083619.GA5552@portfolio16.de> Message-ID: <451D62E4.6040300@pressure.to> Hi Thanks for these patches: > In other news, I have some small fixes for GCC 4.1 nitpicking :) The > first one (stdcpp.diff) fixes a C++-construct which is not valid C++ at > all but wasn't detected by older GCC-versions. This was already fixed in a patch from Kees Jongenburger. > The second patch > (type-conflict.diff) fixes a GCC compile error, but I'm not sure it's > the right fix for the problem. > Roy submitted a related patch to fix the conflict, which was applied and works for me. If there is still a prob I'm happy to apply an updated patch. > rake-cleanup.diff removes some code for > wx-2.4, which IIRC we don't support anymore, right? Applied. > ld-reorder.diff > takes advantage of the fact that wx-config appends the "-o" to the LD > command automatically. Unfortunately this doesn't work on OS X. Firstly there isn't a space after the linker command name so it comes out g++lib/wxruby2.bundle. Secondly, the -o flag doesn't get inserted automatically. So I haven't applied this patch. Thanks again, and sorry for the long delay. alex From alex at pressure.to Fri Sep 29 14:22:03 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 19:22:03 +0100 Subject: [Wxruby-users] Fixed events returning correct object In-Reply-To: <45160430.8020803@mindspring.com> References: <45160430.8020803@mindspring.com> Message-ID: <451D644B.7060505@pressure.to> Applied, thanks. alex Roy Sutton wrote: > I have successfully patched the files to return the correct objects > from events (and other places where we request back objects and have > been getting the wrong thing). In doing so, I found a buglet in the > wxSashWindow.rbw file. Here is a patch for that. From alex at pressure.to Fri Sep 29 14:32:40 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 19:32:40 +0100 Subject: [Wxruby-users] Patch to fix get_event_object In-Reply-To: <45167C2F.4000208@mindspring.com> References: <45167C2F.4000208@mindspring.com> Message-ID: <451D66C8.7000005@pressure.to> Second part (fix get_event_object) applied, thanks. The first part already committed. alex Roy Sutton wrote: > This patch will fix the files so that SWIG returns the correct object > when get_event_object is called. I think I had submitted part of this > before but it looks like I either forgot to sync or it hasn't been > applied yet. > > Roy From alex at pressure.to Fri Sep 29 14:35:30 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 19:35:30 +0100 Subject: [Wxruby-users] wxScrolledWindow.rbw In-Reply-To: <4519DE37.1080102@mindspring.com> References: <4519DE37.1080102@mindspring.com> Message-ID: <451D6772.8040406@pressure.to> Committed, thanks. I'm happy for you to apply this sort of fix to samples (or docs) directly now you have sVN rights. alex Roy Sutton wrote: > This patch removes the call to 'free' from the sample. > > Roy > ------------------------------------------------------------------------ > > Index: wxruby2/samples/bigdemo/wxScrolledWindow.rbw > =================================================================== > --- wxruby2/samples/bigdemo/wxScrolledWindow.rbw (revision 592) > +++ wxruby2/samples/bigdemo/wxScrolledWindow.rbw (working copy) > @@ -167,7 +167,6 @@ > dc.draw_line(coords[0], coords[1], coords[2], coords[3]) > set_XY(event) > dc.end_drawing() > - dc.free() > end > end > > > ------------------------------------------------------------------------ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Fri Sep 29 15:19:28 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 20:19:28 +0100 Subject: [Wxruby-users] Window.i.patch In-Reply-To: <4519DCF9.4020707@mindspring.com> References: <4519DCF9.4020707@mindspring.com> Message-ID: <451D71C0.9010201@pressure.to> Neat. Applied, thanks. alex Roy Sutton wrote: > This patch file takes advantage of the parameter name change I made in > wxWindow.h From alex at pressure.to Fri Sep 29 15:19:47 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 20:19:47 +0100 Subject: [Wxruby-users] wxWindow.h.patch In-Reply-To: <4519DCB5.20407@mindspring.com> References: <4519DCB5.20407@mindspring.com> Message-ID: <451D71D3.10702@pressure.to> Applied, thanks alex Roy Sutton wrote: > This patch file removes 'virtual' from several methods that aren't > supposed to have it. > > Also, it changes two parameters to x_INOUT and y_INOUT as was > suggested by Kevin. I broke down and did this because it's one of the > few places that int *'s are used for input and output. From alex at pressure.to Fri Sep 29 15:42:33 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 20:42:33 +0100 Subject: [Wxruby-users] Window.i In-Reply-To: <4519C56B.3030506@mindspring.com> References: <4519C56B.3030506@mindspring.com> Message-ID: <451D7729.2060400@pressure.to> Roy Sutton wrote: > Does anyone know if the XRC hand-coded methods in Window.i are still > required after my recent change to return the correct types? I tried cutting out the relevant stuff in Window.i and recompiling Window and Dialog (just for a quick test). It seems that the calls to Dialog#find_window_by_id in the XRC sample then return instances of Wx::Window, not Wx::Button as they should do I think? Would be good to return to this perh. when new SWIG is out. > Also, > given that wxWindow.h is included all over the place, I think we need to > move some of that stuff out into a common .i that's included for all > wxWindow descendants. > Not certain which stuff you're thinking of. Generally, I think I prefer to keep the header files reasonably closely aligned with the organisation of methods in WxWidgets, but I'm open to discussion. From alex at pressure.to Fri Sep 29 16:49:07 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 21:49:07 +0100 Subject: [Wxruby-users] SVN 'tags' [was: tag and release 0.0.36] In-Reply-To: <451A8DF9.3@qualitycode.com> References: <4519B2E5.4060203@pressure.to> <451A8DF9.3@qualitycode.com> Message-ID: <451D86C3.3070309@pressure.to> > The command looks ok, except maybe that it creates a wxruby2 branch > (tag) at the top level. I could imagine that the last part might instead > be: /svn/wxruby/tags/wxruby2/v0_0_36 ... > Could we name it v0.0.36 or just 0.0.36 instead? > Thanks (also to Daniel). I have gone with the scheme: /tags//.. eg tags/wxruby2/0.0.35 I've cleaned up what was auto-converted from CVS so that the wxruby (old series) and wxruby2 tags are in the right place, and created a directory for wxsugar tags (though there aren't any yet) http://rubyforge.org/cgi-bin/viewvc.cgi/tags/?root=wxruby alex From alex at pressure.to Fri Sep 29 16:52:40 2006 From: alex at pressure.to (Alex Fenton) Date: Fri, 29 Sep 2006 21:52:40 +0100 Subject: [Wxruby-users] new crasher on bigdemo Message-ID: <451D8798.4050805@pressure.to> Hi Seems that the last round of commits makes bigdemo crash fairly quickly. Guessing it's something to do with either the Window or fixmodule change. Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 523 object.c: No such file or directory. Any hints? alex From alex at pressure.to Fri Sep 29 19:40:41 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 00:40:41 +0100 Subject: [Wxruby-users] Menu.i.patch In-Reply-To: <4519DDAB.2080201@mindspring.com> References: <4519DDAB.2080201@mindspring.com> Message-ID: <451DAEF9.3020302@pressure.to> Applied, thanks Roy Sutton wrote: > Patch to disown wxMenuItems after they are attached to a menu. I'll > have a few more like this shortly. I'm using wxPython as a > cheat-sheet for parameters that should be 'DISOWN' From alex at pressure.to Fri Sep 29 19:57:32 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 00:57:32 +0100 Subject: [Wxruby-users] SplashScreen In-Reply-To: <451AB453.30301@mindspring.com> References: <451AB453.30301@mindspring.com> Message-ID: <451DB2EC.3050508@pressure.to> Committed, thank you. Alex Roy Sutton wrote: > Because it was easy, I added SplashScreen support > > Roy From alex at pressure.to Fri Sep 29 21:21:33 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 02:21:33 +0100 Subject: [Wxruby-users] new crasher on bigdemo In-Reply-To: <451D8798.4050805@pressure.to> References: <451D8798.4050805@pressure.to> Message-ID: <451DC69D.8050702@pressure.to> I can narrow this down a bit, though I haven't got a solution. It crashes several samples, without user interaction (bigdemo, treectrl, listbook), but others seem fine (textctrl, unicode, minimal). It's something to do with the change to fixmodule.rb, that now does if (rb_obj_is_kind_of(obj, (((swig_class *) (type->clientdata))->klass))) { ... for some methods. The patch didn't apply cleanly, so hopefully I have made a mistake in integrating it - perhaps Roy you could check against what was meant to happen. Otherwise, perhaps it's a problem with certain kinds of events (TreeEvent? IdleEvent in bigdemo). Keen to get this fixed so we can do a release. thanks alex Alex Fenton wrote: > Hi > > Seems that the last round of commits makes bigdemo crash fairly quickly. > Guessing it's something to do with either the Window or fixmodule change. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 > 523 object.c: No such file or directory. > > Any hints? > > alex > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From roys at mindspring.com Fri Sep 29 21:46:38 2006 From: roys at mindspring.com (Roy Sutton) Date: Fri, 29 Sep 2006 21:46:38 -0400 Subject: [Wxruby-users] new crasher on bigdemo In-Reply-To: <451D8798.4050805@pressure.to> References: <451D8798.4050805@pressure.to> Message-ID: <451DCC7D.7050206@mindspring.com> Alex Fenton wrote: > Seems that the last round of commits makes bigdemo crash fairly quickly. > Guessing it's something to do with either the Window or fixmodule change. > > Program received signal EXC_BAD_ACCESS, Could not access memory. > 0x00034fbc in rb_obj_is_kind_of (obj=3825080, c=1839676) at object.c:523 > 523 object.c: No such file or directory. > > Any hints? > > Hmm... That is pretty strange. Not having that problem on my system. It seems almost like something is wrong in the inheritance chain somewhere (which is what obj_is_kind_of walks through. I'd be curious if you could track it down to a specific function or object. Does it happen with Minimal? Roy From alex at pressure.to Fri Sep 29 20:14:27 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 01:14:27 +0100 Subject: [Wxruby-users] missing file In-Reply-To: <451A22BA.1040709@mindspring.com> References: <451A22BA.1040709@mindspring.com> Message-ID: <451DB6E3.8070701@pressure.to> Cool, really looking forward to getting Scintilla running on OS X. Applied, thanks. alex Roy Sutton wrote: > Here's that bigdemo.rb.patch I talked about. From roys at mindspring.com Sat Sep 30 00:38:58 2006 From: roys at mindspring.com (Roy Sutton) Date: Sat, 30 Sep 2006 00:38:58 -0400 Subject: [Wxruby-users] fixmodule patches Message-ID: <451DF4E2.3070209@mindspring.com> These patches (should) give us support for compiling against Ruby 1.9. Roy -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmainmodule.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060930/72791132/attachment.ksh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fixmodule.rb.patch Url: http://rubyforge.org/pipermail/wxruby-users/attachments/20060930/72791132/attachment-0001.ksh From wxruby at qualitycode.com Sat Sep 30 08:22:12 2006 From: wxruby at qualitycode.com (Kevin Smith) Date: Sat, 30 Sep 2006 08:22:12 -0400 Subject: [Wxruby-users] wxScrolledWindow.rbw In-Reply-To: <451D6772.8040406@pressure.to> References: <4519DE37.1080102@mindspring.com> <451D6772.8040406@pressure.to> Message-ID: <451E6174.4090202@qualitycode.com> Alex Fenton wrote: > Committed, thanks. I'm happy for you to apply this sort of fix to > samples (or docs) directly now you have sVN rights. Me too, but please post something to the list any time you check something in, so we can all stay in the loop. Hm. Does rubyforge support svn checkin notification emails? I haven't looked. Kevin From alex at pressure.to Sat Sep 30 09:57:27 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 14:57:27 +0100 Subject: [Wxruby-users] wxScrolledWindow.rbw In-Reply-To: <451E6174.4090202@qualitycode.com> References: <4519DE37.1080102@mindspring.com> <451D6772.8040406@pressure.to> <451E6174.4090202@qualitycode.com> Message-ID: <451E77C7.4020006@pressure.to> > Hm. Does rubyforge support svn checkin notification emails? I haven't > looked. Yep, it does. We just need to file a support request From alex at pressure.to Sat Sep 30 09:59:32 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 14:59:32 +0100 Subject: [Wxruby-users] wxScrolledWindow.rbw In-Reply-To: <451E6174.4090202@qualitycode.com> References: <4519DE37.1080102@mindspring.com> <451D6772.8040406@pressure.to> <451E6174.4090202@qualitycode.com> Message-ID: <451E7844.10508@pressure.to> > Hm. Does rubyforge support svn checkin notification emails? I haven't > looked. Yep, it does. The project admin just needs to file a support request here: http://rubyforge.org/tracker/?atid=102&group_id=5&func=browse to get the appropriate post-commit hook added. Suggest that commit notifications are forwarded to the wxruby-dev mailing list - this will save some duplication of effort. cheers alex From alex at pressure.to Sat Sep 30 10:14:50 2006 From: alex at pressure.to (Alex Fenton) Date: Sat, 30 Sep 2006 15:14:50 +0100 Subject: [Wxruby-users] new crasher on bigdemo In-Reply-To: <451DCC7D.7050206@mindspring.com> References: <451D8798.4050805@pressure.to> <451DCC7D.7050206@mindspring.com> Message-ID: <451E7BDA.4070908@pressure.to> > I'd be curious > if you could track it down to a specific function or object. Does it > happen with Minimal? > Haven't been able to yet - have tried gradually adding things (TextCtrl, Sizer, Idle handler) to minimal but can't get it to crash. The others just crash seemingly randomly. I guess what I need to do is add a C++ line before your tweak to fixmodule that spits out the arguments that it's about to call rb_obj_is_kind_of with. I don't know C++ so I wonder if someone could suggest a debugging line (printf?) that will help pin down the problem with: if (rb_obj_is_kind_of(obj, (((swig_class *) (type->clientdata))->klass))) { thanks alex