Quantcast WoWInterface - View Single Post - Frame iteration question
View Single Post
Unread 11-14-12, 04:23 PM   #2
A Pyroguard Emberseer
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,234
Function names are case sensitive so for starters you need
local frame = CreateFrame("Frame", "myframename", UIParent)
Secondly you can store your frames in a table for easy iteration but frames are tables themselves.
So you could just as well store the references to the children on the parent frame.

for i=1,5 do
  frame.children = frame.children or {}
  frame.children[i] = CreateFrame("Frame", "child"..i, frame) -- or your custom frame creation function

for _,child in ipairs(frame.children) do
  -- manipulate the child frame

Last edited by Dridzt : 11-14-12 at 04:30 PM.
Dridzt is offline   Reply With Quote