View Single Post
12-15-13, 01:40 PM   #11
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Well, don't I feel stupid now I mean, more than usual...

Here's how I made the fontstring:

Code:
	if TukuiDB.myclass == "DRUID" then
				self.shrooms = self:CreateFontString(nil, "OVERLAY")
				self.shrooms:SetFontObject("UFFontMedium")
				self.shrooms:SetPoint("TOPRIGHT",self,"TOPRIGHT",0,-4)
				self:Tag(shrooms,"[shrooms]")
			end
What I do on _all_ other occasions but not here is to first create a local variable, construct the object and set properties and _finally_ set self.variable = variable. But in this one instance, yeah, I don't. I create self.shrooms directly instead of local shrooms and then setting self.shrooms = shrooms. Which makes the above... well, not working. The last line needs to read "self:Tag(self.shrooms,"[shrooms]")".

I found this by traversing ouf's code with print statements. Not trying to blame anyone else for my own stupidity, but is there a reason ouf does not print an error message along the lines of "Dude, your tag's fontstring is nil"?

Anyways, thanks for reading, special thanks to phanx for some handholding. I DID learn quite a bit, so it's not a total loss
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote