Lua has a short hand way for defining member functions. When they are defined with function myTable:myFunction(a, b) it means the same as writing function myTable.myFunction(self, a, b).
When you call a method the same applies. 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).
|