view DependencyLoader/class.lua @ 17:f825ccf94a89

fixed an indexing issue in Addon.lua moved most of the code in DependencyLoader.lua to Core.lua, and renamed the former to frontend.lua updated load.xml rearranged stuff in start.lua
author mckenziemc
date Sat, 11 Dec 2010 03:32:04 -0800
parents 5362e308c3eb
children e7995d599184
line wrap: on
line source
--	class.lua
--	Implements a generic class builder.


local addonName, addonTable = ...

--	FIXME: prevent duplicate class definitions

print( string.format([[running %s\class.lua]], addonName) )

addonTable.classes = {}

function addonTable:NewClass(name)
	local class, prototype, metatable = {}, {}, {}
	
	class.prototype = prototype
	
	metatable.__index = prototype
	class.instanceMetatable = metatable
	
	self.classes[name] = class
	
	return class, prototype
end