lua-users home
lua-l archive

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


> How can I do it while keeping those objects hidden from
outside users.



Just remove the 'local' keyword for the functions and keep it before 'Account = {}'


--------------------------


-- Leave 'local' here
local SpecialAccount =
{
	limit = 1000,
	new = Account.new
};

-- But remove from here
function SpecialAccount:getLimit()
	return self.limit or 0;
end


--------------------------

--rb