lua-users home
lua-l archive

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


On Fri, Aug 23, 2013 at 8:46 AM, Coda Highland <chighland@gmail.com> wrote:
> On Fri, Aug 23, 2013 at 8:43 AM, Philipp Kraus
> <philipp.kraus@flashpixx.de> wrote:
>> x = myClass( 123 )
>>
>> x.test() -- shows nil
>
> Because it needs to be x:test().
>
> /s/ Adam

... although that'll output some table address and not the value of
x.id because you're calling print(self) and not print(self.id).

/s/ Adam