summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-07 23:35:40 +0800
committerruki <[email protected]>2019-12-07 23:35:40 +0800
commitba6dd015de784b423df292176fbe7045371af261 (patch)
tree678bdf2085f800559c88b00d4801f600d0a59f6e
parentc369affce79c1c009fcb18f92cd4ee2757466330 (diff)
add dlist:new
-rw-r--r--xmake/core/base/dlist.lua5
-rw-r--r--xmake/core/base/timer.lua2
-rw-r--r--xmake/core/ui/panel.lua2
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 = {}