lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Feb 11, 2006, at 19:52, Gavin Kistner wrote:

That's what I have now, but you have to explicitly specify the parent class:

Yes, you need to be explicit. One way or another.

	UnitSquare = AKClass:new( Square )
	function UnitSquare:initialize( )
		Square.initialize( self, 1 )
	end

You could make the above look more like this:

local super = Square
local self = AKClass:new( super )

function self:initialize( )
    super.initialize( self, 1 )
end

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/