wxruby-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wxruby-dev] SWIG Question


From: Curt Hibbs
Subject: [Wxruby-dev] SWIG Question
Date: Wed, 11 Sep 2002 16:52:29 -0700

Lyle,

I don't know how closely you've followed the FreeRIDE ML, but we decided to
take two of the FreeRIDE developers (myself and Bob Calco) temporarily off
of FreeRIDE to develop e Ruby binding for wxWindows. We wish we didn't to
have to this, but we really need the I18N support. If you are interested in
following the project you can join the wxRuby developer's ML
(www.wxruby.org).

Anyway, we are preparing to use SWIG to wrap the wxWindows library, and I
have a fundamental question that I wanted to ask before possibly going down
the wrong path.

I looked at what the Python people did with SWIG to produce wxPython, and I
looked at what you did to produce FXRuby, and this have left me with a
nagging question: is it really necessary to duplicate the all of the
underlying library's constants and such in the interface files when SWIG is
supposed to be able to process C/C++ header files and figure that stuff out
itself?

Duplicating the header file definitions in the interface files seems like a
potential maintenance headache. Every time the underlying library changes,
you'd have to do a diff to see what changed and then manually make those
changes in the interface files.

My ideal would be to not have to create any interface files at all. Instead,
I would like to have SWIG process the library's header files to create a
"raw" ruby binding to the library. And then, on top of that, create a layer
of Ruby code that presents a more Rubyesque api to the outside world.

But the fact that both wxPython and FXRuby have created extensive interface
files tells me that I must be missing something -- that there is something
important that I don't know.

So, my question is: is there some reason why the approach I outlined above
won't work?

Thanks in advance,
Curt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]