View Single Post
04-08-13, 12:44 PM   #20
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Does your handler really need to be run outside of the frame triggering it by OnUpdate? If not, it may be easier to use a different syntax.

For example, this method of defining a function also works.
Code:
Func = function(args)
-- Do stuff
end


Using that method, you can dynamically create a function just for the frame's OnUpdate handler.
Code:
Frame:SetScript("OnUpdate",function(self,elapsed)
-- Do stuff
end);
__________________
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)
  Reply With Quote