View Single Post
10-05-08, 04:02 PM   #40
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
This is what i've got, hidden on login, but doesn't show up on mouseover.

Beginning of the style (where the OnEnter/OnLeave were)

Code:
	local function Hide(f)
		f:Hide()
		f:SetScript("OnShow", f.Hide)
	end

	local function Show(f)
		f:Show()
		f:SetScript("OnShow", nil)
	end

	self:SetScript("OnEnter", function(self)
		if(unit == 'player') then Show(self.Experience) end
		UnitFrame_OnEnter(self)
	end)

	self:SetScript("OnLeave", function(self)
		if(unit == 'player') then Hide(self.Experience) end
		UnitFrame_OnLeave(self)
	end)
And at the end of the self.Experience block

Code:
Hide(self.Experience)
P3lim, if i use yours with
Code:
f:SetScript("OnShow", function() f.Hide end)
i get a
Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:282: '=' expected near 'end'
. Line 282 is yours just above.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-05-08 at 05:16 PM.