View Single Post
03/17/20, 03:54 PM   #11
fallenstd
Join Date: Mar 2020
Posts: 6
Originally Posted by sirinsidiator View Post
For control instances you can assume all methods use this shorthand way, so what you are actually doing right now is passing the value to self instead of the expected argument. You need to either call UiW.SetValue(UiW, x) or for short UiW:SetValue(x).
Aaah, great, this is what I was missing. Thanks a bunch!
I was aware of the two way of calling methods, just didn't think to try the : way for controls.
Cheers

ps. but this works only for members that come from LUA, not global vars that store the UI element names right?
I modified my code and it works for members under the LUA addon namespace, but not when I assign it to local
local UiElement = AddonNameUiElement
then calling UiElement:SetValue(x) does not do anything while calling element directly by id works AddonNameUiElement:SetValue(x)

Last edited by fallenstd : 03/17/20 at 05:21 PM.
  Reply With Quote