Hello,
I am facing a little problem here : I am new to Lua and don't konw the difference between the '.' operator and ':' operators.
I know the dot operator is used to get/use parameters and methods of said object but why and when do we have to use the ':' operator ?
My second question is : I am trying to save an UI element position is user's saved variables but I haven't had luck with 'GetAnchor()' yet. I did try
Code:
MyElement:GetAnchor()
returns boolean (true) only - I guess the operator tests if the method exists ??? - but then why can we use MyElement:SetAnchor(args) ?
Well then I tried
Code:
MyElement.GetAnchor()
But I get API error 'userdata expected, got no value'.
Doc says you have to pass the AnchorIndex to the function so I finally tried
Code:
MXPVUI.GetAnchor(MXPVUI.anchorIndex)
No luck
Where do I put the AnchorIndex tag in the XML file ? Am I doing the thing right ???
Explanation very welcome if you experienced doing the same thing
![Big Grin](//cdn-eso.mmoui.com/images/style_esoui/smilies/biggrin.gif)