local wid = Widget() wid:resize(10, 10) -- # wid:getSize() would return the witdth and the height of wid -- # imagine globalWidget would be the screen globalWidget:addChild(wid)
Now, you want to reposition the widget. What do you think is better and/or more intuitive? Please give a reason (e. g. just more intuitive or an real advantage).
globalWidget:repositionChild(wid, 5, 5) -- # Or wid:reposition(5, 5)
I am not sure, because the position of an object is an information that doesn't belongs to that (it doesn't defines the state of this object).
Edited by Sewbacca, 24 May 2018 - 06:40 PM.