lua-users home
lua-l archive

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


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.