Thread Tools Display Modes
09-21-14, 04:31 AM   #1
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Overwriting an element

Hi there!

I can add an element to ouf via

Lua Code:
  1. oUF:AddElement('RaidDebuffs', Update, Enable, Disable)

In an older version of ouf, I could simply call AddElement again to overwrite the element with another one. After an update (I'm not sure about the version numbers, I'm basing my stuff on Tukui Beta), there's an error message and I assume that the element wasn't overwritten.

What can I do here without modifying the original code, i.e. I can't remove the lua code that adds the element. Is there something like oUF:RemoveElement or the like?

Thanks for any pointers!
__________________
" ... 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
09-21-14, 05:09 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I guess TukUI modified oUF to not error on name conflicts. The error has been there since the first commit of the element system in 2008.

Don't think there's a way to solve with without modifying at least some files.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-21-14, 01:31 PM   #3
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Ah, I just realized tukui had some conditional loading, so raiddebuffs wasn't actually loaded, so no conflict possible. But thanks for pointing out it's a name collision, I can easily rename my own copy to, say, "NotAuraWatch". Thanks!
__________________
" ... 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
09-28-14, 01:35 PM   #4
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Isn't this doable by using oUF:DisableElement("ElementName")?
  Reply With Quote
09-28-14, 02:33 PM   #5
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No, that would just disable the element on the frame and globally within oUF.
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Overwriting an element

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off