From wxruby at qualitycode.com Sat Oct 1 00:44:39 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sat, 01 Oct 2005 00:44:39 -0400 Subject: [Wxruby-users] Starting to use darcs (was: Alternatives to CVS?) In-Reply-To: <20050930114206.GA8096@portfolio16.de> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> Message-ID: <433E1437.1000706@qualitycode.com> Tobias Gruetzmacher wrote: > I came around building a secure setup with automatic updates via cron. > The update happens every night at 03:30 CET/CEST. It pushes from my home > server to the server darcs.portfolio16.de, that should work most of the > time... Cool. I grabbed a copy, and it looks good. Now, big question: Who will submit patches in darcs format? Roy? Sean? As the two most active contributors at the moment, are either or both of you ready, able, and willing to try out darcs? I haven't yet figured out how the process will actually work, so I would suggest that anyone interested should pull the wxruby2 repo into darcs, but not actually submit any patches until I have applied all the pending patches that have already been sent. Everyone may have noticed that I have been quiet around here lately. Sorry about that! I see that I have several patches more than a week old, which I feel very bad about. Hopefully I'll be able to integrate those over the weekend. Switching to something like darcs or bzr should not only make my work easier, but should also take some pressure off because it will be less critical that I merge patches promptly all the time. Next, I suggest that we try just a patch or two via darcs first, to make sure the workflow isn't terribly broken. I am a bit concerned that mixing CVS and darcs may actually cause problems, so we might have to decide to jump completely to darcs now, perhaps continuing to publish the CVS repository as a readonly mirror of the official public darcs wxruby repo. As I mentioned before, darcs requires some self-discipline. Here are my recommendations for how to set up wxruby2 under darcs on your machine. Note, sadly, that it is late at night and I'm trying to rush off to bed, so I haven't actually tested these exact commands. Hopefully they are at least very close to accurate. First, create a master umbrella wxruby2 directory that will itself contain two or more copies of wxruby. From that master directory, issue these commands: darcs get http://darcs.portfolio16.de pulled That will create an exact copy of portfolio16 in your "pulled" repo. The "pulled" directory should always be an exact copy of the remote mirror on portfolio16. This may seem silly, but it's actually quite valuable. Then do: darcs get pulled work That will create your own working copy, named "work". You will do your editing and compiling in your work repo. Before you start each coding session, change into the pulled directory and do: darcs pull That should update your pulled directory to match the portfolio16 repo. Then, go to your work repo and do: darcs pull That will merge the latest official changes into your work repo. After you have checked in your changes, there are two ways you can submit your patches to me: 1. use some variant of "darcs send" (from inside the work repo) 2. publish your own darcs wxruby2 repo on a public web host If you are going to work on two unrelated things at the same time, you might want to create additional repos, one per major task. It will take some practice and experience to figure out exactly how to be most productive. Kevin From sean.m.long at gmail.com Sat Oct 1 01:13:00 2005 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 30 Sep 2005 22:13:00 -0700 Subject: [Wxruby-users] Starting to use darcs (was: Alternatives to CVS?) In-Reply-To: <433E1437.1000706@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> Message-ID: I am willing to give it a try. Sounds like we will all learn together, a recipe for disaster ;) Sean On 9/30/05, Kevin Smith wrote: > Tobias Gruetzmacher wrote: > > I came around building a secure setup with automatic updates via cron. > > The update happens every night at 03:30 CET/CEST. It pushes from my home > > server to the server darcs.portfolio16.de, that should work most of the > > time... > > Cool. I grabbed a copy, and it looks good. > > Now, big question: Who will submit patches in darcs format? Roy? Sean? > As the two most active contributors at the moment, are either or both of > you ready, able, and willing to try out darcs? > > I haven't yet figured out how the process will actually work, so I would > suggest that anyone interested should pull the wxruby2 repo into darcs, > but not actually submit any patches until I have applied all the pending > patches that have already been sent. > > Everyone may have noticed that I have been quiet around here lately. > Sorry about that! I see that I have several patches more than a week > old, which I feel very bad about. Hopefully I'll be able to integrate > those over the weekend. Switching to something like darcs or bzr should > not only make my work easier, but should also take some pressure off > because it will be less critical that I merge patches promptly all the time. > > Next, I suggest that we try just a patch or two via darcs first, to make > sure the workflow isn't terribly broken. I am a bit concerned that > mixing CVS and darcs may actually cause problems, so we might have to > decide to jump completely to darcs now, perhaps continuing to publish > the CVS repository as a readonly mirror of the official public darcs > wxruby repo. > > As I mentioned before, darcs requires some self-discipline. Here are my > recommendations for how to set up wxruby2 under darcs on your machine. > Note, sadly, that it is late at night and I'm trying to rush off to bed, > so I haven't actually tested these exact commands. Hopefully they are at > least very close to accurate. > > First, create a master umbrella wxruby2 directory that will itself > contain two or more copies of wxruby. From that master directory, issue > these commands: > > darcs get http://darcs.portfolio16.de pulled > > That will create an exact copy of portfolio16 in your "pulled" repo. The > "pulled" directory should always be an exact copy of the remote mirror > on portfolio16. This may seem silly, but it's actually quite valuable. > Then do: > > darcs get pulled work > > That will create your own working copy, named "work". You will do your > editing and compiling in your work repo. Before you start each coding > session, change into the pulled directory and do: > > darcs pull > > That should update your pulled directory to match the portfolio16 repo. > Then, go to your work repo and do: > > darcs pull > > That will merge the latest official changes into your work repo. > > After you have checked in your changes, there are two ways you can > submit your patches to me: > > 1. use some variant of "darcs send" (from inside the work repo) > 2. publish your own darcs wxruby2 repo on a public web host > > If you are going to work on two unrelated things at the same time, you > might want to create additional repos, one per major task. It will take > some practice and experience to figure out exactly how to be most > productive. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From sean.m.long at gmail.com Sat Oct 1 01:40:50 2005 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 30 Sep 2005 22:40:50 -0700 Subject: [Wxruby-users] Starting to use darcs (was: Alternatives to CVS?) In-Reply-To: <433E1437.1000706@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> Message-ID: > First, create a master umbrella wxruby2 directory that will itself > contain two or more copies of wxruby. From that master directory, issue > these commands: > > darcs get http://darcs.portfolio16.de pulled > should be: darcs get http://darcs.portfolio16.de/wxruby2 pulled Notes: - Slow download when doing copying patch ? of 242 - The applying patches part is slow and very CPU intensive. (running on Dual 1.25 G4's) - Overall about 3 to 4 times slower than a cvs co wxruby2 Sean From sean.m.long at gmail.com Sat Oct 1 02:06:25 2005 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 30 Sep 2005 23:06:25 -0700 Subject: [Wxruby-users] Starting to use darcs (was: Alternatives to CVS?) In-Reply-To: <433E1437.1000706@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> Message-ID: I sent a small trivial patch to see how the process works, hopefully you will receive it. Sean From wxruby at qualitycode.com Sat Oct 1 08:47:14 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sat, 01 Oct 2005 08:47:14 -0400 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: References: <20050809195824.GB19961@portfolio16.de> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> Message-ID: <433E8552.5090205@qualitycode.com> Sean Long wrote: > I am willing to give it a try. Sounds like we will all learn together, > a recipe for disaster ;) Excellent. > should be: > > darcs get http://darcs.portfolio16.de/wxruby2 pulled Absolutely. Thanks for the correction. Perhaps someone could copy the instructions to the wiki so they can remain up-to-date. I'm having some second thoughts about the name "pulled", too. > Notes: > - Slow download when doing copying patch ? of 242 Yes, I saw a hiccup around patch 200. I suspect that was when we dropped the XML extraction and removed all the src/ files, creating a very large darcs patch. > - The applying patches part is slow and very CPU intensive. (running > on Dual 1.25 G4's) > - Overall about 3 to 4 times slower than a cvs co wxruby2 Yes, darcs is known for being slow, CPU intensive, and a memory hog, at times. Fortunately, you should rarely have to do a full darcs get. For normal operations, darcs should be reasonable on a small project like ours. I still hope to switch to bzr (or perhaps something else) in a few months, and it would likely be faster than darcs. > I sent a small trivial patch to see how the process works, > hopefully you will receive it. Hm. I have not seen it yet. Kevin From roys at mindspring.com Sat Oct 1 23:52:24 2005 From: roys at mindspring.com (Roy Sutton) Date: Sat, 01 Oct 2005 23:52:24 -0400 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433E1437.1000706@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> Message-ID: <433F5978.7020501@mindspring.com> I'll check out the darcs server soon and see how I like it. FYI, I found this on the SWIG CVS: 09/24/2005: cfisavage [Ruby] Adds new %trackobjects functionality that maps C++ objects to Ruby objects. This functionality makes it much easier to implement mark functions for the garbage collector. For more information refer to the update documentation and examples. This could be good for us. Roy Kevin Smith wrote: > Tobias Gruetzmacher wrote: > >> I came around building a secure setup with automatic updates via cron. >> The update happens every night at 03:30 CET/CEST. It pushes from my home >> server to the server darcs.portfolio16.de, that should work most of the >> time... >> > > Cool. I grabbed a copy, and it looks good. > > Now, big question: Who will submit patches in darcs format? Roy? Sean? > As the two most active contributors at the moment, are either or both of > you ready, able, and willing to try out darcs? > > I haven't yet figured out how the process will actually work, so I would > suggest that anyone interested should pull the wxruby2 repo into darcs, > but not actually submit any patches until I have applied all the pending > patches that have already been sent. > > Everyone may have noticed that I have been quiet around here lately. > Sorry about that! I see that I have several patches more than a week > old, which I feel very bad about. Hopefully I'll be able to integrate > those over the weekend. Switching to something like darcs or bzr should > not only make my work easier, but should also take some pressure off > because it will be less critical that I merge patches promptly all the time. > > Next, I suggest that we try just a patch or two via darcs first, to make > sure the workflow isn't terribly broken. I am a bit concerned that > mixing CVS and darcs may actually cause problems, so we might have to > decide to jump completely to darcs now, perhaps continuing to publish > the CVS repository as a readonly mirror of the official public darcs > wxruby repo. > > As I mentioned before, darcs requires some self-discipline. Here are my > recommendations for how to set up wxruby2 under darcs on your machine. > Note, sadly, that it is late at night and I'm trying to rush off to bed, > so I haven't actually tested these exact commands. Hopefully they are at > least very close to accurate. > > First, create a master umbrella wxruby2 directory that will itself > contain two or more copies of wxruby. From that master directory, issue > these commands: > > darcs get http://darcs.portfolio16.de pulled > > That will create an exact copy of portfolio16 in your "pulled" repo. The > "pulled" directory should always be an exact copy of the remote mirror > on portfolio16. This may seem silly, but it's actually quite valuable. > Then do: > > darcs get pulled work > > That will create your own working copy, named "work". You will do your > editing and compiling in your work repo. Before you start each coding > session, change into the pulled directory and do: > > darcs pull > > That should update your pulled directory to match the portfolio16 repo. > Then, go to your work repo and do: > > darcs pull > > That will merge the latest official changes into your work repo. > > After you have checked in your changes, there are two ways you can > submit your patches to me: > > 1. use some variant of "darcs send" (from inside the work repo) > 2. publish your own darcs wxruby2 repo on a public web host > > If you are going to work on two unrelated things at the same time, you > might want to create additional repos, one per major task. It will take > some practice and experience to figure out exactly how to be most > productive. > > 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 Oct 2 01:12:42 2005 From: sean.m.long at gmail.com (Sean Long) Date: Sat, 1 Oct 2005 22:12:42 -0700 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433E8552.5090205@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> Message-ID: > > I sent a small trivial patch to see how the process works, > > hopefully you will receive it. > > Hm. I have not seen it yet. I did a darcs send and entered your email, oh well. I just did a darcs send -o filename and am including that in this message. Let me know if that is how you want patches from darcs. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle Type: application/octet-stream Size: 2401 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20051001/e11276ee/bundle.obj From alex at pressure.to Sun Oct 2 05:38:30 2005 From: alex at pressure.to (Alex Fenton) Date: Sun, 02 Oct 2005 10:38:30 +0100 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433F5978.7020501@mindspring.com> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433F5978.7020501@mindspring.com> Message-ID: <433FAA96.4060201@pressure.to> >09/24/2005: cfisavage > [Ruby] Adds new %trackobjects functionality that maps C++ objects to > Ruby objects. This functionality makes it much easier to implement > mark functions for the garbage collector. For more information > refer to the update documentation and examples. > > Charlie savage started a comp.lang.ruby thread on this a month or two ago which did sound relevant to our problem. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/152816 a From ruby at portfolio16.de Sun Oct 2 17:35:23 2005 From: ruby at portfolio16.de (Tobias Gruetzmacher) Date: Sun, 2 Oct 2005 23:35:23 +0200 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433E8552.5090205@qualitycode.com> References: <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> Message-ID: <20051002213523.GB8137@portfolio16.de> Hi, On Sat, Oct 01, 2005 at 08:47:14AM -0400, Kevin Smith wrote: > > Notes: > > - Slow download when doing copying patch ? of 242 > > Yes, I saw a hiccup around patch 200. I suspect that was when we dropped > the XML extraction and removed all the src/ files, creating a very large > darcs patch. You can accelerate the whole progress by only getting a partial repository (from the last TAG on): darcs get --partial http://darcs.portfolio16.de/wxruby2 pulled I hope the darcs people make that the default in some upcoming version and let the client pull older patches only when they are needed... 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 -------------- 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/20051002/5ac542ba/attachment.bin From roys at mindspring.com Sun Oct 2 18:57:11 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun, 02 Oct 2005 18:57:11 -0400 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <20051002213523.GB8137@portfolio16.de> References: <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <20051002213523.GB8137@portfolio16.de> Message-ID: <434065C7.2010804@mindspring.com> Well, I just did this and it was -fast-. I think this was much faster than my old method of downloading a tarball from the CVS repository. And, I won't ever have to pull the whole thing again, theoretically. Roy Tobias Gruetzmacher wrote: > You can accelerate the whole progress by only getting a partial > repository (from the last TAG on): > > darcs get --partial http://darcs.portfolio16.de/wxruby2 pulled From roys at mindspring.com Sun Oct 2 19:01:57 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun, 02 Oct 2005 19:01:57 -0400 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433FAA96.4060201@pressure.to> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433F5978.7020501@mindspring.com> <433FAA96.4060201@pressure.to> Message-ID: <434066E5.4060809@mindspring.com> I hope no one minds I wrote to Charlie to ask if he might help us get his changes incorporated into our source so that we can benefit before the official SWIG release comes out. I'm hoping he might be able to shed some light on some of the other problems we've been having. Roy Alex Fenton wrote: >> 09/24/2005: cfisavage >> [Ruby] Adds new %trackobjects functionality that maps C++ objects to >> Ruby objects. This functionality makes it much easier to implement >> mark functions for the garbage collector. For more information >> refer to the update documentation and examples. >> >> >> > Charlie savage started a comp.lang.ruby thread on this a month or two > ago which did sound relevant to our problem. > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/152816 > > a > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From wxruby at qualitycode.com Tue Oct 4 21:24:31 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 21:24:31 -0400 Subject: [Wxruby-users] FileDialog.i patch In-Reply-To: <43337694.5090304@mindspring.com> References: <43337694.5090304@mindspring.com> Message-ID: <43432B4F.1040601@qualitycode.com> Roy Sutton wrote: > Here's a patch for FileDialog.i. Seems we had never removed that #ifdef > in there. I finally got around to applying this. I had to change c_str to mb_str to get it to compile. Seems like you must be using a non-unicode wxWindows, which is fine with me because then we're testing both ways. Kevin From roys at mindspring.com Tue Oct 4 22:11:08 2005 From: roys at mindspring.com (Roy Sutton) Date: Tue, 04 Oct 2005 22:11:08 -0400 Subject: [Wxruby-users] FileDialog.i patch In-Reply-To: <43432B4F.1040601@qualitycode.com> References: <43337694.5090304@mindspring.com> <43432B4F.1040601@qualitycode.com> Message-ID: <4343363C.20705@mindspring.com> You are correct, I compiled wxWindows without unicode support. Roy Kevin Smith wrote: > Roy Sutton wrote: > >> Here's a patch for FileDialog.i. Seems we had never removed that #ifdef >> in there. >> > > I finally got around to applying this. I had to change c_str to mb_str > to get it to compile. Seems like you must be using a non-unicode > wxWindows, which is fine with me because then we're testing both ways. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From wxruby at qualitycode.com Tue Oct 4 22:42:21 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 22:42:21 -0400 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: Message-ID: <43433D8D.10802@qualitycode.com> I finally applied all these. Wow, that's a perfect example of where darcs or bzr would be better than CVS...having to manually copy 4 files and run patch 21 times was no fun at all. I suppose it could all be automated, but still. Pushing a button to suck it all in at once should be so much nicer. Sean Long wrote: > I am still hunting the bug where the cell editor finishes and crashes > on Mac OS. Bummer. As I think I said, if you can narrow it to a small code sample, I can try to help isolate it. Kevin From wxruby at qualitycode.com Tue Oct 4 22:58:19 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 22:58:19 -0400 Subject: [Wxruby-users] Patch for typemap.i In-Reply-To: <433A0DC3.2050006@mindspring.com> References: <433A0DC3.2050006@mindspring.com> Message-ID: <4343414B.5000703@qualitycode.com> Roy Sutton wrote: > This patch for typemap.i fixes several swig warnings while compiling. > You may noticed that I didn't fix all the typecheck typemaps. I suppose > I should fix all of them, but they don't cause problems with the > compilation. > > This also has a patch to convert void *'s into ruby numbers. This fixes > a problem with the get_handle call. Applied, thanks. > I still am not sure what's causing the problems with the other returns > it can't use. I'm betting it has something to do with improper typemaps. I'll take a look after I've cleared my incoming patch queue. Kevin From wxruby at qualitycode.com Tue Oct 4 23:32:04 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 23:32:04 -0400 Subject: [Wxruby-users] wxScintilla patch missing from zip In-Reply-To: <432DD484.6090700@mindspring.com> References: <432DD484.6090700@mindspring.com> Message-ID: <43434934.1090105@qualitycode.com> Roy Sutton wrote: > Here's the last piece of the puzzle you'll need to get this working > (other than modifying the platform specific stuff like rakemswin.rb). Looks cool, but I don't think it's quite ready for inclusion. Hopefully after we are using a "real" SCM tool it will be easy for you to regenerate this changeset, and for me to re-apply it. I think we either need to bite the bullet and include scintilla support, or find ways of making it more optional and less intrusive. It looks like the event callback stuff will be the most difficult in that respect. Probably my biggest dislike was the pervasive testing of an environment variable. Well, that's how it felt, even if it was just one or two places. I think the environment variable (if we go that route) should be read by the rakefiles, and everything else should be handled by command-line defines of WXSCINTILLA or somesuch. I tend to hate environment variables, so if it's going to remain optional (and I'm not sure it should), we could either have the existance of a file cause its inclusion, or we could have a config file of sorts that developers could edit to include or exclude modules. If nothing else, let's read the environment variable once, and set a global or something, so we can call a function like use_scintilla? to decide whether or not to do the scintilla stuff in Ruby, I'm still trying to figure out the big picture of all this. If we made your patches non-optional, would wxScintilla headers be required on a machine building wxruby2? After wxruby2 is built, could it run on any machine, but would simply raise an exception if wxScintilla was called but not present on the system? Thanks for your work on this. One way or another, wxruby2 *will* support wxScintilla. Kevin From wxruby at qualitycode.com Tue Oct 4 23:38:56 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 23:38:56 -0400 Subject: [Wxruby-users] Charlie's Ruby/SWIG object lifecycle improvements (was: Starting to use darcs) In-Reply-To: <434066E5.4060809@mindspring.com> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433F5978.7020501@mindspring.com> <433FAA96.4060201@pressure.to> <434066E5.4060809@mindspring.com> Message-ID: <43434AD0.1010602@qualitycode.com> Roy Sutton wrote: > I hope no one minds I wrote to Charlie to ask if he might help us get > his changes incorporated into our source so that we can benefit before > the official SWIG release comes out. I'm hoping he might be able to > shed some light on some of the other problems we've been having. Sounds great. Based on the description he posted to the SWIG mailing list, it sounds like he's doing something similar to what we are doing. It would be great to know if his approach is inherently better (aside from being built into SWIG itself). As you may have guessed, I don't think we will be able to require SWIG 1.3.26 (which will have the new feature) for at least several months after it is released. Hmmmm. His posting on the SWIG list called it %DISOWN, but this says %trackobjects. Must have changed in the process of getting integrated into the official tree. Kevin From wxruby at qualitycode.com Tue Oct 4 23:42:51 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 04 Oct 2005 23:42:51 -0400 Subject: [Wxruby-users] Partial pulls in darcs (was: Starting to use darcs) In-Reply-To: <20051002213523.GB8137@portfolio16.de> References: <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <20051002213523.GB8137@portfolio16.de> Message-ID: <43434BBB.4070808@qualitycode.com> Tobias Gruetzmacher wrote: > You can accelerate the whole progress by only getting a partial > repository (from the last TAG on): > > darcs get --partial http://darcs.portfolio16.de/wxruby2 pulled Cool. Since I don't plan to do remote pulls very often, I found the speed to be acceptable. I think it took a few minutes to get everything. I didn't pay close attention, but I watched the progress rather than leaving the room, so it must not have taken TOOO long. Theoretically, I should never need to do that again, as I will just be doing incremental pulls from now on. Thanks, Kevin From roys at mindspring.com Tue Oct 4 23:58:39 2005 From: roys at mindspring.com (Roy Sutton) Date: Tue, 04 Oct 2005 23:58:39 -0400 Subject: [Wxruby-users] Charlie's Ruby/SWIG object lifecycle improvements In-Reply-To: <43434AD0.1010602@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433F5978.7020501@mindspring.com> <433FAA96.4060201@pressure.to> <434066E5.4060809@mindspring.com> <43434AD0.1010602@qualitycode.com> Message-ID: <43434F6F.3040300@mindspring.com> Kevin Smith wrote: > Roy Sutton wrote: > >> I hope no one minds I wrote to Charlie to ask if he might help us get >> his changes incorporated into our source so that we can benefit before >> the official SWIG release comes out. I'm hoping he might be able to >> shed some light on some of the other problems we've been having. >> > > Sounds great. Based on the description he posted to the SWIG mailing > list, it sounds like he's doing something similar to what we are doing. > It would be great to know if his approach is inherently better (aside > from being built into SWIG itself). > Well, I don't think we've actually tackled that issue yet. It's on the TODO list. As he's already done the work I don't see why we'd want to reinvent the wheel. > As you may have guessed, I don't think we will be able to require SWIG > 1.3.26 (which will have the new feature) for at least several months > after it is released. > I already figured this out. My bet is we can extract his .SWG file changes and optionally include them if SWIGVER < 1.3.26. I specifically asked him about this. It turns out my earlier e-mail to him was spam-filtered and the auto-spam-filter response was spam-filtered on my end. So, we didn't touch base until just about an hour or so ago. > Hmmmm. His posting on the SWIG list called it %DISOWN, but this says > %trackobjects. Must have changed in the process of getting integrated > into the official tree. > Two different features. %DISOWN allows you to move ownership of the object. For example, if you set a an object that becomes owned by the window you'll want ruby to let go of its hold on it so it gets freed properly by the window. The track objects stuff is a related, but different, feature that ensures that any time you request a wrapper for a C++ object you get the same ruby object back. Roy From wxruby at qualitycode.com Wed Oct 5 00:23:42 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 05 Oct 2005 00:23:42 -0400 Subject: [Wxruby-users] Starting to use darcs In-Reply-To: <433E8552.5090205@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> Message-ID: <4343554E.8040903@qualitycode.com> Kevin Smith wrote: > Sean Long wrote: >> >>darcs get http://darcs.portfolio16.de/wxruby2 pulled > > Absolutely. Thanks for the correction. Perhaps someone could copy the > instructions to the wiki so they can remain up-to-date. I'm having some > second thoughts about the name "pulled", too. My revised proposal is to name that directory "pristine", instead of "pulled". That is, it represents a pristine, pulled copy of the remote mirror of the official wxruby2 archives (whew!). Hopefully with the name "pristine", you'll remember to never actually do any work in there. Always make a local clone for your work. In pristine, only do pulls. > > I sent a small trivial patch to see how the process works, > > hopefully you will receive it. I got the second copy you sent. I haven't yet tried to do anything to it, because my darcs pristine repo is out-of-date. Of course it is, because I just checked a bunch of stuff into CVS, and it hasn't been mirrored yet. Bummer that the mirroring only happens once a day, but I'm VERY grateful that we HAVE a remote darcs mirror, so I'm not complaining! Eventually, assuming we continue using darcs, we will either update the darcs repo before CVS, at the same time as CVS, or at least very soon after CVS. Any discussions of darcs process will be a bit cloudy, because MY process (as project maintainer) will necessarily be quite different than yours (as contributors). What follows is a somewhat lengthy brain dump. Hopefully those of you who are interested in darcs will be able to follow along, and perhaps offer suggestions, critiques, etc. I'm imagining that contributors will be able to ignore CVS entirely, and work purely in darcs. You will have your pristine repo, and pull into it frequently (at least at the beginning of each coding session). Then, you will clone pristine into one or more local working repos where you will actually edit, compile, and test. When you're happy with your results, you will "record" your changes into your working darcs repo, and eventually you will either send (email) your patch bundle to me, or will publish your own repo(s) on the web. I think I said all that before. My "maintainer" process, at least for now, will still include CVS. I will keep my current working directory which is set up to commit into CVS, but I won't do any actual work in it. I will also have a darcs pristine repo (regularly pulled from portfolio16). When I want to apply a submitted darcs patch, I will clone the pristine repo, and apply the patch into the clone. In the clone repo, I will examine the patch, compile, and test the results. I will also make any necessary edits, and will update the Changelog[1]. When I am happy with the changeset, I will use "meld" to diff the cloned repo against my "official" local CVS working directory. I will manually move all new or changed files, and will delete any that have been deleted. It's pretty easy with a point-and-click gui. Then, I will do a cvs commit. Because the remote mirror won't update immediately, I will have to continue using the same cloned repo for an entire session of patch applying. Well, actually I'll clone it again after each CVS commit, to allow me to easily roll back if I don't like a changeset. Probably at the start of my next session, I would re-pull into pristine, and then delete all the clones. Here's one thing I haven't figured out: darcs tends to be REALLY picky about patch identity. If you have two identical trees, but those trees don't have identical patch history, you can't easily merge between them. I believe this issue is specific to darcs, and would not affect bzr (or mercurial, or most of the others). A similar (but not identical) problem might happen with ArX. As a simple example, imagine if Adam grabbed the portfolio16 copy of wxruby2, but Eve instead grabbed today's CVS snapshot, and did a darcs init to turn it into a repo. If they email patches to each other, those patches would not apply. Darcs would not recognize that the two trees are at all related, even though they are identical. So, now imagine that Carl pulls the latest darcs repo, creates a cloned repo named "working", makes changes, and emails those patches to me. I commit them to CVS, and the changes get mirrored and then pulled into Carl's pristine tree. If Carl tries to merge between pristine and his "working" repo, I'm not sure what will happen. Darcs might refuse to apply the official patch, or might consider it to be a conflict. Hopefully it will be smart enough to see the contents are identical, and just do a silent merge. But what if I made some changes? Will darcs still do a good merge? And will darcs be flustered constantly trying to sync Carl's original change which never makes it into the official repo? Will it be possible for someone to maintain a long-lived "tracking" repo that has some local changes that aren't in pristine yet? A good example of this would be Roy's ongoing scintilla work. So hopefully tomorrow I'll be able to apply Sean's test darcs patch. And then Sean can tell us how well it came back into his darcs repo. It's definitely going to be a learning experience. Kevin From wxruby at qualitycode.com Wed Oct 5 00:31:01 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 05 Oct 2005 00:31:01 -0400 Subject: [Wxruby-users] Charlie's Ruby/SWIG object lifecycle improvements In-Reply-To: <43434F6F.3040300@mindspring.com> References: <20050809195824.GB19961@portfolio16.de> <42F97CD3.108@qualitycode.com> <4312895C.9010806@qualitycode.com> <20050830141501.GA13253@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433F5978.7020501@mindspring.com> <433FAA96.4060201@pressure.to> <434066E5.4060809@mindspring.com> <43434AD0.1010602@qualitycode.com> <43434F6F.3040300@mindspring.com> Message-ID: <43435705.4090500@qualitycode.com> Roy Sutton wrote: > Kevin Smith wrote: > >> >>Sounds great. Based on the description he posted to the SWIG mailing >>list, it sounds like he's doing something similar to what we are doing. >>It would be great to know if his approach is inherently better (aside >>from being built into SWIG itself). >> > Well, I don't think we've actually tackled that issue yet. It's on the > TODO list. As he's already done the work I don't see why we'd want to > reinvent the wheel. See below... > I already figured this out. My bet is we can extract his .SWG file > changes and optionally include them if SWIGVER < 1.3.26. Sounds great. > Two different features. %DISOWN allows you to move ownership of the > object. For example, if you set a an object that becomes owned by the > window you'll want ruby to let go of its hold on it so it gets freed > properly by the window. The track objects stuff is a related, but > different, feature that ensures that any time you request a wrapper for > a C++ object you get the same ruby object back. Ah. Ok. Now I see. The original description of %trackobjects sounded more like %DISOWN. I was focused on the reference to "mark", which would be to avoid crashing when a C++ object was deleted without Ruby knowing about it. Unfortunately, it's not clear that Charlie's %DISOWN solution will be any better than ours, since ours already works well for any class that actually has a director. The interesting bit of the %trackobjects stuff is the ability to return the same Ruby object that was passed in. It would definitely be great to use Charlies work on this, since as you suggest, we haven't tackled it yet in wxruby2. We did have this in wxruby 0.6, so it wouldn't be all that hard, but I'm much happier using an "official" solution. Thanks, Kevin From wxruby at qualitycode.com Wed Oct 5 23:37:17 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 05 Oct 2005 23:37:17 -0400 Subject: [Wxruby-users] First darcs-patch applied! (was: Starting to use darcs) In-Reply-To: References: <20050809195824.GB19961@portfolio16.de> <431A1732.5000403@qualitycode.com> <20050904134852.GB6818@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> Message-ID: <43449BED.2000807@qualitycode.com> Sean Long wrote: > I did a darcs send and entered your email, oh well. I just did a darcs > send -o filename and am including that in this message. Let me know if > that is how you want patches from darcs. Thanks for sending that sample patch! For the curious, it just tweaked a line of text in the TODO file...cleverly, the one mentioning switching to darcs :-) After I used "darcs apply", I was momentarily baffled because "darcs whatsnew" reported that nothing had changed. Then I realized that the patch had been applied to both the working copy and to the darcs repo. I confirmed that Sean's patch was in my darcs changelog. And a directory comparison with my pristine tree showed the change. Then I used meld to compare my darcs working copy against my long-time CVS wxruby2 directory. With two clicks, I copied the modified file into my CVS staging tree. I then edited Changelog, and did a cvs commit. So the darcs-generated and darcs-applied patch is now in the cvs tree. Sean: I'm really interested to hear what happens when you try to darcs pull this patch into the repo from which it was generated. After the change gets copied to the darcs mirror, of course. So, the format you used to email me the darcs patch was great. If you have a way of naming the attachment something more specific than "bundle", that would be appreciated, but not essential. Again, thanks. Kevin From sean.m.long at gmail.com Thu Oct 6 00:47:11 2005 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 5 Oct 2005 21:47:11 -0700 Subject: [Wxruby-users] First darcs-patch applied! (was: Starting to use darcs) In-Reply-To: <43449BED.2000807@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <43449BED.2000807@qualitycode.com> Message-ID: > Sean: I'm really interested to hear what happens when you try to darcs > pull this patch into the repo from which it was generated. After the > change gets copied to the darcs mirror, of course. Changes not copied to mirror yet, will try later. > So, the format you used to email me the darcs patch was great. If you > have a way of naming the attachment something more specific than > "bundle", that would be appreciated, but not essential. what I did was: darcs record darcs send -o bundle so bundle can be replaced with any file name like wxGrid_mega_fix.patch Sean From sean.m.long at gmail.com Thu Oct 6 02:45:56 2005 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 5 Oct 2005 23:45:56 -0700 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: <43433D8D.10802@qualitycode.com> References: <43433D8D.10802@qualitycode.com> Message-ID: > Sean Long wrote: > > I am still hunting the bug where the cell editor finishes and crashes > > on Mac OS. > > Bummer. As I think I said, if you can narrow it to a small code sample, > I can try to help isolate it. The Grid sample (GridSimple.rbw) in BigDemo has this bug and it only uses the default cell editor and render. Hopefully a fresh pair of eyes may find the problem. Sean From wxruby at qualitycode.com Thu Oct 6 10:44:14 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Thu, 06 Oct 2005 10:44:14 -0400 Subject: [Wxruby-users] First darcs-patch applied! In-Reply-To: References: <20050809195824.GB19961@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <43449BED.2000807@qualitycode.com> Message-ID: <4345383E.3080503@qualitycode.com> Sean Long wrote: > Changes not copied to mirror yet, will try later. Right. The mirror is scheduled for 3:30AM CET/CEST, which is UTC + 1/2, whereas I'm in EST/EDT (UTC - 5/4), so I guess for me it would happen at 9:30pm each evening, which is often right before I start working on wxruby. > what I did was: > darcs record > darcs send -o bundle Wow. That's pretty darned simple. > so bundle can be replaced with any file name like wxGrid_mega_fix.patch That would be great. I tend to accumulate the patch files in a directory for a single session (typically an evening), and then erase them all before starting the next batch. So the names don't need to be globally unique, but a short meaningful name like that would be helpful. Thanks, Kevin From roys at mindspring.com Thu Oct 6 14:01:17 2005 From: roys at mindspring.com (Roy Sutton) Date: Thu, 06 Oct 2005 14:01:17 -0400 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: <43433D8D.10802@qualitycode.com> Message-ID: <4345666D.1020502@mindspring.com> Sean, Could you be a little more specific about what the bug is? The only one I'm sure about right now is if you hit the delete button. Could you give me some steps to reproduce the problem you're seeing? Roy Sean Long wrote: >> Sean Long wrote: >> >>> I am still hunting the bug where the cell editor finishes and crashes >>> on Mac OS. >>> >> Bummer. As I think I said, if you can narrow it to a small code sample, >> I can try to help isolate it. >> > > The Grid sample (GridSimple.rbw) in BigDemo has this bug and it only > uses the default cell editor and render. Hopefully a fresh pair of > eyes may find the problem. > > Sean > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Thu Oct 6 14:14:42 2005 From: roys at mindspring.com (Roy Sutton) Date: Thu, 06 Oct 2005 14:14:42 -0400 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: <4345666D.1020502@mindspring.com> References: <43433D8D.10802@qualitycode.com> <4345666D.1020502@mindspring.com> Message-ID: <43456992.3090404@mindspring.com> Nevermind, I just didn't read it well. Feeling a little bit slow today. Roy Sutton wrote: > Sean, > > Could you be a little more specific about what the bug is? The only one > I'm sure about right now is if you hit the delete button. Could you > give me some steps to reproduce the problem you're seeing? > > Roy > > Sean Long wrote: > >>> Sean Long wrote: >>> >>> >>>> I am still hunting the bug where the cell editor finishes and crashes >>>> on Mac OS. >>>> >>>> >>> Bummer. As I think I said, if you can narrow it to a small code sample, >>> I can try to help isolate it. >>> >>> >> The Grid sample (GridSimple.rbw) in BigDemo has this bug and it only >> uses the default cell editor and render. Hopefully a fresh pair of >> eyes may find the problem. >> >> Sean >> >> _______________________________________________ >> 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 Thu Oct 6 15:35:48 2005 From: roys at mindspring.com (Roy Sutton) Date: Thu, 06 Oct 2005 15:35:48 -0400 Subject: [Wxruby-users] Grid.GetTextExtent Message-ID: <43457C94.8020206@mindspring.com> Wow. Look what SWIG does to GetTextExtent in Grid.cpp: void SwigDirector_wxGrid::GetTextExtent(wxString const &string, int *x, int *y, int *descent, int *externalLeading, wxFont const *font) const { ... if (swig_get_up()) { wxWindow::GetTextExtent(string,x,y,descent,externalLeading,font); return; } obj0 = rb_str_new2((const char *)(&string)->mb_str()); obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), 2,obj0,obj1); Wow. That's just so wrong. It only converts two parameters and the one it chooses to convert shouldn't be passed in any case. Any suggestions on this one? Roy From sean.m.long at gmail.com Thu Oct 6 18:44:31 2005 From: sean.m.long at gmail.com (Sean Long) Date: Thu, 6 Oct 2005 15:44:31 -0700 Subject: [Wxruby-users] nested classes Message-ID: I am working on wxFileType and wxMimeTypesManager, most of which I have done but I had to comment out a nested class in wxFileType and the methods that use it. Does anyone have a clever way to get around nested classes since SWIG does not currently support them? Sean From wxruby at qualitycode.com Fri Oct 7 09:31:51 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Fri, 07 Oct 2005 09:31:51 -0400 Subject: [Wxruby-users] nested classes In-Reply-To: References: Message-ID: <434678C7.30900@qualitycode.com> Sean Long wrote: > I am working on wxFileType and wxMimeTypesManager, most of which I > have done but I had to comment out a nested class in wxFileType and > the methods that use it. Does anyone have a clever way to get around > nested classes since SWIG does not currently support them? Too bad they nested the MessageParameters class. There was something on the swig list within the last month or so that described some kind of workaround, but I didn't pay much attention. In this case, I think you could create a subclass in C++ (in the .i file, like we did with App), and then expose it to Ruby. If that doesn't make sense, let me know and I'll rethink and/or clarify. Kevin From sean.m.long at gmail.com Fri Oct 7 13:37:01 2005 From: sean.m.long at gmail.com (Sean Long) Date: Fri, 7 Oct 2005 10:37:01 -0700 Subject: [Wxruby-users] nested classes In-Reply-To: <434678C7.30900@qualitycode.com> References: <434678C7.30900@qualitycode.com> Message-ID: > this case, I think you could create a subclass in C++ (in the .i > file, like we did with App), and then expose it to Ruby. If that doesn't > make sense, let me know and I'll rethink and/or clarify. Tried this with the MessageParameters stuff commented out and I can't even get that working, can you take a look at this *.i file and see if I have something obviously wrong. Thanks Sean -------------- next part -------------- # Copyright 2004-2005 by Kevin Smith # released under the MIT-style wxruby2 license %include "../common.i" %module(directors="1") wxFileType %{ #include %} %rename(FileType) wxRubyFileType; %{ class wxRubyFileType : public wxFileType { public: /* // An object of this class must be passed to Get{Open|Print}Command. The // default implementation is trivial and doesn't know anything at all about // parameters, only filename and MIME type are used (so it's probably ok for // Windows where %{param} is not used anyhow) class MessageParameters { public: // ctors MessageParameters() { } MessageParameters(const wxString& filename, const wxString& mimetype = wxEmptyString) : m_filename(filename), m_mimetype(mimetype) { } // accessors (called by GetOpenCommand) // filename const wxString& GetFileName() const { return m_filename; } // mime type const wxString& GetMimeType() const { return m_mimetype; } // override this function in derived class virtual wxString GetParamValue(const wxString& name) const { return wxEmptyString; } // virtual dtor as in any base class virtual ~MessageParameters() { } protected: wxString m_filename, m_mimetype; }; */ wxRubyFileType(const wxFileTypeInfo& ftInfo) :wxFileType(ftInfo) { } ~wxRubyFileType() { wxFileType::~wxFileType(); } }; %} class wxRubyFileType : public wxFileType { public: /* class MessageParameters { public: MessageParameters(); MessageParameters(const wxString& filename, const wxString& mimetype = wxEmptyString); const wxString& GetFileName() const; const wxString& GetMimeType() const; virtual wxString GetParamValue(const wxString& name) const; virtual ~MessageParameters(); protected: wxString m_filename, m_mimetype; }; */ wxRubyFileType(const wxFileTypeInfo& ftInfo); bool GetMimeType(wxString *mimeType) const; bool GetMimeTypes(wxArrayString& mimeTypes) const; bool GetExtensions(wxArrayString& extensions); bool GetIcon(wxIconLocation *iconloc) const; // bool GetIcon(wxIconLocation *iconloc, // const MessageParameters& params) const; bool GetDescription(wxString *desc) const; // bool GetOpenCommand(wxString *openCmd, // const MessageParameters& params) const; wxString GetOpenCommand(const wxString& filename) const; // bool GetPrintCommand(wxString *printCmd, // const MessageParameters& params) const; // size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, // const wxFileType::MessageParameters& params) const; bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0); bool Unassociate(); // static wxString ExpandCommand(const wxString& command, // const MessageParameters& params); ~wxRubyFileType(); }; From wxruby at qualitycode.com Sun Oct 9 17:50:06 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 17:50:06 -0400 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: <43433D8D.10802@qualitycode.com> Message-ID: <4349908E.9060301@qualitycode.com> Sean Long wrote: >>Sean Long wrote: >> >>>I am still hunting the bug where the cell editor finishes and crashes >>>on Mac OS. >> >>Bummer. As I think I said, if you can narrow it to a small code sample, >>I can try to help isolate it. > > > The Grid sample (GridSimple.rbw) in BigDemo has this bug and it only > uses the default cell editor and render. Hopefully a fresh pair of > eyes may find the problem. Sorry it has taken me so long to get to this. Ugh. GridSimple is...well...simple. There's almost nothing there. Until proven otherwise, I would guess that the problem is actually in wx itself, and not in wxruby. Can you try a C++ wx grid sample and see if it has the same problem? Next most likely would be something in our event/callback system. I looked through all the grid event definitions and nothing looked obviously incorrect. You might put printfs in EventThunker (EvtHandler.i) to see if it is crashing during an event. Kevin From wxruby at qualitycode.com Sun Oct 9 18:35:20 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 18:35:20 -0400 Subject: [Wxruby-users] [Fwd: Re: [Swig] Re: Object return problem] Message-ID: <43499B28.1040109@qualitycode.com> Forwarded from the SWIG mailing list, so we have a copy in our archives. Kevin -------- Original Message -------- Subject: Re: [Swig] Re: Object return problem Date: Sun, 09 Oct 2005 18:31:40 -0400 From: Kevin Smith To: Charlie Savage CC: Swig at cs.uchicago.edu References: <4347277E.1030700 at mindspring.com> <4349911B.70200 at interserv.com> Hi guys, I just figured out the answer. wxWindow uses directors (as almost all our wxruby classes do), and the swig error message hints at the problem. We need to use directorout typemaps, rather than just plain "out". I inserted this, and it seemed to work: %typemap(directorout) wxString { $result = wxString(STR2CSTR($1), wxConvUTF8); } Typemaps are sure a confusing feature. They're great, and powerful. But I hope for SWIG v3 they can be completely overhauled to be more consistent and straightforward. I'll forward this message to the wxruby list, too. Kevin Charlie Savage wrote: > Hi Roy, > > Not sure of the answer. Could you post the method signature of > wxWindow::GetTitle and the relevant parts of the .i file that is > processing it? > > Also, is the Ruby wxWindows SWIG binding you are working on available > online someplace? > > Charlie > > Roy Sutton wrote: > >> Hello all! I'm working on wxRuby (a Ruby wrapping for wxWindows) and >> we're running into some problems. We have a function prototype that >> looks like this: >> >> virtual wxString GetTitle() ; >> >> When attempting to swig this I get: >> >> swig\classes\include\wxWindow.h(9): Warning(471): Unable to use return >> type wxString in director method wxWindow::GetTitle (skipping method). >> >> We have several typemaps for wxString, including an 'out' typemap: >> >> %typemap(in) wxString& { >> $1 = new wxString(STR2CSTR($input), wxConvUTF8); >> } >> >> %typemap(in) const wxString& { >> $1 = new wxString(STR2CSTR($input), wxConvUTF8); >> } >> >> %typemap(in) wxString* { >> $1 = new wxString(STR2CSTR($input), wxConvUTF8); >> } >> >> /** >> %typemap(freearg) wxString & { >> delete $1; >> } >> >> %typemap(freearg) const wxString& { >> delete $1; >> } >> >> %typemap(freearg) wxString* { >> delete $1; >> } >> */ >> %typemap(directorin) wxString, const wxString &, wxString & "$input = >> rb_str_new2((const char *)$1.mb_str());"; >> >> %typemap(directorin) wxString *, const wxString * "TODO: >> $1_name->mb_str()"; >> >> >> %typemap(out) wxString { >> $result = rb_str_new2((const char *)$1.mb_str()); >> } >> >> %typemap(out) wxString& { >> $result = rb_str_new2((const char *)$1.mb_str()); >> } >> >> %typemap(out) const wxString& { >> $result = rb_str_new2((const char *)$1.mb_str()); >> } >> >> %apply wxString& { wxString* } >> >> >> %typemap(varout) wxString { >> $result = rb_str_new2((const char *)$1.mb_str()); >> } >> >> %typemap(typecheck, precedence=SWIG_TYPECHECK_STRING) wxString { >> $1 = (TYPE($input) == T_STRING); >> } >> >> %typemap(typecheck, precedence=SWIG_TYPECHECK_STRING) wxString & { >> $1 = (TYPE($input) == T_STRING); >> } >> >> >> %typemap(typecheck, precedence=SWIG_TYPECHECK_STRING) wxString const & { >> $1 = (TYPE($input) == T_STRING); >> } >> >> %typemap(typecheck, precedence=SWIG_TYPECHECK_STRING) wxString *{ >> $1 = (TYPE($input) == T_STRING); >> } >> >> Anyone have any inkling what we're doing wrong here? Any comments on >> general improvements to our typemaps would be appreciated. >> Unfortunately my swig-fu isn't as advanced as it could be! >> >> Roy >> >> _______________________________________________ >> Swig maillist - Swig at cs.uchicago.edu >> http://mailman.cs.uchicago.edu/mailman/listinfo/swig >> > > _______________________________________________ > Swig maillist - Swig at cs.uchicago.edu > http://mailman.cs.uchicago.edu/mailman/listinfo/swig _______________________________________________ Swig maillist - Swig at cs.uchicago.edu http://mailman.cs.uchicago.edu/mailman/listinfo/swig From wxruby at qualitycode.com Sun Oct 9 18:40:50 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 18:40:50 -0400 Subject: [Wxruby-users] nested classes In-Reply-To: References: <434678C7.30900@qualitycode.com> Message-ID: <43499C72.2040109@qualitycode.com> Sean Long wrote: >>this case, I think you could create a subclass in C++ (in the .i >>file, like we did with App), and then expose it to Ruby. If that doesn't >>make sense, let me know and I'll rethink and/or clarify. > > > Tried this with the MessageParameters stuff commented out and I can't > even get that working, can you take a look at this *.i file and see if > I have something obviously wrong. I think the FileType class is ok. So I would suggest starting with a plain .i file for it. All our rake build processes assume only one class per .i file (I think), so next I would recommend that you create a new MessageParameters.i file. In that one, declare a MessageParameters class that subclasses FileType::MessageParameters. Actually, it should end up much simpler than the App stuff, so I apologize for pointing you in that direction. Simply declaring a MessageParameters class should be enough to get SWIG to wrap it. Kevin From wxruby at qualitycode.com Sun Oct 9 18:51:40 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 18:51:40 -0400 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: <43457C94.8020206@mindspring.com> References: <43457C94.8020206@mindspring.com> Message-ID: <43499EFC.8080803@qualitycode.com> Roy Sutton wrote: > Wow. Look what SWIG does to GetTextExtent in Grid.cpp: > obj0 = rb_str_new2((const char *)(&string)->mb_str()); > obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); > result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), > 2,obj0,obj1); > > Wow. That's just so wrong. It only converts two parameters and the one > it chooses to convert shouldn't be passed in any case. Any suggestions > on this one? It does the same thing in Window (where GetTextExtent is defined). I suspect we need a directorout typemap here, to "remind" SWIG what we already told it about this method signature. Kevin From wxruby at qualitycode.com Sun Oct 9 19:08:44 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 19:08:44 -0400 Subject: [Wxruby-users] ComboBox.new optional parameter handling In-Reply-To: <43297E4C.4040604@mindspring.com> References: <432661F2.5060207@mindspring.com> <43297943.7020007@qualitycode.com> <43297E4C.4040604@mindspring.com> Message-ID: <4349A2FC.801@qualitycode.com> Roy Sutton wrote: >>>Swig is making mincemeat out of ComboBox.new. Because of the way it's >>>picking the 'correct' one to call it's calling with a null name instead >>>of a default name. How did we fix this before? Ok. The solution here is (in classes/include/wxComboBox.h) to comment out the constructor that doesn't use ArrayString, and then to add the default values for all the parameters before it. I would also insert a comment above this constructor saying something like: // tweak this signature so it can be used // for cases where only a few parameters are passed Basically, we are fooling the system. Invocations with so few parameters that the int/char** vs ArrayString distinction doesn't matter will be treated as if they were calls to the ArrayString constructor. But the actual code generated will actually call the other constructor, because it will match the signature. I tried this, and it compiled and ran. I also had to tweak the bigdemo ComboBox code to not call append with two strings. But I haven't checked any of this in, because mine was all just a quick hack, and I trust you can do a better job with it. Same with the directorout stuff, by the way. I experimented with it to see it work, but I don't plan to check in any of that. Ongoing thanks for your efforts, Kevin From wxruby at qualitycode.com Sun Oct 9 19:11:38 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 19:11:38 -0400 Subject: [Wxruby-users] Handling int pointer parameters In-Reply-To: <432649E5.2030306@mindspring.com> References: <43248559.1000601@mindspring.com> <43263F6B.7040405@qualitycode.com> <432649E5.2030306@mindspring.com> Message-ID: <4349A3AA.80709@qualitycode.com> Roy Sutton wrote: > An example of one where the two pointers are used as parameters: > > http://www.wxwindows.org/manuals/2.6.1/wx_wxwindow.html#wxwindowclienttoscreen I think we should follow wxPython here, and have a separate method that takes (x,y) and returns the values. When in doubt, we should match wxPython. If they haven't already figured out a solution, we can try to come up with one on a case-by-case basis. Cheers, Kevin From wxruby at qualitycode.com Sun Oct 9 19:18:08 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 09 Oct 2005 19:18:08 -0400 Subject: [Wxruby-users] [Fwd: Re: [Swig] typemap + default argument bug?] Message-ID: <4349A530.4050903@qualitycode.com> (Mostly for Roy): I saw this on the SWIG list, and wonder if it might be related to the problems we have been seeing where multi-arg typemaps end up invoking the wrong wrapper methods. (Not the newly-discovered directorout stuff). Perhaps if we switched to "compactdefaultargs" things would start to work more sanely. Looking at this section of the SWIG docs, it looks like it should be safe, and might at least make it easier to diagnose any problems, if it doesn't fix them outright: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_default_args Just a thought. Kevin -------- Original Message -------- Subject: Re: [Swig] typemap + default argument bug? Date: Tue, 27 Sep 2005 15:57:52 -0400 (EDT) From: Josh Cherry To: Charles at Schwieters.org CC: swig at cs.uchicago.edu On Tue, 27 Sep 2005 Charles at Schwieters.org wrote: > _wrap_new_ClassB calls SWIG_ConvertPtr to convert the instanceName > argument to a p_String, thereby ignoring the typemap. > > Previous versions of swig do not seem to exhibit this behavior (I > checked 1.3.22 and 1.3.24). They seem to treat the instanceName > argument as a PyObject* before calling stringTypemap. > > Do I misunderstand something, or is this a bug in 1.3.25? Is there a > workaround? Here's my guess. What you are seeing results from the fact that the handling of default arguments changed to be like the handling of overloaded functions. For overloaded functions to work right you need to do the %typecheck thing, which you haven't done for String. Doing that should fix this. Putting %feature("compactdefaultargs"); in your interface file should also fix it by restoring the old handling of default arguments. Note that the SWIG_ConvertPtr you see in _wrap_new_ClassB is just for checking the type; you should see your "in" typemap used in _wrap_new_ClassB_1 (or something like that). Josh -- Joshua L. Cherry, Ph.D. NCBI/NLM/NIH (Contractor) jcherry at ncbi.nlm.nih.gov _______________________________________________ Swig maillist - Swig at cs.uchicago.edu http://mailman.cs.uchicago.edu/mailman/listinfo/swig From roys at mindspring.com Sun Oct 9 19:45:15 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun, 09 Oct 2005 19:45:15 -0400 Subject: [Wxruby-users] [Fwd: Re: [Swig] typemap + default argument bug?] In-Reply-To: <4349A530.4050903@qualitycode.com> References: <4349A530.4050903@qualitycode.com> Message-ID: <4349AB8B.6000800@mindspring.com> Great work, Kevin. I'll try making a few of the suggested changes and see how things work out. I've been really overloaded lately and haven't had much time for this. Hopefully I can make some time this week. Roy Kevin Smith wrote: > (Mostly for Roy): > > I saw this on the SWIG list, and wonder if it might be related to the > problems we have been seeing where multi-arg typemaps end up invoking > the wrong wrapper methods. (Not the newly-discovered directorout stuff). > > Perhaps if we switched to "compactdefaultargs" things would start to > work more sanely. Looking at this section of the SWIG docs, it looks > like it should be safe, and might at least make it easier to diagnose > any problems, if it doesn't fix them outright: > http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_default_args > > Just a thought. > > Kevin > > > -------- Original Message -------- > Subject: Re: [Swig] typemap + default argument bug? > Date: Tue, 27 Sep 2005 15:57:52 -0400 (EDT) > From: Josh Cherry > To: Charles at Schwieters.org > CC: swig at cs.uchicago.edu > > > On Tue, 27 Sep 2005 Charles at Schwieters.org wrote: > > >> _wrap_new_ClassB calls SWIG_ConvertPtr to convert the instanceName >> argument to a p_String, thereby ignoring the typemap. >> >> Previous versions of swig do not seem to exhibit this behavior (I >> checked 1.3.22 and 1.3.24). They seem to treat the instanceName >> argument as a PyObject* before calling stringTypemap. >> >> Do I misunderstand something, or is this a bug in 1.3.25? Is there a >> workaround? >> > > Here's my guess. What you are seeing results from the fact that the > handling of default arguments changed to be like the handling of > overloaded functions. For overloaded functions to work right you need to > do the %typecheck thing, which you haven't done for String. Doing that > should fix this. Putting > > %feature("compactdefaultargs"); > > in your interface file should also fix it by restoring the old handling of > default arguments. Note that the SWIG_ConvertPtr you see in > _wrap_new_ClassB is just for checking the type; you should see your "in" > typemap used in _wrap_new_ClassB_1 (or something like that). > > Josh > > -- > Joshua L. Cherry, Ph.D. > NCBI/NLM/NIH (Contractor) > jcherry at ncbi.nlm.nih.gov > > > > > _______________________________________________ > Swig maillist - Swig at cs.uchicago.edu > http://mailman.cs.uchicago.edu/mailman/listinfo/swig > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From roys at mindspring.com Sun Oct 9 20:07:29 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun, 09 Oct 2005 20:07:29 -0400 Subject: [Wxruby-users] An interesting article on open-source projects Message-ID: <4349B0C1.6030509@mindspring.com> http://www.oreillynet.com/pub/wlg/7996 From roys at mindspring.com Sun Oct 9 20:09:21 2005 From: roys at mindspring.com (Roy Sutton) Date: Sun, 09 Oct 2005 20:09:21 -0400 Subject: [Wxruby-users] Handling int pointer parameters In-Reply-To: <4349A3AA.80709@qualitycode.com> References: <43248559.1000601@mindspring.com> <43263F6B.7040405@qualitycode.com> <432649E5.2030306@mindspring.com> <4349A3AA.80709@qualitycode.com> Message-ID: <4349B131.20608@mindspring.com> That really wasn't my beef. I think we need to go in and change the header files to read either: int *INPUT int *OUTPUT int *INOUT (I think that's it) If we do this, SWIG has a typemap already made up for this (I believe). Then we don't even have to fix those functions with manual typemaps. I realize we're hoping to fix the whole header file issue later, but we do need something that works now, I think. Roy Kevin Smith wrote: > Roy Sutton wrote: > >> An example of one where the two pointers are used as parameters: >> >> http://www.wxwindows.org/manuals/2.6.1/wx_wxwindow.html#wxwindowclienttoscreen >> > > I think we should follow wxPython here, and have a separate method that > takes (x,y) and returns the values. > > When in doubt, we should match wxPython. If they haven't already figured > out a solution, we can try to come up with one on a case-by-case basis. > > Cheers, > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > > From sean.m.long at gmail.com Mon Oct 10 02:20:24 2005 From: sean.m.long at gmail.com (Sean Long) Date: Sun, 9 Oct 2005 23:20:24 -0700 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: <4349908E.9060301@qualitycode.com> References: <43433D8D.10802@qualitycode.com> <4349908E.9060301@qualitycode.com> Message-ID: > Ugh. GridSimple is...well...simple. There's almost nothing there. Until > proven otherwise, I would guess that the problem is actually in wx > itself, and not in wxruby. Can you try a C++ wx grid sample and see if > it has the same problem? Just tried the c++ grid sample and it has the same bug. In a way I am glad because it means the grid code in wxruby is correct but I am bummed because I still have the bug. I also looked in the wxWidgets bug tracker and found the same problem listed for wxPython and the submitter fixed it by going back to 2.6.0. I am going to install 2.6.2 and see if the problem is fixed. Should have tried this sooner. Sean From sean.m.long at gmail.com Mon Oct 10 02:48:25 2005 From: sean.m.long at gmail.com (Sean Long) Date: Sun, 9 Oct 2005 23:48:25 -0700 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: <43433D8D.10802@qualitycode.com> <4349908E.9060301@qualitycode.com> Message-ID: This bug is fixed in 2.6.2, atleast the c++ sample. I will compile wxruby and try the sample in ruby to make sure it is also fixed there. Thanks for the help and suggestions Sean On 10/9/05, Sean Long wrote: > > Ugh. GridSimple is...well...simple. There's almost nothing there. Until > > proven otherwise, I would guess that the problem is actually in wx > > itself, and not in wxruby. Can you try a C++ wx grid sample and see if > > it has the same problem? > > Just tried the c++ grid sample and it has the same bug. In a way I am > glad because it means the grid code in wxruby is correct but I am > bummed because I still have the bug. I also looked in the wxWidgets > bug tracker and found the same problem listed for wxPython and the > submitter fixed it by going back to 2.6.0. I am going to install 2.6.2 > and see if the problem is fixed. > > Should have tried this sooner. > > Sean > From sean.m.long at gmail.com Mon Oct 10 03:05:39 2005 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 10 Oct 2005 00:05:39 -0700 Subject: [Wxruby-users] First darcs-patch applied! (was: Starting to use darcs) In-Reply-To: <43449BED.2000807@qualitycode.com> References: <20050809195824.GB19961@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <43449BED.2000807@qualitycode.com> Message-ID: > Sean: I'm really interested to hear what happens when you try to darcs > pull this patch into the repo from which it was generated. After the > change gets copied to the darcs mirror, of course. I finally did this and got this in my repo: Pulling from "/Users/sean/work/wxruby2/pulled"... Wed Oct 5 20:21:57 PDT 2005 qualitycode * Applied a test patch (to the TODO file) submitted via darcs (Sean Long) Shall I pull this patch? (1/1) [ynWvpxqadjk], or ? for help: y We have conflicts in the following files: ./TODO Finished pulling and applying. This is what the TODO looked like (I don't think I touched this file after sending the patch). The vv and ^^ are inserted by darcs. v v v v v v v - Switch from CVS to darcs? (in progress) ^ ^ ^ ^ ^ ^ ^ Maybe we need some parameters to darcs send, it does have a -u like diff. Sean From sean.m.long at gmail.com Mon Oct 10 03:47:56 2005 From: sean.m.long at gmail.com (Sean Long) Date: Mon, 10 Oct 2005 00:47:56 -0700 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: <43433D8D.10802@qualitycode.com> <4349908E.9060301@qualitycode.com> Message-ID: > This bug is fixed in 2.6.2, atleast the c++ sample. I will compile > wxruby and try the sample in ruby to make sure it is also fixed there. Works in wxruby too. Sean From wxruby at qualitycode.com Mon Oct 10 08:25:05 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 10 Oct 2005 08:25:05 -0400 Subject: [Wxruby-users] more fixes for Grid classes In-Reply-To: References: <43433D8D.10802@qualitycode.com> <4349908E.9060301@qualitycode.com> Message-ID: <434A5DA1.8000603@qualitycode.com> Sean Long wrote: >>This bug is fixed in 2.6.2, atleast the c++ sample. I will compile >>wxruby and try the sample in ruby to make sure it is also fixed there. > > > Works in wxruby too. Good to hear. Thanks for the follow-up. We'll have to keep that in mind when we encounter other obscure problems in the future: Problems are much more likely to be in the wxruby side, but the C++ wx code isn't necessarily bug-free either. Thanks, Kevin From wxruby at qualitycode.com Mon Oct 10 08:49:29 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 10 Oct 2005 08:49:29 -0400 Subject: [Wxruby-users] First darcs-patch applied! In-Reply-To: References: <20050809195824.GB19961@portfolio16.de> <431B488F.3090004@qualitycode.com> <20050904194831.GC6818@portfolio16.de> <4320DE94.2070201@qualitycode.com> <20050930114206.GA8096@portfolio16.de> <433E1437.1000706@qualitycode.com> <433E8552.5090205@qualitycode.com> <43449BED.2000807@qualitycode.com> Message-ID: <434A6359.8070106@qualitycode.com> Sean Long wrote: >>Sean: I'm really interested to hear what happens when you try to darcs >>pull this patch into the repo from which it was generated. After the >>change gets copied to the darcs mirror, of course. > > > I finally did this and got this in my repo: > > Pulling from "/Users/sean/work/wxruby2/pulled"... > > Wed Oct 5 20:21:57 PDT 2005 qualitycode > * Applied a test patch (to the TODO file) submitted via darcs (Sean Long) > Shall I pull this patch? (1/1) [ynWvpxqadjk], or ? for help: y > > We have conflicts in the following files: > ./TODO > Finished pulling and applying. > > This is what the TODO looked like (I don't think I touched this file > after sending the patch). The vv and ^^ are inserted by darcs. > > v v v v v v v > - Switch from CVS to darcs? (in progress) > ^ ^ ^ ^ ^ ^ ^ Bummer. That's basically what I feared. Darcs doesn't quite notice that the patch you sent me, and the patch I sent you back perform identical changes. It inserts the vvv ^^^ to indicate where those two patches "conflicted", even though the outcome was identical. > Maybe we need some parameters to darcs send, it does have a -u like diff. I don't think that would help. This won't be a problem as long as you (all of you who are contributors, that is) throw away each working repos after all of its submitted patches have been applied. In this case, you would have created the working repo, made the change, submitted the patch, received my version of that patch into your pristine tree, confirmed that my change was at least as good as yours, and then deleted that working repo. I can think of at least two drawbacks of that process: 1. You will have to somehow confirm that my change is as good as yours. If they are identical, you can look for a pattern like the one you saw here...perhaps that could even be automated. If they changes are different, you will need to manually inspect each case where my change was different from yours. I think that's slightly worse than what you have been doing with CVS, but maybe not? 2. If you have a long-lived working repo (branch) that contains a mix of accepted and not-yet-accepted patches, you will have to manually reconcile the accepted patches. I guess that's not too horrible as long as you avoid doing lots of work there that gets accepted. If it all gets accepted, the repo can go away. If none is accepted, there won't be conflicts. If some is accepted once, but the rest is not accepted for a while, you'll only have to do this resolution that one time. Again, perhaps this is no worse than with CVS? The "solution", of course, would be for me to directly publish a darcs repo, rather than having the darcs repo be a mirror of changes pushed via CVS. I would like to get more experience with darcs before attempting that. And we would have to decide whether or not to continue offering a read-only CVS mirror of the darcs work. For now, I would like to try a couple more darcs patch submissions, and then we can decide on next steps. Thanks again, Kevin From sean.m.long at gmail.com Tue Oct 11 14:37:15 2005 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 11 Oct 2005 11:37:15 -0700 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: <43499EFC.8080803@qualitycode.com> References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> Message-ID: Roy or Kevin. Have you gotten the GetTextExtent problem worked out? I am running up against it in a program I am writting and need to fix it but don't want to repeat any completed work. Sean On 10/9/05, Kevin Smith wrote: > Roy Sutton wrote: > > Wow. Look what SWIG does to GetTextExtent in Grid.cpp: > > > obj0 = rb_str_new2((const char *)(&string)->mb_str()); > > obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); > > result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), > > 2,obj0,obj1); > > > > Wow. That's just so wrong. It only converts two parameters and the one > > it chooses to convert shouldn't be passed in any case. Any suggestions > > on this one? > > It does the same thing in Window (where GetTextExtent is defined). > > I suspect we need a directorout typemap here, to "remind" SWIG what we > already told it about this method signature. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From roys at mindspring.com Tue Oct 11 14:44:45 2005 From: roys at mindspring.com (Roy Sutton) Date: Tue, 11 Oct 2005 14:44:45 -0400 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> Message-ID: <434C081D.4000809@mindspring.com> I don't have it fixed yet. Sean Long wrote: > Roy or Kevin. > > Have you gotten the GetTextExtent problem worked out? I am running up > against it in a program I am writting and need to fix it but don't > want to repeat any completed work. > > Sean > > > On 10/9/05, Kevin Smith wrote: > >> Roy Sutton wrote: >> >>> Wow. Look what SWIG does to GetTextExtent in Grid.cpp: >>> >>> obj0 = rb_str_new2((const char *)(&string)->mb_str()); >>> obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); >>> result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), >>> 2,obj0,obj1); >>> >>> Wow. That's just so wrong. It only converts two parameters and the one >>> it chooses to convert shouldn't be passed in any case. Any suggestions >>> on this one? >>> >> It does the same thing in Window (where GetTextExtent is defined). >> >> I suspect we need a directorout typemap here, to "remind" SWIG what we >> already told it about this method signature. >> >> Kevin >> _______________________________________________ >> 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 wxruby at qualitycode.com Tue Oct 11 15:30:06 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Tue, 11 Oct 2005 15:30:06 -0400 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: <434C081D.4000809@mindspring.com> References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> Message-ID: <434C12BE.2000804@qualitycode.com> I also have not worked on it more, and won't be able to for at least a few days. Hopefully you can fix it with one directorout typemap. Kevin Roy Sutton wrote: > I don't have it fixed yet. > > Sean Long wrote: > >>Roy or Kevin. >> >>Have you gotten the GetTextExtent problem worked out? I am running up >>against it in a program I am writting and need to fix it but don't >>want to repeat any completed work. >> >>Sean >> >> >>On 10/9/05, Kevin Smith wrote: >> >> >>>Roy Sutton wrote: >>> >>> >>>>Wow. Look what SWIG does to GetTextExtent in Grid.cpp: >>>> >>>> obj0 = rb_str_new2((const char *)(&string)->mb_str()); >>>> obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); >>>> result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), >>>>2,obj0,obj1); >>>> >>>>Wow. That's just so wrong. It only converts two parameters and the one >>>>it chooses to convert shouldn't be passed in any case. Any suggestions >>>>on this one? >>>> >>> >>>It does the same thing in Window (where GetTextExtent is defined). >>> >>>I suspect we need a directorout typemap here, to "remind" SWIG what we >>>already told it about this method signature. >>> >>>Kevin >>>_______________________________________________ >>>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 From sean.m.long at gmail.com Tue Oct 11 19:39:40 2005 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 11 Oct 2005 16:39:40 -0700 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: <434C12BE.2000804@qualitycode.com> References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> <434C12BE.2000804@qualitycode.com> Message-ID: One directorout does not fix it. I was just looking over the typemaps and wondering if these typemaps are causing the problem, they are part of the GetTextExtent signature. %typemap(in,numinputs=0) (int * x , int * y , int * descent, int * externalLeading) (int a, int b, int c, int d) { $1=&a; $2=&b; $3=&c; $4=&d; } %typemap(argout) (int * x , int * y , int * descent, int * externalLeading) { $result = rb_ary_new(); rb_ary_push($result, INT2NUM(*$1)); rb_ary_push($result, INT2NUM(*$2)); rb_ary_push($result, INT2NUM(*$3)); rb_ary_push($result, INT2NUM(*$4)); } I will look into it. Sean On 10/11/05, Kevin Smith wrote: > I also have not worked on it more, and won't be able to for at least a > few days. > > Hopefully you can fix it with one directorout typemap. > > Kevin > > Roy Sutton wrote: > > I don't have it fixed yet. > > > > Sean Long wrote: > > > >>Roy or Kevin. > >> > >>Have you gotten the GetTextExtent problem worked out? I am running up > >>against it in a program I am writting and need to fix it but don't > >>want to repeat any completed work. > >> > >>Sean > >> > >> > >>On 10/9/05, Kevin Smith wrote: > >> > >> > >>>Roy Sutton wrote: > >>> > >>> > >>>>Wow. Look what SWIG does to GetTextExtent in Grid.cpp: > >>>> > >>>> obj0 = rb_str_new2((const char *)(&string)->mb_str()); > >>>> obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); > >>>> result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), > >>>>2,obj0,obj1); > >>>> > >>>>Wow. That's just so wrong. It only converts two parameters and the one > >>>>it chooses to convert shouldn't be passed in any case. Any suggestions > >>>>on this one? > >>>> > >>> > >>>It does the same thing in Window (where GetTextExtent is defined). > >>> > >>>I suspect we need a directorout typemap here, to "remind" SWIG what we > >>>already told it about this method signature. > >>> > >>>Kevin > >>>_______________________________________________ > >>>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 > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > From sean.m.long at gmail.com Tue Oct 11 20:07:06 2005 From: sean.m.long at gmail.com (Sean Long) Date: Tue, 11 Oct 2005 17:07:06 -0700 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> <434C12BE.2000804@qualitycode.com> Message-ID: Ok. I got it working by doing the following: - comment out the two typemaps in last message - add the following directorout typemaps (not sure if they are actually needed, I believe the two typemaps that I commented out were the problem) %typemap(directorout) wxString { $result = wxString(STR2CSTR($1), wxConvUTF8); } %typemap(directorout) const wxString& { $result = new wxString(STR2CSTR($1), wxConvUTF8); } Now the question is do we need the two type maps that I commented out? I did a quick search and could not find what they were for. Also when I have a patch ready do you want it for darcs or cvs? Sean On 10/11/05, Sean Long wrote: > One directorout does not fix it. > > I was just looking over the typemaps and wondering if these typemaps > are causing the problem, they are part of the GetTextExtent signature. > > %typemap(in,numinputs=0) (int * x , int * y , int * descent, int * > externalLeading) (int a, int b, int c, int d) { > $1=&a; > $2=&b; > $3=&c; > $4=&d; > } > > %typemap(argout) (int * x , int * y , int * descent, int * externalLeading) { > $result = rb_ary_new(); > rb_ary_push($result, INT2NUM(*$1)); > rb_ary_push($result, INT2NUM(*$2)); > rb_ary_push($result, INT2NUM(*$3)); > rb_ary_push($result, INT2NUM(*$4)); > } > > I will look into it. > > Sean > > On 10/11/05, Kevin Smith wrote: > > I also have not worked on it more, and won't be able to for at least a > > few days. > > > > Hopefully you can fix it with one directorout typemap. > > > > Kevin > > > > Roy Sutton wrote: > > > I don't have it fixed yet. > > > > > > Sean Long wrote: > > > > > >>Roy or Kevin. > > >> > > >>Have you gotten the GetTextExtent problem worked out? I am running up > > >>against it in a program I am writting and need to fix it but don't > > >>want to repeat any completed work. > > >> > > >>Sean > > >> > > >> > > >>On 10/9/05, Kevin Smith wrote: > > >> > > >> > > >>>Roy Sutton wrote: > > >>> > > >>> > > >>>>Wow. Look what SWIG does to GetTextExtent in Grid.cpp: > > >>>> > > >>>> obj0 = rb_str_new2((const char *)(&string)->mb_str()); > > >>>> obj1 = SWIG_NewPointerObj(x, SWIGTYPE_p_int, 0); > > >>>> result = rb_funcall(swig_get_self(), rb_intern("get_text_extent"), > > >>>>2,obj0,obj1); > > >>>> > > >>>>Wow. That's just so wrong. It only converts two parameters and the one > > >>>>it chooses to convert shouldn't be passed in any case. Any suggestions > > >>>>on this one? > > >>>> > > >>> > > >>>It does the same thing in Window (where GetTextExtent is defined). > > >>> > > >>>I suspect we need a directorout typemap here, to "remind" SWIG what we > > >>>already told it about this method signature. > > >>> > > >>>Kevin > > >>>_______________________________________________ > > >>>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 > > > > _______________________________________________ > > wxruby-users mailing list > > wxruby-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wxruby-users > > > From wxruby at qualitycode.com Wed Oct 12 09:49:27 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Wed, 12 Oct 2005 09:49:27 -0400 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> <434C12BE.2000804@qualitycode.com> Message-ID: <434D1467.6080501@qualitycode.com> Sean Long wrote: > Ok. I got it working by doing the following: > > - comment out the two typemaps in last message > - add the following directorout typemaps (not sure if they are > actually needed, I believe the two typemaps that I commented out were > the problem) I suspect you are correct. Please test without these new wxString directorout typemaps, and omit them from a patch if they are not needed. > Now the question is do we need the two type maps that I commented out? > I did a quick search and could not find what they were for. >>%typemap(in,numinputs=0) (int * x , int * y , int * descent, int * >>externalLeading) (int a, int b, int c, int d) { >> $1=&a; >> $2=&b; >> $3=&c; >> $4=&d; >>} >> >>%typemap(argout) (int * x , int * y , int * descent, int * externalLeading) { >> $result = rb_ary_new(); >> rb_ary_push($result, INT2NUM(*$1)); >> rb_ary_push($result, INT2NUM(*$2)); >> rb_ary_push($result, INT2NUM(*$3)); >> rb_ary_push($result, INT2NUM(*$4)); >>} We definitely need something like these. The first one says that calls from Ruby can omit the x, y, descent and externalLeading parameters. which matches C++ wx, where they are ignored as input values. The second one says that the values that came back in those parameters should be converted to normal ruby return values. I think we should match whatever wxPython did. So I think by removing these typemaps, the code compiles and runs, but really doesn't do what it needs to do. Can you share the directorout you used to try to solve the problem, along with a description of why it didn't work. You should be able to use a directorout typemap to generate code that converts the values returned by the actual C++ wx method to exactly match the values returned by the new swig wrapper function. Hm. You might need a directorin too, I guess. I would need to look closer at the C++ code where the wrapper checks swigup and invokes the director. I may have time to look at this in a day or two. > Also when I have a patch ready do you want it for darcs or cvs? Either will work, but darcs patches are more fun for me, and sometimes are easier for me to apply. So darcs for now, if that's convenient for you. Thanks, Kevin From sean.m.long at gmail.com Wed Oct 12 11:15:16 2005 From: sean.m.long at gmail.com (Sean Long) Date: Wed, 12 Oct 2005 08:15:16 -0700 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: <434D1467.6080501@qualitycode.com> References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> <434C12BE.2000804@qualitycode.com> <434D1467.6080501@qualitycode.com> Message-ID: Here is a patch with only: %typemap(in,numinputs=0) (int * x , int * y , int * descent, int * externalLeading) (int a, int b, int c, int d and the other type map commented out Just having those commented out fix the crash with get_text_extent. I tried it on both Windows and Mac. these are the 3 typemaps I had in there that did not make any difference so they were removed. %typemap(directorout) wxString { $result = wxString(STR2CSTR($1), wxConvUTF8); } %typemap(directorout) wxString& { $result = new wxString(STR2CSTR($1), wxConvUTF8); } %typemap(directorout) const wxString& { $result = new wxString(STR2CSTR($1), wxConvUTF8); } Sean On 10/12/05, Kevin Smith wrote: > Sean Long wrote: > > Ok. I got it working by doing the following: > > > > - comment out the two typemaps in last message > > - add the following directorout typemaps (not sure if they are > > actually needed, I believe the two typemaps that I commented out were > > the problem) > > I suspect you are correct. Please test without these new wxString > directorout typemaps, and omit them from a patch if they are not needed. > > > Now the question is do we need the two type maps that I commented out? > > I did a quick search and could not find what they were for. > > >>%typemap(in,numinputs=0) (int * x , int * y , int * descent, int * > >>externalLeading) (int a, int b, int c, int d) { > >> $1=&a; > >> $2=&b; > >> $3=&c; > >> $4=&d; > >>} > >> > >>%typemap(argout) (int * x , int * y , int * descent, int * > externalLeading) { > >> $result = rb_ary_new(); > >> rb_ary_push($result, INT2NUM(*$1)); > >> rb_ary_push($result, INT2NUM(*$2)); > >> rb_ary_push($result, INT2NUM(*$3)); > >> rb_ary_push($result, INT2NUM(*$4)); > >>} > > We definitely need something like these. The first one says that calls > from Ruby can omit the x, y, descent and externalLeading parameters. > which matches C++ wx, where they are ignored as input values. The second > one says that the values that came back in those parameters should be > converted to normal ruby return values. I think we should match whatever > wxPython did. > > So I think by removing these typemaps, the code compiles and runs, but > really doesn't do what it needs to do. > > Can you share the directorout you used to try to solve the problem, > along with a description of why it didn't work. You should be able to > use a directorout typemap to generate code that converts the values > returned by the actual C++ wx method to exactly match the values > returned by the new swig wrapper function. Hm. You might need a > directorin too, I guess. I would need to look closer at the C++ code > where the wrapper checks swigup and invokes the director. > > I may have time to look at this in a day or two. > > > Also when I have a patch ready do you want it for darcs or cvs? > > Either will work, but darcs patches are more fun for me, and sometimes > are easier for me to apply. So darcs for now, if that's convenient for you. > > Thanks, > > Kevin > _______________________________________________ > 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: get_text_extent.darcs_patch Type: application/octet-stream Size: 826 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20051012/b4c18729/get_text_extent.obj From roys at mindspring.com Wed Oct 12 11:47:20 2005 From: roys at mindspring.com (Roy Sutton) Date: Wed, 12 Oct 2005 11:47:20 -0400 Subject: [Wxruby-users] Grid.GetTextExtent In-Reply-To: References: <43457C94.8020206@mindspring.com> <43499EFC.8080803@qualitycode.com> <434C081D.4000809@mindspring.com> <434C12BE.2000804@qualitycode.com> <434D1467.6080501@qualitycode.com> Message-ID: <434D3008.6050106@mindspring.com> True, they won't make any difference with that function. But they will be needed elsewhere. I hope to add 'em back in some time. Roy Sean Long wrote: > Here is a patch with only: > %typemap(in,numinputs=0) (int * x , int * y , int * descent, int * > externalLeading) (int a, int b, int c, int d > > and the other type map commented out > > Just having those commented out fix the crash with get_text_extent. I > tried it on both Windows and Mac. > > these are the 3 typemaps I had in there that did not make any > difference so they were removed. > > %typemap(directorout) wxString { > $result = wxString(STR2CSTR($1), wxConvUTF8); > } > > %typemap(directorout) wxString& { > $result = new wxString(STR2CSTR($1), wxConvUTF8); > } > > %typemap(directorout) const wxString& { > $result = new wxString(STR2CSTR($1), wxConvUTF8); > } > > Sean > > On 10/12/05, Kevin Smith wrote: > >> Sean Long wrote: >> >>> Ok. I got it working by doing the following: >>> >>> - comment out the two typemaps in last message >>> - add the following directorout typemaps (not sure if they are >>> actually needed, I believe the two typemaps that I commented out were >>> the problem) >>> >> I suspect you are correct. Please test without these new wxString >> directorout typemaps, and omit them from a patch if they are not needed. >> >> >>> Now the question is do we need the two type maps that I commented out? >>> I did a quick search and could not find what they were for. >>> >> >>%typemap(in,numinputs=0) (int * x , int * y , int * descent, int * >> >>externalLeading) (int a, int b, int c, int d) { >> >> $1=&a; >> >> $2=&b; >> >> $3=&c; >> >> $4=&d; >> >>} >> >> >> >>%typemap(argout) (int * x , int * y , int * descent, int * >> externalLeading) { >> >> $result = rb_ary_new(); >> >> rb_ary_push($result, INT2NUM(*$1)); >> >> rb_ary_push($result, INT2NUM(*$2)); >> >> rb_ary_push($result, INT2NUM(*$3)); >> >> rb_ary_push($result, INT2NUM(*$4)); >> >>} >> >> We definitely need something like these. The first one says that calls >> from Ruby can omit the x, y, descent and externalLeading parameters. >> which matches C++ wx, where they are ignored as input values. The second >> one says that the values that came back in those parameters should be >> converted to normal ruby return values. I think we should match whatever >> wxPython did. >> >> So I think by removing these typemaps, the code compiles and runs, but >> really doesn't do what it needs to do. >> >> Can you share the directorout you used to try to solve the problem, >> along with a description of why it didn't work. You should be able to >> use a directorout typemap to generate code that converts the values >> returned by the actual C++ wx method to exactly match the values >> returned by the new swig wrapper function. Hm. You might need a >> directorin too, I guess. I would need to look closer at the C++ code >> where the wrapper checks swigup and invokes the director. >> >> I may have time to look at this in a day or two. >> >> >>> Also when I have a patch ready do you want it for darcs or cvs? >>> >> Either will work, but darcs patches are more fun for me, and sometimes >> are easier for me to apply. So darcs for now, if that's convenient for you. >> >> Thanks, >> >> Kevin >> _______________________________________________ >> 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 joergbalsiger at yahoo.com Sat Oct 22 04:45:29 2005 From: joergbalsiger at yahoo.com (Joerg Balsiger) Date: Sat, 22 Oct 2005 01:45:29 -0700 (PDT) Subject: [Wxruby-users] wxruby.so error with weft-qda Message-ID: <20051022084529.88968.qmail@web51411.mail.yahoo.com> Dear wxruby users I've been trying to get wxruby-based weft-qda 0.9.6 running on a linux from scratch 6.1 system (this list had a discussion about weft-qda last year and alex fenton's also been trying to help me out - no luck so far). I get stuck with wxruby 0.60 (I think). I compiled wxruby against wxGTK 2.4.2 (without gtk2, without unicode - gtk+ version is 1.2.10) - after manually moving htmlproc.h and xml.h from the wxGTK make to the appropriate directories. I get the following error on running ruby weft-qda.rb: /usr/lib/ruby/1.8/i686-linux/wxruby.so: /usr/lib/ruby/1.8/i686-linux/wxruby.so: undefined symbol: _ZN12wxEvtHandler13sm_eventTableE - /usr/lib/ruby/1.8/i686-linux/wxruby.so (LoadError) from ./lib/weft/wxgui.rb:1 from weft-qda.rb:11:in `require' from weft-qda.rb:11 Would anybody have suggestions on how to proceed from here? Thanks, Joerg __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From wxruby at qualitycode.com Sun Oct 23 08:57:23 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Sun, 23 Oct 2005 08:57:23 -0400 Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <20051022084529.88968.qmail@web51411.mail.yahoo.com> References: <20051022084529.88968.qmail@web51411.mail.yahoo.com> Message-ID: <1130072244.8318.24.camel@localhost.localdomain> Greetings, Can you run the wxruby samples on this system? The error looks like the 'require "wxruby"' statement is failing, which might not have anything to do with weft. Could you try it with wxruby2? I personally haven't looked at wxruby 0.6.0 for months, and am putting all my attention toward wxruby2. Cheers, Kevin On Sat, 2005-10-22 at 01:45 -0700, Joerg Balsiger wrote: > Dear wxruby users > > I've been trying to get wxruby-based weft-qda 0.9.6 running on a linux from > scratch 6.1 system (this list had a discussion about weft-qda last year and > alex fenton's also been trying to help me out - no luck so far). > > I get stuck with wxruby 0.60 (I think). I compiled wxruby against wxGTK 2.4.2 > (without gtk2, without unicode - gtk+ version is 1.2.10) - after manually > moving htmlproc.h and xml.h from the wxGTK make to the appropriate directories. > > > I get the following error on running ruby weft-qda.rb: > > /usr/lib/ruby/1.8/i686-linux/wxruby.so: /usr/lib/ruby/1.8/i686-linux/wxruby.so: > undefined symbol: _ZN12wxEvtHandler13sm_eventTableE - > /usr/lib/ruby/1.8/i686-linux/wxruby.so (LoadError) > from ./lib/weft/wxgui.rb:1 > from weft-qda.rb:11:in `require' > from weft-qda.rb:11 > > Would anybody have suggestions on how to proceed from here? > > Thanks, > > Joerg > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users From alex at pressure.to Sun Oct 23 13:35:36 2005 From: alex at pressure.to (Alex Fenton) Date: Sun, 23 Oct 2005 18:35:36 +0100 Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <1130072244.8318.24.camel@localhost.localdomain> References: <20051022084529.88968.qmail@web51411.mail.yahoo.com> <1130072244.8318.24.camel@localhost.localdomain> Message-ID: <435BC9E8.9040505@pressure.to> Hi >Can you run the wxruby samples on this system? The error looks like the >'require "wxruby"' statement is failing, which might not have anything >to do with weft. > > Does sound like another general wxruby.so problem - Joerg previous ran into difficulty running wxruby-0.6.0 after compiling wx against gtk-2.6 . This error looks familiar - I have seen it before with wxr-0.6 on OS X, but can't remember what I did to fix it other than recompile - sorry. As a final shot, maybe try WxWidgets 2.6 - some minor tweaks are needed to get it work with 0.6.0 but I think I remember see a message on this list of someone (Jani?) who'd managed it. >Could you try it with wxruby2? I personally haven't looked at wxruby >0.6.0 for months, and am putting all my attention toward wxruby2. > > Unfortunately Weft won't work with wxruby2 at the moment (Wx::ConfigBase is missing). I am looking forward to moving to wxruby2 when there's a slightly more stable release to work against cheers alex >Cheers, > >Kevin > > >On Sat, 2005-10-22 at 01:45 -0700, Joerg Balsiger wrote: > > >>Dear wxruby users >> >>I've been trying to get wxruby-based weft-qda 0.9.6 running on a linux from >>scratch 6.1 system (this list had a discussion about weft-qda last year and >>alex fenton's also been trying to help me out - no luck so far). >> >>I get stuck with wxruby 0.60 (I think). I compiled wxruby against wxGTK 2.4.2 >>(without gtk2, without unicode - gtk+ version is 1.2.10) - after manually >>moving htmlproc.h and xml.h from the wxGTK make to the appropriate directories. >> >> >>I get the following error on running ruby weft-qda.rb: >> >>/usr/lib/ruby/1.8/i686-linux/wxruby.so: /usr/lib/ruby/1.8/i686-linux/wxruby.so: >>undefined symbol: _ZN12wxEvtHandler13sm_eventTableE - >>/usr/lib/ruby/1.8/i686-linux/wxruby.so (LoadError) >> from ./lib/weft/wxgui.rb:1 >> from weft-qda.rb:11:in `require' >> from weft-qda.rb:11 >> >>Would anybody have suggestions on how to proceed from here? >> >>Thanks, >> >>Joerg >> >> >> >>__________________________________ >>Yahoo! FareChase: Search multiple travel sites in one click. >>http://farechase.yahoo.com >>_______________________________________________ >>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 joergbalsiger at yahoo.com Mon Oct 24 03:55:08 2005 From: joergbalsiger at yahoo.com (Joerg Balsiger) Date: Mon, 24 Oct 2005 00:55:08 -0700 (PDT) Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <435BC9E8.9040505@pressure.to> Message-ID: <20051024075508.80335.qmail@web51408.mail.yahoo.com> > As a final shot, maybe try WxWidgets 2.6 - some minor tweaks are needed > to get it work with 0.6.0 but I think I remember see a message on this > list of someone (Jani?) who'd managed it. I might try that, though I'm not sure I'll figure out on my own what those "minor tweaks" would be. > >Could you try it with wxruby2? I personally haven't looked at wxruby > >0.6.0 for months, and am putting all my attention toward wxruby2. > > > Unfortunately Weft won't work with wxruby2 at the moment (Wx::ConfigBase > is missing). I am looking forward to moving to wxruby2 when there's a > slightly more stable release to work against I guess my best bet will be to give up on weft-qda on linux for now and use something like TAMS or a windows-based program. Thank you all for your help, though. Joerg __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From alex at pressure.to Mon Oct 24 05:02:15 2005 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Oct 2005 10:02:15 +0100 Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <20051024075508.80335.qmail@web51408.mail.yahoo.com> References: <20051024075508.80335.qmail@web51408.mail.yahoo.com> Message-ID: <435CA317.4050508@pressure.to> >I might try that, though I'm not sure I'll figure out on my own what those >"minor tweaks" would be. > > http://rubyforge.org/pipermail/wxruby-users/2005-April/001196.html But the submitter of this patch only confirms that it let him run minimal.rb, so it is a long shot. Alternately you could try a compiled wxruby for Linux w GTK1.x - drop me a line off-list if you want to try it for interest. >I guess my best bet will be to give up on weft-qda on linux for now and use >something like TAMS or a windows-based program. > > Sorry, yes, I think you're right - there's other problems with weft 0.9.6 specifically on Linux even if you got a working wxruby. If you use weft on Windows, you'll be able to use your files on a Linux version. >Thank you all for your help, though. > > No problem, and thanks for the error reports. a From wxruby at qualitycode.com Mon Oct 24 06:42:27 2005 From: wxruby at qualitycode.com (Kevin Smith) Date: Mon, 24 Oct 2005 06:42:27 -0400 Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <435BC9E8.9040505@pressure.to> References: <20051022084529.88968.qmail@web51411.mail.yahoo.com> <1130072244.8318.24.camel@localhost.localdomain> <435BC9E8.9040505@pressure.to> Message-ID: <1130150547.8182.0.camel@localhost.localdomain> On Sun, 2005-10-23 at 18:35 +0100, Alex Fenton wrote: > Unfortunately Weft won't work with wxruby2 at the moment (Wx::ConfigBase > is missing). I am looking forward to moving to wxruby2 when there's a > slightly more stable release to work against I vaguely remember a discussion of that, but can't find it in the archives. What was it about ConfigBase that made it difficult to support in wxruby2? Kevin From alex at pressure.to Mon Oct 24 06:54:59 2005 From: alex at pressure.to (Alex Fenton) Date: Mon, 24 Oct 2005 11:54:59 +0100 Subject: [Wxruby-users] wxruby.so error with weft-qda In-Reply-To: <1130150547.8182.0.camel@localhost.localdomain> References: <20051022084529.88968.qmail@web51411.mail.yahoo.com> <1130072244.8318.24.camel@localhost.localdomain> <435BC9E8.9040505@pressure.to> <1130150547.8182.0.camel@localhost.localdomain> Message-ID: <435CBD83.8050604@pressure.to> Kevin Smith wrote: >I vaguely remember a discussion of that, but can't find it in the >archives. What was it about ConfigBase that made it difficult to support >in wxruby2? > > Just for ref, it was figuring out how to SWIG in-out parameters by reference in C++ http://rubyforge.org/pipermail/wxruby-users/2005-July/001334.html cheers alex