lua-users home
lua-l archive

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

Lua doesn't have any class or inheritance system built in, so it'll be
hard to give an answer without first knowing what implementation of a
class system you are using.

On Sat, Nov 14, 2009 at 9:17 PM, Colm Sloan <> wrote:
> In short, does anyone know the Lua equivalent of the C++ code:
> DerivedClass d = (DerivedClass)baseClass;
> ?
> But only using Lua code, no C++.
> The base class object already has loads of things in it that I need in the
> derived class. I don't believe I can just use table.copy(t) because I don't
> think that gets everything. I've been stuck on this for days trying a
> variety of approaches. Any ideas?
> Thanks :)