View Single Post
05-24-13, 05:27 PM   #5
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Hmm, I took a look at your code.

You're over-complicating things

There's no reason to have a frame to parent your unitframe to, that does nothing.

You should just create your Button from 'SecureUnitButtonTemplate' as you've done, set your attributes and then use RegisterUnitWatch(yourframe)
It will take care of showing / hiding of itself (look at how the default target frame is done for example)

You don't need that 'w' frame you have at all.

Here for an example:
http://www.wowpedia.org/API_RegisterUnitWatch
  Reply With Quote