View Single Post
11-02-10, 11:02 AM   #21
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Originally Posted by Duugu View Post
Oke ... I would say the point is this part:

Code:
for name, parent in pairs(moveableframes) do
			if HookFrame(name, parent) then
				moveableframes[name] = nil
			end
		end
(in your 'PLAYER_LOGIN' handling function)

It sets the table value for every hooked frame to nil. If the frame couldn't be hooked or if the frame doesn't exist (!) it doesn't set the table value to nil.

Code:
local frame = _G[name]
	if not frame then return end
(happens in HookFrame if frame doesn't exist)

The point is, the three frames you find in you saved vars (GlyphFrame, LFGParentFrame, and InspectFrame) don't exist before the player actually uses them. The are created on demand. Other frames (my guess is all other frames) are created on load.

That means the code snippet above clears the table, except the three non-existent (at least on PLAYER_LOGIN) frames.
This is most likely your issue with "disappearing" table entries. If an entry is nil, it's key/value are ignored and not saved.
  Reply With Quote