Originally Posted by Zax
Thanks
Keeping in mind what you said, I tried this:
But it doesn't work (my personal echo() function just displays a text in the chat box): the TEST message in well displayed but the guild frame is not shown. I suppose it is because this script is called on VARIABLES_LOADED event.
I was just trying to display guild frame when entering WoW in order to quickly see the connected guildmates.
|
Yes your guess is correct, VARIABLES_LOADED is too early.
Also LoadAddOn() is not good practice, it can break other LoD Blizzard addons, most notably the Calendar.
This might be better:
Lua Code:
local f = CreateFrame("Frame")
f:SetScript("OnEvent",
function(self,event,...)
if self[event] then
self[event](...)
end
end)
f:RegisterEvent("ADDON_LOADED")
function f.ADDON_LOADED(...)
local addon = ...
if addon == "Blizzard_GuildUI" then
ToggleGuildFrame()
end
end