View Single Post
11-14-12, 04:23 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
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 04:30 PM.
  Reply With Quote