There's no reason I can think of why this shouldn't work, even if it does seem a little odd.
Good luck, John Labenski On 8/3/06, Steve Kieu <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I am thinking a solution but not yet implemented to > test it. I use wxApp to hold the data. So in MyApp > class I add two methods: > > void SetGlobalObj(wxLuaState* ); > void GetGlobalObj(wxLuaState* ); > > In SetGlobal I will get the lua table or light user > data (it could be a table / or lightuserdata from a > lua state.) Then set a member of MyAPP (which could be > an r array or pointer) to hold the references. In > GetGlobalObj I will push these pointer into a global > lua table so in lua code (another lua state) I will > get the references. After that I will dynamiccast to > the wx class type and use it. > > So in second lua state call wxGetApp() and cast it to > MyApp() then call GetGlobalObj(**) > > The purpose for now in my app is to use an already > contructed wxSocket and pass it to the new thread that > use different lua state. But if the above is correct > then I can see some other usage as well. > > Any comment on it or I am just crazy :-) > > Cheers, > > > S.KIEU > > Send instant messages to your online friends http://au.messenger.yahoo.com > > > ---------- Forwarded message ---------- > From: Steve Kieu <[EMAIL PROTECTED]> > To: wxlua-users@lists.sourceforge.net > Date: Thu, 27 Jul 2006 13:05:20 +1000 (EST) > Subject: Multiple wxLuaState share global howto? > > Hi everyone, > > 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. > > Kind regards, > > > > S.KIEU > > Send instant messages to your online friends http://au.messenger.yahoo.com > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wxlua-users mailing list > Wxlua-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wxlua-users mailing list Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users