下面用到的一些原表相关的东西:原表介绍
local DefaultClass = {
}
local function CallEventObject(list, i, v, old, table, key)
if v.target ~= nil then
local d = rawget(v.target, "___delete")
if d == true then
list[i] = nil;
else
v.target[v.funcName](v.target, table, old, key)
end
else
if type(v.funcName) == "function" then
v.funcName(table, old, key);
end
end
end
local function CallEvent(table, list, old, change, key)
print(key,#list, "--------CallEvent")
if list == nil then
return ;
end
for i, v in pairs(list) do
if v.isChange == true then
CallEventObject(list, i, v, old, table, key);
else
if change == true then
CallEventObject(list, i, v, old, table, key);
end
end
end
end
local dict = {
}
--访问时调用
dict.__index = function(table, k)
-