Ok, I''ve found a minor problem that I was able to fix, but I''m not sure if this is the right way to handle it, being new to swig and all. Basically, in wxDC.h, there''s a function declaration: void GradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST); The problem is that since swig does not see the definition of the enum wxDirection (defined in RubyConstants.i), it treats it as an unknown class. Attempting to call the generated method from Ruby while specifying the nDirection argument then becomes impossible. My solution is simple, just %include RubyContstants.i. This works, but I''m not sure what the potential ramifications might be. Anyway, here''s the patch. -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: application/octet-stream Size: 360 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-development/attachments/20080304/b980ef76/attachment-0001.obj -------------- next part -------------- - David
David Whetstone wrote:> Basically, in wxDC.h, there''s a function declaration: > > void GradientFillLinear(const wxRect& rect, const wxColour& > initialColour, const wxColour& destColour, wxDirection nDirection = > wxEAST); > > The problem is that since swig does not see the definition of the enum > wxDirection (defined in RubyConstants.i), it treats it as an unknown > class.Thanks very much for the report and patch. I fixed this with SVN:1580, by adding ''enum wxDirection'' to swig/typedefs.i. This is a global file included (via common.i) in all swig files, so should fix the prob anywhere it occurs. After you update, you might need to touch swig/classes/DC.i cheers alex
Possibly Parallel Threads
- [922] branches/wxruby2/wxwidgets_282: Changes, additions and deprecations 2.6 -> 2.8 Wx API
- [900] branches/wxruby2/wxwidgets_282/swig/classes: Initial commit of AUI core classes
- MinGW build (static linking) problem
- Is wxRuby-SWIG version usable enough to package for download?
- [929] branches/wxruby2/wxwidgets_282/swig/classes: Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and