[wxruby-users] can't subclass AuiDockArt

Alex Fenton alex at pressure.to
Tue Nov 11 04:55:56 EST 2008


Hi Pascal

Pascal Hurni wrote:
> I'm using wxRuby with the Aui classes. Everything is fine (Manager,
> ToolBars, Panes, ...) and now i want to override the default drawing for
> the manager.
>
> Thus I want to use #set_art_provider to give my implementation. When
> doing that I receive a SWIG exceptions:
>
> Expected argument 1 of type wxAuiDockArt *, but got DockArtProvider
> #<DockArtProvider:0x3682e5c>
>         in SWIG method 'SetArtProvider'
>
> The DockArtProvider class (ruby class) inherits from AuiDockArt like so:
>   class DockArtProvider < Wx::AuiDockArt
>     ...
>   end
>
> Is something wrong on my side or on SWIG's one?
>   

Hehe. It was a long time ago that I added the AUI classes, and in those 
days I wasn't very good at classes with virtual methods called from C++ 
into Ruby. And I thought "who would ever bother to define their own 
DockArt drawing in wxRuby?".

It's really nice to hear about people pushing the library and wanting to 
use these advanced features. If you could file a bug please, and attach 
a minimal sample with an AuiManager and AuiDockArt subclass with the 
needed methods defined, I'm happy to have a go at fixing it.

By the way, I think I took the same attitude to AuiTabArt, so if you 
would define your own AuiNoteBook drawing methods, please file that as a 
separate bug.

alex



More information about the wxruby-users mailing list