From: John L. <jla...@gm...> - 2006-01-04 17:11:26
|
> I start realizing that forwrad is not always needed. > In the next a2dCentralCanvasCommandProcessor needs to be there first, or > genwxbind.lua gives errors. > Interesting enough, a2dCommandLanguageWrapper is not knwo, but that is ok= e?? This is probably an oversight, I suppose that it will fail if you try to call a base class member function on an instance of a2dLuaWrapper. > %class %delete %noclassinfo a2dCentralCanvasCommandProcessor > a2dCentralCanvasCommandProcessor() > %endclass > > %class %delete %noclassinfo a2dLuaWrapper, a2dCommandLanguageWrapper > %define %pointer a2dLuaWP > a2dLuaWrapper( a2dCentralCanvasCommandProcessor* commandProcessor ) > > If i remove the %class .... a2dCentralCanvasCommandProcessor, i get the > following error. > > c:\data\art2d\a2dren9\modules\luawraps\src>genwxbind.bat > Generating wxWidgets Binding > loaded rules: luawraps.rules > Error: Expected Parameter '=3D', ')', or ',' got Tag=3D'*'. > (Name=3Da2dCentralCanvasCo > mmandProcessor; Undefined DataType) File: > C:/data/art2d/wxArt2D/modules/luawraps > /src/luawraps.i:(line 14) > > So i think i don't understand when something has to be know upfront or > when not? > And when something has to be knwo, how to make it know without > generating code for a complete class. > I just need pointer to it. genwxbind.lua tries to figure out if what's in the wrappers are data types or typos. You should always try to forward declare your data types. If you want a user to be able to create that class in lua you can just have a dummy class with no members, like your a2dCentralCanvasCommandProcessor, otherwise you can stick a line like this at the bottom of your "rules" file, but if you do I don't think that you can do anything with it in lua. dataTypes["wxCursor"] =3D AllocDataType("wxCursor", "class", false) Regards, John Labenski |