Pass a reference to the object with DropDownMenuItem_OnClick. Example:
Code:
f = CreateFrame("MyNewFrame")
DropDownMenuItem_OnClick(f)
Then add a parmeter to the function and use it within the function:
Code:
function DropDownMenuItem_OnClick(self)
UIDropDownMenu_SetSelectedValue(self.owner, self.value);
PlaySound("igMainMenuOptionCheckBoxOn");
if (self.value == 0) then
--We clicked the first menu item. Enter code here to affect the rest of your mod.
elseif (this.value == 1) then
--We clicked the second menu item. Enter code here to affect the rest of your mod.
end
end
[Edit]
LUA isn't OOP.