On Fri, Jun 29, 2012 at 3:14 AM, Paul K <paulclin...@yahoo.com> wrote: > Hi John, > > One more update. I didn't mention how I got the app running, which is > the best configuration I can get so far. I deployed wx.dll and > wxlua_lua_shared-wx28mswu-2.8.12.dll as well as lua_shared.exe > (renamed as lua.exe) and kept my *current lua5.1.dll* file. This way I > could get the app started even though it still crashes in several > places (but at least the luasocket library is working).
This won't work... see my previous message. There's all sorts of problems loading different dlls that are really the same and trying to share the objects between them. > I'm also getting strange errors where I had none before; for example, > > Expected an 'unsigned integer' for parameter 1, but got a 'number'. > Function called: 'wxMilliSleep(number)' > 01. wxMilliSleep(integer) > > Is it possible that there is something wrong with the binding as > "unsigned integer" should be easily mappable to "number"? No, this is now "normal." C++ is typed while Lua is not. This means that C++ can have overloaded functions like DoStuff(int i) and DoStuff(double i) that may actually do quite different stuff and depending on the input type, C++ will call the appropriate one. In order to get all the functionality of wxWidgets we have to duplicate how C++ works to be able to discriminate between overloaded functions to call the right one. Believe it or not, this is a good thing. Someday it may be possible to relax the conditions, but only for certain hand-picked functions. However, the reality is that I don't have the time to write docs for each exception so it's best to stick to the wxWidgets documentation since it's free and it's right. > wxLua: Creating a callback function in a coroutine is not allowed > since it will only be called when the thread is either suspended or > dead. > stack traceback: > [C]: in function 'Connect' > > This is probably in reference to this normally looking code (it's not > using any coroutines): > > frame:Connect(wx.wxEVT_CLOSE_WINDOW, > function(event) > if inloop then event:Skip() frame = nil else os.exit() end > end) I don't understand this. The logic to trigger this error is very simple, when wxLua starts it saves a pointer to the lua_State* in the Lua registry. When an event callback is created the given lua_State* is compared with the original lua_State* in the registry and if they don't match you must be in a coroutine which means that Lua will give you an error about running code in a "suspended or dead coroutine" so instead of that rather cryptic message given later I error out earlier. I bet this is from using two different lua51.dlls. > In addition to that, I'm getting an appcrash when I close the app > (inside ntdll.dll), but this is likely because I'm using your lua.exe > with my dll from a previous version. For some reason using my current > lua.exe crashes the app with an error in > wxlua_lua_shared-wx28mswu-2.8.12.dll (which I reported earlier). Two different dlls... Regards, John ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users