I gave it object with m_delete() - and the error says that it's a bad argument to m_delete while it states that it expected an object passed to _m_delete
No, not passed. It doesn't say anything about how it expects _m_delete to behave, only about what m_delete expects:
The first argument to m_delete is either a mapping or an object, but the object must be of a class that has an _m_delete method, "object with _m_delete".
How would you phrase it so it's more clear?
/ Mirar
Previous text:
2003-02-10 22:20: Subject: Re: Implicit vs. explicit type casting with Pike
On Mon, Feb 10, 2003 at 09:30:07PM +0100, Mirar @ Pike developers forum scribbled:
Bad argument 1 to m_delete(). Expected object with _m_delete
^^^^^^^^^^^^^^^^^^^^^
You didn't give it an object with _m_delete. You gave it an object without _m_delete...?
I gave it object with m_delete() - and the error says that it's a bad argument to m_delete while it states that it expected an object passed to _m_delete - that is in no way logical or consistent. The first reflection is to check the correctness of the parameters passed to m_delete - they are fine, then to look for documentation of _m_delete - there is naught (save for the m_delete documentation, but the user will not look for it there since the message speaks that the error is in the parameters passed to _m_delete and http://pike.ida.liu.se/generated/manual/modref/ex/_m_delete.html is a 404). For a new user this will be mighty confusing.
marek
/ Brevbäraren