On Jan 10, 2008 5:29 AM, Frode Aarstad <[EMAIL PROTECTED]> wrote:
>
> Now after the wxLuaState is created we would like to add additional bindings
> to the current lua state (we only have one state for now)  but we are unable
> to find any straight forward way of doing this. We fear that recreating the
> wxLuaState or un-regestring / re-regestring the bindings we could possibly
> invalidate the lua states and cause problems.
>
> Have any of you been successful in doing this kind of 'late binding' or have
> any pointers as to what we should try out ?

This is not currently supported, but it could be. The wxLua types are
integer numbers corresponding to a class or a struct and their values
are generated at runtime since there are so many #ifdef conditions.
Each type corresponds to a wxLuaBindClass and metatable for the
userdata.

I have often thought of initializing their values before use by wxLua
instead of using the luaL_ref(), see wxluaT_newmetatable() in the CVS
version. This would allow holes in the types and they would be fixed
for the build. I will try to remember to do this and then add a
function, RegisterBinding(wxLuaBinding*) to allow you to add one at a
time.

Regards,
    John

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to