View Single Post
11-16-12, 02:53 AM   #15
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Elderin View Post
I assume all references to OnLoad should be replaced with OnUpdate.
No. Those are separate scripts, with totally different purposes. The OnLoad script is only called once, after all of the frame's XML is read. The OnUpdate script is called every time a new video frame is drawn, so potentially 100+ times every second.

It's also worth mentioning that OnLoad scripts are unnecessary in Lua, and in fact aren't even supported in Lua; you just declare the frame and then do stuff with it immediately.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote