View Single Post
07/04/14, 07:18 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
  1. It's GuiRoot, not Guiroot.
  2. I don't recall 100%, but you may need to use the OnUpdate on a frame, not just on a label.
  3. There was a bug back in beta that I don't think ever got fixed - your frame will not recognize an OnUpdate handler unless the frame was created via XML. (Try Sasky's method instead, or switch to XML - you're giving your frame a global name anyway.)

@Sasky: OnUpdate fires for every update of the UI (every frame draw).

@InfiniteShift: Because of the above, if you have 60 fps, your OnUpdate script will be run 60 times per second. You don't need your clock to be that precise. Use the second return from OnUpdate (or set a delay using the second arg of EVENT_MANAGER:RegisterForUpdate) to create a buffer.
  Reply With Quote