[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in pcall? or not?
- From: "Alexander Gladysh" <agladysh@...>
- Date: Thu, 12 Oct 2006 12:27:46 +0400
Is this a bug?
ok, result = pcall (t:test) --> error: function arguments expected
near `)'
--------------
No, it is not a bug. ':' syntax is used only for member function
calls. If you need to access to member variable, holding that
function, you should use '.' as for any other member variable.
To do a pcall on a member function, you have to specify 'self'
parameter by hand:
ok, result = pcall(t.test, t)
HTH,
Alexander.