lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

You can use luacom.StartMessageLoop to start a Windows message loop. To 
this function, you can pass a function and a list of arguments, and this 
function will be called in each iteration of the loop:

luacom.StartMessageLoop(mycode, arg1, arg2)

You can look at how this function is implemented to implement the same 
thing with coroutines (so you would call yield whtn you want another 
iteration of the message loop, instead of returning). LuaCOM had to work 
with Lua 4.0, also, so it does not use coroutines.

--
Fabio Mascarenhas

On Wed, Apr 26, 2006 at 04:15:41PM +0100, Paul Hudson wrote:
>    I'm using Lua50 (LuaBinaries distribution) and LuaCOM.  I am not a COM
>    expert L
>    I would like to know how to handle events that are being raised
>    asynchronously. I think I need a message loop of some sort, but I'm not
>    clear (after reading the documentation) on how to do this.
>    P.
> 
> 

Attachment: signature.asc
Description: Digital signature