Originally Posted by Baertram
Is the addon loaded? Did you test with d("debug message") in your addon loaded function to see how far the addon gets?
Are the variables optionData and panel data inside any function or (only local defined in this function then) or directly in the addon file (thus global locals within your addon and known to the function onAddonLoaded this way)?
|
I am not sure if the addon is loading, how do I do the debug message to test it?
Originally Posted by votan
Next question: Where do you define WM?
Code:
local function AddOnLoaded(eventID,addonName)
if addonName == "ExpandedOptions" then
EVENT_MANAGER:UnregisterForEvent("ExpandedOptions_Start",eventID)
LAM2:RegisterAddonPanel("ExpandedOptionsOptions", panelData)
LAM2:RegisterOptionControls("ExpandedOptionsOptions", optionsData)
setupSavedVars()
ExpandedOptionsWindow = WM:CreateTopLevelWindow("ExpandedOptions")
ExpandedOptionsWindow:SetAnchorFill(GuiRoot)
ExpandedOptionsWindow:SetDrawLayer(DL_BACKGROUND)
ExpandedOptionsWindow:SetMouseEnabled(false)
SLASH_COMMANDS["/eopt"] = function()
if ExpandedOptionsWindow:IsHidden() then
ExpandedOptionsWindow:SetHidden(false)
else
ExpandedOptionsWindow:SetHidden(true)
end
end
createGrid()
hideGrid()
end
end
|
I am not...sure. Ugh maybe I bit off more than I can chew with creating an addon. I should probably have tried to create a settings with LAM from scratch instead of pulling it from another, but dang its hard to find guides for that