[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Wxruby-dev] I want to help
From: |
Curt Hibbs |
Subject: |
RE: [Wxruby-dev] I want to help |
Date: |
Tue, 6 May 2003 00:39:49 -0700 |
Kevin Smith wrote:
>
> Greetings,
>
> I didn't realize that Park Heesob had recently created a working wxRuby,
> so last weekend I created my own prototype wxRuby bindings, which you
> can find here:
> http://qualitycode.com/code/wxRuby-Kevin-0.1.tar.gz
>
> My version includes a small sample based on the Calendar sample that
> comes with wxWindows. I have only tested it with Debian (Sarge), and
> have not made any attempts to make it easy to compile or run on other
> platforms. Don't run extconf.rb, because I have manually modified the
> Makefile!
Kevin, this is great! (I'll comment more below)
> I think Park Heesob's architecture is better than mine, although I'm not
> entirely sure yet. So I hope to work with his code, and not to create a
> fork or alternative set of bindings.
Park's version (which has only been tested on Windows) is basically a port
of wxPython to Ruby.
> However, the one really nice feature of my implementation is using a
> little Ruby script to automatically generate most of the stub functions
> and the rb_define_method calls. It is similar to SWIG, but much simpler
> because it is specifically targeted at Ruby and wxWindows.
>
> Any function that is a simple pass-through wrapper can be automated,
> which makes it easier to add new methods, avoids duplicated code, and
> avoids any potential of a typo causing an incorrect implementation.
> Also, with my approach we can exactly inherit the optional parameters
> that wxWindows uses.
>
> In my prototype, the Makefile runs wxpp.rb against WXRuby.t to generate
> WXRuby.cpp, which is then compiled normally. In WXRuby.t you can see the
> //$$ tokens used to generate the wrappers at specific points. test.rb is
> the sample calendar app.
I just took a look at your source files, and I like your approach. Its
simple, clean, and flexible.
> So I would like to incrementally shift the existing wxRuby project over
> to use a template-based approach like mine. Does this sound acceptable?
> I also have a few questions, requests and suggestions about naming and
> other conventions.
I think we can definitely work something out here.
What I want to do is to lay it all out for discussion in a separate ML
thread that I will post shortly. So stay tuned and we will get things
rolling in this new thread.
Curt