refactoring
This commit is contained in:
@@ -17,50 +17,6 @@ do local modules = {}
|
||||
end
|
||||
end
|
||||
|
||||
--do
|
||||
-- local call_method, call_self
|
||||
-- local function generic_call(...)
|
||||
-- return call_method(call_self, unpack(arg))
|
||||
-- end
|
||||
--
|
||||
-- local state = setmetatable({}, {__mode='k'})
|
||||
-- local mt = {__metatable=false}
|
||||
-- function mt:__index(self, key) self=state[self]
|
||||
-- local getter = self.class.getters[key]
|
||||
-- if getter then return getter(self.self) end
|
||||
-- local method = self.class.methods[key]
|
||||
-- if method then
|
||||
-- call_method, call_self = method, self.self
|
||||
-- return generic_call
|
||||
-- end
|
||||
-- end
|
||||
-- function mt:__newindex(self, key, value) self=state[self]
|
||||
-- local setter = self.class.setters[key]
|
||||
-- if setter then return setter(self.self, value) end
|
||||
-- end
|
||||
-- -- function mt:__unm(self) self=state[self]
|
||||
-- -- reclaim()
|
||||
-- -- end
|
||||
-- local function instantiate(methods, getters, setters, init, arg)
|
||||
-- local interface = setmetatable({}, mt)
|
||||
-- local self = {I=interface}; init(self, unpack(arg))
|
||||
-- state[interface] = {class={methods=methods, getters=getters, setters=setters}, self=self}
|
||||
-- return interface
|
||||
-- end
|
||||
-- function public.class(methods, getters, setters, init)
|
||||
-- return function(arg) instantiate(methods, getters, setters, init, arg) end
|
||||
-- end
|
||||
--end
|
||||
--
|
||||
--do
|
||||
-- local state = {}
|
||||
-- local mt = {__metatable=false, __newindex=error}
|
||||
-- function mt:__index(key) return state[self][key] end
|
||||
-- function public.immutable(t)
|
||||
-- return class({}, t, {}, function() end, {})
|
||||
-- end
|
||||
--end
|
||||
|
||||
aux 'core'
|
||||
|
||||
public.version = '5.0.0'
|
||||
@@ -75,11 +31,6 @@ function public.bids_loaded.get() return bids_loaded end
|
||||
local current_owner_page
|
||||
function public.current_owner_page.get() return current_owner_page end
|
||||
|
||||
--do
|
||||
-- local mt = {__call=function(self,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20) return self.f(unpack(self)) end} -- TODO
|
||||
-- function public.F.get(arg) arg.f = tremove(arg, 1) return setmetatable(arg, mt) end
|
||||
--end
|
||||
|
||||
local event_frame = CreateFrame('Frame')
|
||||
for event in temp-S('ADDON_LOADED', 'VARIABLES_LOADED', 'PLAYER_LOGIN', 'AUCTION_HOUSE_SHOW', 'AUCTION_HOUSE_CLOSED', 'AUCTION_BIDDER_LIST_UPDATE', 'AUCTION_OWNED_LIST_UPDATE') do
|
||||
event_frame:RegisterEvent(event)
|
||||
|
||||
Reference in New Issue
Block a user