View Single Post
03/14/19, 06:45 PM   #6
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Originally Posted by sirinsidiator View Post
That's not possible. Controls are here to stay once they are created. There is no way to delete them. Not even with templates.
I know, i thought ApplyTemplateToControl() might work as some sort of "ControlPoolManagementFactory", quite the way I currently handle it, but more sophisticated and elegant. Could you explain a (or probably THE) typical use case for ApplyTemplateToControl() then? I don't see a sense in it if it isnt about replacing controls.



Originally Posted by KLISK
If you decide to completely replace the object in the pool, it will not be elegant, it will be terribly expensive in terms of resources.
I am afraid there is no other way. If you have a look at my addon's menu (the right one, called "Trigger Settings"):
https://cdn-eso.mmoui.com/preview/pvw6325.png

A (De)Buff trigger has totally different configuration parameters than a combat event based trigger (the latter does not require a "Source Unit", but target and source parameters, actionResults that the aura should react to, etc.). So the "Trigger Settings" submenu totally changes if the user changes the trigger type form "(De)Buff" to "Combat Event" by using the appropriate combobox. I cannot think of a more elegant way to achieve this than just taking all relevant controls and reanchoring them to hidden pools.

Last edited by Letho : 03/14/19 at 06:49 PM.
  Reply With Quote