[Wxruby-users] Patch for wxRuby2
wxruby at qualitycode.com
Thu Jul 28 01:27:18 EDT 2005
Sean Long wrote:
> Ok so I made a lot of changes and the controls sample works pretty good now.
I am quickly learning why Linus and other project maintainers ask folks
to send small, self-contained patches, rather than large, monolithic
ones like this.
For anyone submitting patches, please try to create individual patches
for each unit of work. That way, I can more easily review each one, and
if I have questions about one of them, I can still apply the rest
easily. Also, I can process a couple at a time when I have a spare
moment, instead of doing a marathon session of getting it all to work at
> What I changed or added:
> - Got all my modifications meshed into wxRuby2.
Good to hear.
> - Added constructors to wxIcon.h
I had to comment out one of them in the .h file. For some reason all the
%ignore lines in the .i file are being ignored by SWIG.
> - Changed Xrc.i to XmlResource.i and changed wxXrc to wxXmlResource
> within the file.
I think that's probably a good change, but I would like to have seen it
as two separate patches (one to create XmlResource.i, and a second to
move the existing xrcid function into it and get rid of Xrc.i.
However, do we need custom code for xrcid any more? Won't it
automatically be exposed by SWIG as XmlResource.get_xrcid and isn't that
I haven't merged this one in yet.
> I also had to change Xrc to XmlResource in rakewx.rb.
If XmlResource is in swig/classes/ (which is where it belongs) then Xrc
should have been removed entirely from rakewx.rb.
> - For backwards compatability with wxRuby 0.6 I added the subclass methods to
> - Changed line 5 of wx.i from wxruby2 to wx, could not get wxruby2 to
> work. I also
> changed line 13 in fixmodule.rb to mWx and line 11 in
> fixmainmodule.rb to mWx from mWxruby2.
> Also changed mWx in functions.i and XmlResource.i
Let's figure this one out. I really want the module to be wxruby2, not
wx, so I didn't apply your changes. Perhaps you just needed to do 'rake
clean_src' to clear out all the old files that still referred to wx?
> - Added the xrc example program (again)
Ok. I guess I dropped it on the floor somewhere. Sorry.
> - Added typemap to finally get wxItemKind working correctly, gets rid
> of my fixedswigcode.rb hack.
Cool. One of these days I need to really understand all the different
kinds of typemaps. They are VERY powerful, but also very cryptic.
> - Added the wxMenuItem class.
Ok. I had to %ignore a few items.
> - Added a type check for wxDateTime so CalendarCtrl now works properly
> with ruby class DateTime.
Hm. At one point I had decided not to support wxDateTime at all, because
I felt that folks should be using Ruby's DateTime class instead. Is
there a compelling reason to keep wxDateTime?
> - Changed $DEBUG in extconf.rb to $DEBUG_BUILD, for some reason it was
> clashing with mkmf on Windows.
Ok, but I didn't see this in the patch you sent.
> - Added wxBeginBusyCursor and wxEndBusyCursor to functions.i
Ok, but the ruby way is to pass a block to BusyCursor.busy:
So the cursor is automatically cleaned up. I changed the controls sample
to do it this way. Unfortunately, I can't test that sample on my Linux
box because we don't yet support the Notebook class on Linux.
> - Added wxToolTip class.
Ok. I had to ignore one method.
> - Many missing methods for existing classes.
I had to %ignore a few.
> - Slight tweaks to the sample programs.
The only sample I saw changed was controls.rb. I changed the busy cursor
part (see above). The other two changes looked confusing. You commented
out one parameter, and you commented out a call to event.enable. Please
explain why you made those changes.
> I also made this patch so Kevin can use this patch command:
> patch -p1 <diff.list
> in the directory above wxruby2
More information about the wxruby-users