From: Gustl B. <gu...@gm...> - 2005-12-15 23:04:24
|
Hi > >Humm, do you have a smallish wxLua script that demonstrates the >problem? I think I know what the problem is, but I don't have any >coroutine code. We had to make a small modification to lua to stick >the wxLuaInterpreter into any new lua_States created by coroutines, >but I think I need to do the same for the wxLuaState. > It was not easy to reproduce the situation in a small app but here it is: frame = wx.wxFrame(wx.wxNull, -1, "App", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxDEFAULT_FRAME_STYLE); list = wx.wxListCtrl(frame, -1, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxLC_SINGLE_SEL + wx.wxLC_REPORT + wx.wxLC_AUTOARRANGE); -- works print(list:GetItemCount()); function func() -- crashes print(list:GetItemCount()); coroutine.yield(); print(3); end cr = coroutine.create(func); coroutine.resume(cr); print(2); coroutine.resume(cr); >I have added >this code already, could you try again in a couple hours (for SF to >sync it's cvs). > No sync yet, so I could not test the changes. Houdini |