[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Data inheritance problem
- From: Pete Gardner <pete@...>
- Date: Wed, 15 Nov 2000 16:38:41 -0800
Helikon Technologies Inc.
> -----Original Message-----
> From: Steve Dekorte [mailto:firstname.lastname@example.org]
> Sent: Wednesday, November 15, 2000 3:17 PM
> To: Multiple recipients of list
> Subject: Re: Data inheritance problem
> Pete Gardner wrote:
> >counter:child_inc() -- but this works on counter_base's
> data, not counter's...
> > Am I overlooking something? Is this expected behaviour?
> How can I make
> > child_inc() work on it's own data?
> If you want it to work on the child you need to change:
> function counter:child_inc() self.parent:inc() end
> function counter:child_inc() self.parent.inc(self) end
> or more simply:
> function counter:child_inc() self:inc() end
> If you implement a method lookup tag on your objects.