Originally Posted by ChaosInc
Additionally, if you are looking for a direct copy you can use
lua Code:
GMovableFrames = CopyTable(defaultTableList)
|
Okay so hmm if that is possible couldn't i just make the default table, have it respond to another saved variable that is entered the first time you load grimui so something like
if GrimUIPreviouslyLoaded = nil or false then
GMoveableFrames = { list of frames}
end
which should setup the default saved variable entrys, then have a statement that says...
moveableframes = CopyTable(GMoveableFrames)
this in theory would make it so it would only write those default frames to the saved vars the very first time the interface was loaded then it would copy the saved vars into the active table on each load. Then for the addframe function i just do somthing like
function addon:AddMoveableFrame(name, parent)
local nameandparent = name, parent
GMoveableFrames[name] = parent
tinsert(moveableframes, nameandparent)
HookFrame(name, parent)
end
for the add function. the add function would add it to the table for immediate use, and the saved variables for remembering the next time you log in, then the hookframe would activate it.
and yes i know my formatting of the name and parent part are wrong lol. this is theory right now
not actual code.