> Hi! I am implementing a GUI system and I would like to
> handle the
> widgets events in Lua.
>
> I would like to do something like:
>
> [C++]
> Button* b;
> b->setOnClickEvent("myClick");
>
> [LUA]
> function myClick( w )
> w.Text = "clicked"
> end
>
Hello Juan,
Its currently not so easy to write callback in Lua within SWIG.
You can look at SWIG/Examples/lua/funcptr3 which shows how pass Lua functions to C.
You can also look at SWIG/Lib/lua/lua_fnptr.i which is the code to use it.
Let me know if you have any other questions.
Regards,
Mark
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user