On 7/26/06, Steve Kieu <ha...@ya...> wrote:
> In C++ code I create two separated wxLuaState and I
> want them to have the same global variables (which
> means from both luas script run by each state I can
> access one same global variables.
>
> Is it possible and if yes how? Thanks you very much.
I don't think this is possible. How would you keep the two states
updated with the each other's global vars? You could try to push your
own C function and catch the __newindex (IIRC) and the other metatable
functions for the global table _G and explicitly copy the values
between the two states.
Good luck,
John Labenski
|