lua-users home
lua-l archive

Re: lua_settagmethod

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


> Rather than changing the LUA code I'd like to change _ALERT to map to
> my function instead. [...]
That is exactly what you have to do. There are no tags involved; just change
the value of _ALERT to be your function:
 lua_pushcfunction(myFunction);
 lua_setglobal("_ALERT");
(Remember that all function names are in fact regular global variables that
happen to contain function values.)
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /