ui_callback.list_branch_ir = function(self, index, obj)
index = index + 1
if not obj then return end
local items = self.items
local ctrl_item = items[obj] or false
if ctrl_item then
--如果列表元素存在,执行什么操作。
else
--如果列表元素不存在 创建一个
ctrl_item = CtrlButton(self, obj)
xxxx
items[obj] = ctrl_item
end
end
另外注意要在开始的时候设定数量,以及令items = {}