All pastes #103701 Raw Edit

Mine

public text v1 · immutable
#103701 ·published 2006-07-28 13:31 UTC
rendered paste body
function aUF:FindObjects()
	local table = {}
	for _,v in self do
		if type(v) == "table" then
			if AceOO.inherits(v, aUF.aUFunit) and v.name then
				if not table[v.type] then table[v.type] = {} end
				tinsert(table[v.type],v.name)
			end
		end
	end
	return table
end

function aUF:CallUnitMethods(class,func,arg)
	if aUF:FindObjects()[class] then
		for _,v in aUF:FindObjects()[class] do
			if func then
				self[v][func](self[v],arg)
			end
		end
	end
end