View Single Post
06-30-12, 10:20 AM   #1
sigEleven
A Murloc Raider
Join Date: Jun 2012
Posts: 7
Unhappy Trouble initializing UIDropDownMenu from XML

Hey All, hoping someone can lend me a hand here.

I've been trying to wrap my head around drop down menus for a while now, and it's surprisingly difficult. After following multiple examples and tutorials that don't work, I've hacked together some operable code to get my drop downs working.

However, I'd like to create the dropdowns in XML, and not clutter up my LUA code with it. The problem I'm noticing right now is that I cannot initialize the dropdowns correctly in XML.

This does not work correctly (I end up with a blank drop down box that says "Custom" with no options):

Code:
<Button name="BName" parent="Parent_Frame" inherits="UIDropDownMenuTemplate"> 
   <Scripts>
      <OnLoad>  UIDropDownMenu_Initialize(BName, BName_initialize)</OnLoad>
    </Scripts>
</Button>

However, this works fine in LUA, when placed in the drop down's parent frame onload function.
Lua Code:
  1. UIDropDownMenu_Initialize(BName, BName_initialize)

Hopefully I'm just missing something simple, anybody have any idea what's up?

Last edited by sigEleven : 06-30-12 at 10:46 AM.
  Reply With Quote