View Single Post
01-31-12, 06:03 PM   #23
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by Seerah View Post
Then you asked the wrong question. You asked if a frame had been created yet. If a frame has not been created, then it is nil - assuming that you used a unique name or unique global variable for it. If it is nil, then my line will pass through the or. If, as you say, it throws an error saying that it's not a table, then it's not nil. It's equal to something else. Meaning that you are using the same variable name for multiple things.
I dont mean that it finds that its not a frame it tells me that it just does not find it at all period and then it stops the code and shoots an error... ill try it again when i get a chance... the frame ~= nil seems to be working fine

Code:
function addon:ArtSetPoint()
	skin:SetPoint('BOTTOMLEFT', -addon.settings.artSetPoint, 0)
	skin:SetPoint('BOTTOMRIGHT', addon.settings.artSetPoint, 0)
	
	-- The following is done so TargetFrame.lua does not need to load first or at all. 
	if GrimUITargetFrame ~= nil then
		skin[4]:SetParent("GrimUITargetFrame")
		skin[4]:SetPoint('BOTTOM', GrimUITargetFrame, 'BOTTOM', 0, 4)
	end
end
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 01-31-12 at 06:05 PM.
  Reply With Quote