1. Thanks for the post! with that I was able to get my menus to populate. I now have a new question. For the initialize function how can you pass the frame name as a variable?

    UIDropDownMenuInitialize(Frame, DDMInitialize)

    If I try to use a variable in place of "Frame" it kicks an error.

    and/or how do you get the name of the button that is pushed on a dropdownmenu? self:GetName() returns DropDownMenu1Button4 or whatever was selected from the dropdown list. But I know the name of the dropdowns are DropDownMenu as I named them.

  2. You can't use name of frame as variable. You have to use function which return frame. for example

    VarButton = CreateFrame("Button","mybutton",UIParent,"UIPanelButtonTemplate")

    and now Variable is "VarBitton". And frame is called button. i can't find other functions whitch return "frame" :(

  3. You can't use name of frame as variable.

    Yes you can. What is probably happening here is that your code is running before the frame has been created. You don't have to use CreateFrame to use frames by name, I promise =)

  4. So how do I do it? My frame is being created via an .xml file so Im assuming that happens before .lua is run.

    this works fine: UIDropDownMenuInitialize(Frame, DDMInitialize)

    but I want this: tempVar = Frame UIDropDownMenuInitialize(tempVar, DDMInitialize)

    But of course, the second example kicks an error

  5. So how do I do it? My frame is being created via an .xml file so Im assuming that happens before .lua is run.

    Don't assume anything. The load order is pretty explicit depending on how and where things are included in your table of contents files.

    this works fine: UIDropDownMenuInitialize(Frame, DDMInitialize)

    but I want this: tempVar = Frame UIDropDownMenuInitialize(tempVar, DDMInitialize)

    But of course, the second example kicks an error

    Yeah that makes absolutely no sense, so you'll have to give a real actual example. What you've written is perfectly legal Lua and there's no way the language is restricting you here. Please post the actual code you are running.

  6. Yes you can. What is probably happening here is that your code is running before the frame has been created. You don't have to use CreateFrame to use frames by name, I promise =)

    Can you show me an example? Every time i am using name of frame as Variable my addon doesn't work

  7. Here's an example addon that shows how to use this.

  8. Here is a snippet of code with what Im trying to do

    `

    for columnCount = 2, 3 do
        for raidCount=1, NumRaidMembers do
            tempVar1 = "Column"..columnCount.."o"..raidCount
            tempVar2 = "BGPlanner_Initialize_Column"..columnCount.."o"..raidCount.."()"
            UIDropDownMenu_Initialize(tempVar1, tempVar2)
        end
    end`
    

    I get an error.. trying to index Frame a string value. My XML is load because the addon main frame and windows are all active on screen before clicking the button that runs this snippet