lua-users home
lua-l archive

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


Jose Marin wrote:
> --- lua@zevv.nl escreveu:
> > <jose_marin2@yahoo.com.br> wrote  :
> > > By design, all the functions used as event handlers
> > > must be global and named.
> > 
> > By what design, could you please elaborate on that ?
> > This is not
> > something the language dictates, is it ?
> > 
> I'm sorry for the confusion!
> 
> By design of my engine!
> 
> Lua is flexible enought to not dictate things like that.

If you already impose the limitation of your second solution, its
probably the solution to your problem since it's easier to implement.
Also keep in mind that with the string parameter solution, redefining
the global will change the callback as a side effect, which is not the
case if you pass the function itself as argument.