From 414c4f93225652fe62541cf6fe37873776670544 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Feb 2014 13:48:08 +0100 Subject: lua: make register_event() not overwrite previous event handler Instead, chain them. Note that there's no logic to prevent the other event handlers to be run from an event handler (like it's popular in GUI toolkits), because I think that's not very useful for this purpose. --- DOCS/man/en/lua.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/en/lua.rst b/DOCS/man/en/lua.rst index 02e7ca8ea9..54b05d9ea5 100644 --- a/DOCS/man/en/lua.rst +++ b/DOCS/man/en/lua.rst @@ -100,6 +100,10 @@ The ``mp`` module is preloaded, although it can be loaded manually with associated, the ``error`` field is set to a string describing the error, on success it's not set. + If multiple functions are registered for the same event, they are run in + registration order, which the first registered function running before all + the other ones. + Returns true if such an event exists, false otherwise. See `Events`_ and `List of events`_ for details. -- cgit v1.2.3