View Single Post
05/19/14, 04:22 AM   #5
Loaf
Join Date: May 2014
Posts: 4
Hi, had same issue with my own dynamically created buttons. Found from Zgoo that "i" was not being appended to the name how it was supposed to from wiki, so buttons were all "DynamicButton". Found I had to do: (obviously without the "ZO_FriendsListList" bit!)
Code:
for i = 1, 10 do
    local dynamicControl = CreateControlFromVirtual("DynamicButton" .. i, ZO_FriendsListList, "DynamicButton", i)
end
(also the "i" at the end could be omitted, seemed to do nothing!)
Buttons were then created with no errors and with differing names as they were supposed to.

Also I found that "DynamicButton2:SetText("2")" didn't change the label I had on the button. Changing the XML; removing the label part fixed it.
Code:
<Button name="DynamicButton" virtual="true" text="Click">
</Button>
Hope any of that helps.
  Reply With Quote