View Single Post
02-09-17, 01:24 AM   #13
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,336
Originally Posted by Tuhljin View Post
... but this seemingly does:

Code:
C_Timer.After(0, function()
  C_Timer.After(3, function()
    ToastForEvents()
  end)
end)
The first call is basically telling C_Timer to run it when it can. After the game has loaded, it actually runs and the second one schedules the final function for 3 additional seconds from then. The first example would vary depending if it took 3 seconds or longer to finish loading and push out the first rendered frame.

Trying to support /reload is a niche case and you should just make sure your code doesn't throw any errors. Ideally, nobody should need to use it in a normal session. It only exists because sometimes mistakes happen. You shouldn't need to complicate your code more covering other addons' problems.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 02-09-17 at 01:30 AM.
  Reply With Quote