View Single Post
Old 11-14-12, 03:23 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,176
Function names are case sensitive so for starters you need
Code:
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.

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

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

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