View Single Post
11-02-10, 10:55 AM   #19
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Oke ... I would say the point is this part:

Code:
		for name, parent in pairs(GMoveableFrames) do
			if HookFrame(name, parent) then
				GMoveableFrames[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 ... but tested it only for PVPFrame which indeed exist) are created on load.

That means the code snippet above clears the table, except the three non-existent (at least on PLAYER_LOGIN) frames.

Last edited by Duugu : 11-02-10 at 11:03 AM.
  Reply With Quote