Originally Posted by sirinsidiator
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)