Re: Problems declaring objects inside package
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Problems declaring objects inside package
- From: Romulo Bahiense <romulo@...>
- Date: 2005年3月01日 15:03:26 -0300
> 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