lua-users home
lua-l archive

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


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