1. I'm dynamically making buttons:

     

     

     

     

    function MakeButton(player_name)

         button_name = player_name .. "_Button"

         button = CreateFrame("Button",button_name,...)

    end

    These buttons extend a template that has a FontString which named "$parentPlayerName", such that essential it becomes named player_namePlayerName.

    Assuming the player's named is "Dude" I could then set the text like so:

    Dude_ButtonPlayerName:SetText("whatever I want")

    However, without knowing what the player's name is going to be, how I can then access this text item?

     

     

     

     

     

     

     

  2. I'm dynamically making buttons:

    function MakeButton(player_name)
         button_name = player_name .. "_Button"
         button = CreateFrame("Button",button_name,...)
    end

    These buttons extend a template that has a FontString which named "$parentPlayerName", such that essential it becomes named player_namePlayerName.

    Assuming the player's named is "Dude" I could then set the text like so:

    Dude_ButtonPlayerName:SetText("whatever I want")

    However, without knowing what the player's name is going to be, how I can then access this text item?

  3. I'm dynamically making buttons:

    function MakeButton(player_name)
         button_name = player_name .. "_Button"
         button = CreateFrame("Button",button_name,...)
    end

    These buttons extend a template that has a FontString which named "$parentPlayerName", such that essential it becomes named player_namePlayerName.

    Assuming the player's named is "Dude" I could then set the text like so:

    Dude_ButtonPlayerName:SetText("whatever I want")

    However, without knowing what the player's name is going to be, how I can then access this text item?

    You can look it up dynamically using the name:

    _G[self:GetName() .. "PlayerName"]:SetText("FOO")

    Alternatively, you could set a parentKey attribute on the button (like parentKey="playerName").  Then you can access it directly by using self.playerName.

  4. I apologize - I'm running out the door and haven't tested either, but I'm curious: in my instance would

    self:GetName() be button:GetName()

     

     

  5. yes.