Originally Posted by Fizzlemizz
Code:
List of button attributes
info.owner = [Frame] -- Dropdown frame that "owns" the current dropdownlist
In the following you would want to pass the button, not the buttons owner (self instead of self.owner).
Code:
function SLFG_DungeonMenuClick(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value)
|
This is what is already being done in the actual code AFAIK:
Lua Code:
dm = CreateFrame("FRAME", "SLFG_DungeonMenu", panel, "UIDropDownMenuTemplate")
UIDropDownMenu_Initialize(dm, SLFG_DungeonMenu_Init) -- passing dm
function SLFG_DungeonMenu_Init(self) -- self = dm
local info = UIDropDownMenu_CreateInfo()
info.owner = self -- info.owner = dm
end
end
When I edit it to
Lua Code:
UIDropDownMenu_SetSelectedValue(self, self.value)
it errors out.
Like I said, the actual functionality works 100% error free, it's just the list automatically checking themselves.