View Single Post
07-12-09, 09:44 PM   #2
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Yes.

The solution to that is to create an event handler for "VARIABLES_LOADED" (or similar event), and run the code then.

Code:
local f = CreateFrame("frame")

function f.event()
   --your code here
end

f:SetScript("OnEvent", f.event)
f:RegisterEvent("VARIABLES_LOADED")