Quantcast
WoWInterface - View Single Post - Why frame never attaches to UIParent?
View Single Post
07-18-19, 11:38 AM   #5
Lybrial
A Black Drake
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 86
In this case self is the anchorFrame

Look what happens if I add some outputs to Detach function:

Lua Code:
  1. self.anchorFrame.Detach = function(self)
  2.             print("Detach called");
  3.  
  4.             self:SetParent(UIParent);
  5.             self:ClearAllPoints();
  6.             self:SetPoint("CENTER", UIParent, "CENTER", 0, -150);
  7.  
  8.             print("attached to: " .. self:GetParent():GetName());
  9.  
  10.             LybrialAnchors:OnUpdate();
  11.         end

output:

Code:
Detach called
attached to: NamePlate1
How does that make sense? I set parent to UIParent and he is still attached to NamePlate1

Last edited by Lybrial : 07-18-19 at 11:45 AM.
  Reply With Quote