[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Implementing "super()" for classes
- From: Ted Unangst <ted.unangst@...>
- Date: Fri, 7 May 2010 15:39:02 -0400
On Fri, May 7, 2010 at 3:15 PM, Aaron MacDonald <aaronjm@eastlink.ca> wrote:
> My issue is that I am unsure how to implement a "super" construct for accessing an object's superclass methods. Ideally I'd be able to do something like this:
If you use debug.getinfo you could look up the name of the caller to
super() and do the right thing:
function Sub:init(aaa)
self:super(aaa)
end