On Sun, May 17, 2009 at 2:47 PM, TOUPIN Youen <youen.tou...@wanadoo.fr>wrote:

> It seems the problem comes from the Connect function call, which uses
> the current lua state to register the event callback. When the callback
> is called, it is from that lua state, which, in my case, is the
> coroutine, not the main lua thread. Is there any reason for this
> behavior ? Wouldn't it be better to get the main lua thread (I think it
> can be retrieved from the coroutine) when the Connect function is
> called, and use it instead of the coroutine ?
>
>
I don't think your example makes sense. You create a coroutine that creates
a wxDialog then yield it and try to resume it from the yielded coroutine.
Shouldn't the wxDialog be created in the main thread which can control the
coroutine as appropriate?

Regards,
    John
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to