Question regarding getchildren()
Hi
I recently began learning lua and how to create addons, and have been having trouble with handling children of a ui element. I am trying to call a function on the children of ZO_CompassFrame, and rather than individually calling a function on each child, i thought i would do so through a for loop ( for k,v in pairs(ZO_CompassFrame:getchildren()) do v:function() ). I can use values from a list of numbers such as getdimensions(), however when trying to get the list of children through getchildren(), the game gives the 'expected function instead of nil stack traceback' error. I believe it is something to do with the list containing objects(?), as lists containing strings and integers etc work fine. I am new to lua, so am i just missing something?
Thanks
|