View Single Post
03/02/20, 03:25 AM   #1
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 88
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:
  1. function foo.EnterCombat()
  2.   zo_callLater(function() d("you take too long") end, 5000)
  3. end
  4.  
  5. function foo.LeaveCombat()
  6.   -- terminate the zo_callLater
  7. end

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
  Reply With Quote