Re: [pygccxml-development] help with constructor default argument error
Brought to you by:
mbaas,
roman_yakovenko
From: Kevin W. <kev...@gm...> - 2008-02-26 16:00:14
|
> mb = module_builder_t( ... ) > #find wxWindow constructor with 6 arguments of any type > wxWindow = mb.constructor( 'wxWindow', arg_types=[None]*6 ) > wxWindow.arguments[-1].default_value = 'wxString( wxPanelNameStr )' > > This should be enough. Thanks for this! It was exactly what I was looking for. And since wxWidgets follows a very clear convention with all of these globals that were causing problems, I took care of all them at once with a clever declaration matcher. > I also will check whether Py++ can generate better code in this use-case. I couldn't find enough documentation on bp::arg to know whether this was an odd case, or if it has trouble with coercing types with implicit constructors of any kind--but I'd imagine there's a general solution lurking about somewhere. Thanks again. |