1 Apr 2010 01:36
Lua C++ Swig Polymorphism
Antoon Groenewoud <mail <at> antoon-groenewoud.com>
2010-03-31 23:36:01 GMT
2010-03-31 23:36:01 GMT
Hello dear swig devs and users,
New Windows 7: Find the right PC for you. Learn more.
I don't wish to bother you, but would you please look at my issue:
In C++:
//Smart pointers:
typedef fxHandle <struct fxGuiElement> fxGuiElementH;
typedef fxHandle <struct fxGuiStaticText> fxGuiStaticTextH;
//The factory:
fxGuiElementH fxGUI::CreateElement(fxGuiElementType type, fxGuiElementH parent = fxGuiElementH());
In Lua:
statictext = ec.gui:CreateElement(example.GUI_STATIC_TEXT)
It works fine. Except "statictext" in lua is actually seen as an fxGuiElement smartpointer, and I am unable to use the fxGuiStaticText functionality.
I've checked the manual and the mailing list archives, but I'm unable to find any solution. Supposedly it is easy to fix, but it is unclear to me. Or is polymorphism or some kind of workaround out of the question in this scenario?
Many thanks and have a nice day,
Antoon
---------------------------------------------------------------
Antoon Groenewoud
mail <at> antoon-groenewoud.com
Mobile: +49 (0)15222354437
---------------------------------------------------------------
New Windows 7: Find the right PC for you. Learn more.
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Swig-user mailing list Swig-user <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swig-user
RSS Feed