View Single Post
07/19/22, 02:47 AM   #3
shadowcep
 
shadowcep's Avatar
Join Date: Jul 2020
Posts: 1
Was just preparing this reply, then Baertram replied.

@Masteroshi430 it's interesting that you say zo_callLater works but EVENT_MANAGER:RegisterForUpdate doesn't: in the esoui-8.0.8 source code, file libraries\globals\globalapi.lua shows zo_callLater is implemented using EVENT_MANAGER:RegisterForUpdate.
Lua Code:
  1. function zo_callLater(func, ms)
  2.     local id = ZO_CallLaterId
  3.     local name = "CallLaterFunction"..id
  4.     ZO_CallLaterId = ZO_CallLaterId + 1
  5.  
  6.     EVENT_MANAGER:RegisterForUpdate(name, ms,
  7.         function()
  8.             EVENT_MANAGER:UnregisterForUpdate(name)
  9.             func(id)
  10.         end)
  11.     return id
  12. end
  Reply With Quote