Wikia

WoWWiki

Talk:Using UIDropDownMenu

101,699pages on
this wiki

Back to page

info.func format Edit

Regarding the edit by IAmParadox made with the comment:

"I spent quite a while trying to get my dropdown to work correctly, and, if this page had the correct format for info.func, it would have taken much less time and hair pulling....)"

The format for info.func was not incorrect previously. Yes, you can define the function for info.func directly inside the table, but you can also have it point to another function by referring to it by name. Example:

 local function DoOption(arg)
   DEFAULT_CHAT_FRAME:AddMessage(arg);
 end
 
 local MyPopupMenu = {
   {
     text = "Option 1",
     func = DoOption,
     arg1 = "Option 1 clicked."
   },
   {
     text = "Option 2",
     func = function()  DEFAULT_CHAT_FRAME:AddMessage("Option 2 clicked.")  end;
   };
 };

Both ways give similar results. -- Tuhljin (talk) 23:49, 20 June 2008 (UTC)

How are you supposed to do Step 4, if you skipped Step two?

ToggleDropDownMenu(1, nil, MyDropDownMenu, MyDropDownMenuButton, 0, 0); requires MyDropDownMenu, which you only need if you do Step 2. I have done everything letter for letter to get a dropdown working and absolutely nothing shows up ingame.

Around Wikia's network

Random Wiki