From: John L. <jla...@gm...> - 2012-09-19 02:25:54
|
On Tue, Sep 18, 2012 at 12:27 PM, Victor Bombi <so...@te...> wrote: > >> Is there any difference between luaBitOp and the one wxLua provides? > > The main reason I am using it is because I need it in secondary > lanes.(requiring wx for that would be > too much, besides it cant be done) I plan to switch to the Lua 5.2 bitlib, so it will be in the table bit32 to smooth the 5.2 transition. Something along these lines: http://smbolton.com/lua/lbitlib-5.2.0-alpha-backport1.c >> On the other hand, if you want to use wxWidgets structures like a >> wxImage, wxRect, etc, then consider that calling require("wx") takes a >> fair amount of time itself and it may not be worth creating the >> thread. Perhaps you can extract the work that needs to be done in >> pure-Lua structures. > > I am not sure about what you mean. If you mean sending by lindas some kind > of description for the > work to be done by the wx lane and receiving the answer by lindas also, That > is what I am already > doing for creating windows from other lanes or using wxDir. Perhaps it doesn't make sense for what you are doing, but I was suggesting doing the calculations or whatever long task you need to do in the thread in pure Lua so you wouldn't even need wxLua. ----------------------------- In terms of not loading wxLua twice, there is not very much difference between the 2.8.10 and 2.8.12 version. 2.8.12 http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/luamodule/luamodule.cpp?revision=136&view=markup 2.8.10 http://wxlua.cvs.sourceforge.net/viewvc/wxlua/wxLua/modules/luamodule/src/luamodule.cpp?revision=1.10&view=markup In fact, in terms of calling require("wx") the only difference I think matters is the call to wxSetInstance(hDll); Can you change it to this and see if you can load it multiple times as you used to? 161 #ifdef __WXMSW__ 162 // wxEntryStart() calls DoCommonPreInit() which calls 163 // wxSetInstance(::GetModuleHandle(NULL)); if wxGetInstance() is NULL. if (hDll == NULL) wxSetInstance(hDll); 165 #endif // __WXMSW__ Regards, John |