View Single Post
07-26-14, 02:34 AM   #20
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
Originally Posted by Phanx View Post
That said, as long as you're not trying to move it in combat, I don't see why a simple hook shouldn't work:

Code:
local moving
hooksecurefunc(Boss1TargetFrame, "SetPoint", function(self) -- don't care about args
	if moving or InCombatLockdown() then -- avoid infinite loops and blocked actions
		return print("Boss1TargetFrame:SetPoint", moving and "already moving" or "in combat")
	end
	moving = true
	print("Boss1TargetFrame:SetPoint moving...")

	self:SetMovable(true)
	self:ClearAllPoints()
	self:SetPoint("TOP", Minimap, "BOTTOM", 0, -70)
	self:SetUserPlaced(true)
	self:SetMovable(false)

	print("Boss1TargetFrame:SetPoint done!")
	moving = nil
end)
If you still get the "not movable or resizable" error it would help to specify what exactly is on line 342 in your file...
line 342 was self:SetMovable(true). I'll try this - though I've already tried variations on the theme.
  Reply With Quote