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 = {}