lua-users home
lua-l archive

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

On Wed, Dec 30, 2009 at 10:03 PM, Matthew Wild <> wrote:
2009/12/30 Tiago Katcipis <>:

> Well I'm experienced with this other systems but i do not master them :-), i
> don't know if i will have a good idea of how to implement it on Lua, that's
> exactly why I'm trying to get some help from you guys.

I'm not sure 100% exactly what you're aiming for, but in Prosody we
wrote a small events library. It allows adding handlers to, and
triggering events identified by strings. It also allows you to add a
"priority" to the handlers, to loosely define the order they get
called in. Returning any value other than nil from a handler will halt
the processing of the event and return that value to the code that
fired the event.

The code is at
with documentation at .

Also take a look at for an
alternative (but similar) implementation.

Thanks Matthew, i think this will help a lot, i will read it carefully and soon i give some feedback here.


Best regards,

"Se você se perder na selva africana, não precisa se desesperar. Basta sentar em uma pedra e começar a instalar GNU/Linux em seu laptop. Em menos de 5 minutos aparecerá alguém pra discordar de sua escolha de distribuição, do particionamento, do gerenciador de janelas, do ambiente de desktop, do editor de textos..."