Connecting a lua state to another one -
i using lua extend c++ application. application have parts(ex: timer event
, ui events
) can extended lua, each part, make new state , load files , functions related part in it, making change part , reloading wont affect other parts.
now in situation need general files shared among other parts.
like example : making function timer events part, , there object defined in general files want change info in function. in ui event part , need when access object in general file want contain changes made ui part.
so thought creating state , make __index global table in other state search state if don't find stuff in it:)) apparently don't know how make that.
i hope mean , tell me how make that?!
lua states created lua_newstate
or lua_newstate
separated , cannot directly talk each other: need copy data manually 1 state other.
you can set __index metamethod global table in 1 state data in other one, you'll have in c or export function lua that.
Comments
Post a Comment