From: John L. <jla...@gm...> - 2005-12-16 15:37:26
|
On 12/16/05, Gustl Berger <gu...@gm...> wrote: > >I'm a little stumped, did this code of yours ever work with wxLua in > >any version? > > > Yes, it worked with the version 26.254, which you can download from the > official site. > I tested the small test script I sent with it. This code is based directly on that with some modifictions of my own. The current code base is very restructured, but should be logically the same. I'll look into it. > >I'm not sure how to handle the failing lua_getmetatable > >in ttag for the coroutine since I thought that the new lua_State > >copied everything from the old one. > > > I don't know the internals of lua, maybe it does not support this yet. > I have found this site: > > http://lua-users.org/wiki/ResumableVmPatch > Maybe that's the problem? Probably not, the lua at SF is identical to the lua in 26.254 and if you say it works there then it should still work. > Do you really have to make a copy of the lua_State when creating a > coroutine? The problem is that lua itself "copies" the lua_State, maybe not literally, but in my testing of the program gpeddler I found that a new lua_State was created for coroutines and that you had to reassociate the lua_State with wxLua's variables. Regards, John Labenski |