fix: stop self.dimen polution for inputcontainers

Without this fix, self.dimen is shared among all inputcontainers
intances, which breaks some of the UI rendering. All widget should
set/initialize their own self.dimen in self:init() method.
This commit is contained in:
Qingping Hou
2015-09-13 01:06:22 -07:00
parent cdd17906f6
commit 63e88baf33
5 changed files with 14 additions and 14 deletions

View File

@@ -31,8 +31,8 @@ definition.
--]]
function Widget:new(o)
o = self:extend(o)
-- Both o._init and o.init are called on object create. But o._init is used
-- for base widget initialization (basic component used to build other
-- Both o._init and o.init are called on object creation. But o._init is
-- used for base widget initialization (basic component used to build other
-- widgets). While o.init is for higher level widgets, for example Menu
-- Widget
if o._init then o:_init() end