lua-users home
lua-l archive

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

On 12/12/05, Michael Swan <> wrote:
> self:f()
> -- The self doesn;t seem to make this part of class I'm executing it in.

Well, it does. But here's the thing: when you write a member function
like that, you need to explicitly declare "self" as the first
parameter. And since chunks loaded with loadstring() can't declare
argument lists explicitly, you can't have a parameter like that.
However, chunks are treated as having a vararg list. So you should be
able to access the "self" via the line "self = ...". I've never tried
this, though.