Terminate callLater
Hello,
i was wondering if there is a way to terminate the zo_callLater function, before it executes? Here a minimalistic example of what i mean. Lua Code:
Besides the option to terminate the callLater i would also need a way to identify the specifiy callLater, maybe by some form of id or such. Is it even possible to implement something like this with the currently availiable tools? (I am aware that in certain situations a workaround can be achieved with "RegisterForUpdate" and "UnregisterForUpdate") Thanks in advance |
You can! All you need to do is call UnregisterForUpdate for the name the callLater is registered with. It will return an id when you call it, so you can unregister it like this:
Lua Code:
|
Background information:
zo_callLater is nothing else than an EVENT_MANAGER:RegisterForUpdate with a pre-defined identifier prefix "CallLaterFunction" and an attached suffix which is not pre-defined. https://github.com/esoui/esoui/blob/...alapi.lua#L197 And either zo_callLater or EVENET_MANAGER:RegisterForUpdate both return the unique ID of the registered handler so you can use this one to unregister it again via EVENT_MANAGER:UnregisterForUpdate |
Thank you both for the quick and precise answers.
It was exactly what i was locking for and now i also now what zo_callLater really does. |
All times are GMT -6. The time now is 08:22 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI