View Single Post
11-05-08, 09:47 AM   #209
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Kellen View Post
I noticed some odd behavior for targettarget/focustarget/partytarget frames. The health number value only seems to be updated when the frame is first shown/selected. The status bar updates, just not the number.

I'm using tags, so that could be a factor. Although, I've used the same tags in the normal player and target frames and they work and update fine.

Is there some limitation to the tag system here? Should I just wait for the new one on the horizon?

(Edit) The example I'm triggering with:
Code:
oUF.Tags['[percenthp]'] = function(u)
  local l, h = UnitHealth(u), UnitHealthMax(u)
  if UnitIsDeadOrGhost(u) then
    return oUF.Tags['[dead]'](u)
  else
    return string.format('%d%%', math.floor(l/h*100+0.5))
  end
end
oUF.TagEvents['[percenthp]'] = 'UNIT_HEALTH UNIT_MAXHEALTH'

...

self.Health.value = SetFontString(self.Health, 14, '')
self.Health.value:SetPoint('RIGHT', -5, 0)
self.Health.value:SetText('[percenthp]')
local health = self.Health.value
table.insert(self.TaggedStrings, health)
Tags are currently bugged with ToT and some other frames