From ba6dd015de784b423df292176fbe7045371af261 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 7 Dec 2019 23:35:40 +0800 Subject: add dlist:new --- xmake/core/base/dlist.lua | 5 +++++ xmake/core/base/timer.lua | 2 +- xmake/core/ui/panel.lua | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xmake/core/base/dlist.lua b/xmake/core/base/dlist.lua index 12d194ff6..238df948b 100644 --- a/xmake/core/base/dlist.lua +++ b/xmake/core/base/dlist.lua @@ -205,5 +205,10 @@ function dlist:ritems() return iter, self, nil end +-- new dlist +function dlist:new() + return self() +end + -- return module: dlist return dlist diff --git a/xmake/core/base/timer.lua b/xmake/core/base/timer.lua index 49dd6be5d..ec66b980b 100644 --- a/xmake/core/base/timer.lua +++ b/xmake/core/base/timer.lua @@ -31,7 +31,7 @@ function timer:_tasks() end -- post timer task at the absolute time and will be auto-remove it after be expired -function timer:post_at(when, period, repeat, task) +function timer:post_at(when, period, is_repeat, task) -- TODO end diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua index a38dfad5f..374428e51 100644 --- a/xmake/core/ui/panel.lua +++ b/xmake/core/ui/panel.lua @@ -43,7 +43,7 @@ function panel:init(name, bounds) self:option_set("selectable", true) -- init child views - self._VIEWS = dlist() + self._VIEWS = dlist:new() -- init views cache self._VIEWS_CACHE = {} -- cgit v1.3.1