User Tools

Site Tools


Q. I need to update on_replace triggers on my module load.

How do I do it the right way? (2016)

A. on_replace takes two keys: new one and old one. If the old one is nil, it's a new trigger. If the new one is nil, it's deletion. If both keys are present, it's an update.

A function in Lua is a first-class object, so it works well as a key.


Enter your comment. Wiki syntax is allowed:
C W R X H · Last modified: 2018/06/04 16:47 by eabates

Real Time Web Analytics