Quantcast Is live update of Tag element not available? - WoWInterface
Thread Tools Display Modes
09-01-18, 09:54 PM   #1
Lyak
A Cyclonian
Join Date: Jul 2018
Posts: 45
Is live update of Tag element not available?

Hi all,

I'm currently trying to create a configuration UI with AceConfig-3.0 and attempted to add a tag element option to it.

Lua Code:
  1. local options = {
  2.     type = "group",
  3.     childGroups = "tab",
  4.     name = "Test",
  5.     arg = "Test",
  6.     args = {
  7.         tag = {
  8.             order = 1,
  9.             type = "input",
  10.             name = "Tag",
  11.             width = "double",
  12.             get = function()
  13.                 return config.text.tag
  14.             end,
  15.             set = function(_, value)
  16.                 myPlayerFrame:Untag(myPlayerFrame.healthText)
  17.                 myPlayerFrame:Tag(myPlayerFrame.healthText, value)
  18.  
  19.                 -- DEBUG
  20.                 print(myPlayerFrame:GetName(), myPlayerFrame.healthText:GetName(), value)
  21.  
  22.                 config.text.tag = value
  23.             end,
  24.         },
  25.     },
  26. }

Well... the debugging works perfectly fine and it saves a new tag value into the SV. However, it doesn't seem to update the tag even if I press the 'okay' button until I reload the UI

So, I was just wondering if the live update of tag element is not available or not.

Thank you in advance!

Last edited by Lyak : 09-02-18 at 01:58 AM.
  Reply With Quote
09-03-18, 12:02 AM   #2
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 452
You need to update the tag in your set function:
Code:
myPlayerFrame:Untag(myPlayerFrame.healthText)
myPlayerFrame:Tag(myPlayerFrame.healthText, value)
myPlayerFrame.healthText:UpdateTag()
  Reply With Quote
09-03-18, 12:30 AM   #3
Lyak
A Cyclonian
Join Date: Jul 2018
Posts: 45
Originally Posted by Rainrider View Post
You need to update the tag in your set function:
Code:
myPlayerFrame:Untag(myPlayerFrame.healthText)
myPlayerFrame:Tag(myPlayerFrame.healthText, value)
myPlayerFrame.healthText:UpdateTag()
NICE!!!!!!!!!!!!!!!!!!!

It just worked like a charm

I really appreciate your help, Rainrider!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Is live update of Tag element not available?

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