View Single Post
12-13-14, 02:57 AM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by sirann View Post
so inside of my shared function put:

oUF:RegisterStyle('oUF_Terenna_Player', UnitSpecific.player)
as well as other units with the UnitSpecific.insertunitnamehere ?
No, that won't do anything there; you need to actually call the function:

Code:
local func = UnitSpecific[unit]
if func then
   func()
end
Also, that would need to be at the end of the function, so all the objects are created before the unit specific function tries to do stuff with them.

Originally Posted by sirann View Post
And then just have oUF:SetActiveStyle('oUF_Terenna') at the bottom of my code outside of all functions?
Yes.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote