Hello dear swig devs and users,

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 Groenewoud



Mobile: +49 (0)15222354437

Xing Profile


New Windows 7: Find the right PC for you. Learn more.