The error message isn't consistent. The error message speaks both about m_delete() (fine) and _m_delete (not fine) - this is confusing.
I think it's quite logical,
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...?
/ Mirar
Previous text:
2003-02-10 19:42: Subject: Re: Implicit vs. explicit type casting with Pike
On Mon, Feb 10, 2003 at 07:20:09PM +0100, Martin Nilsson (Åskblod) @ Pike (-) developers forum scribbled:
If you call m_delete with an object m_delete will try to call _m_delete, as is apparent from the error message and the documentation for m_delete.
Oops, missed that one :) - haven't looked at the docs carefully enough :>
Bad argument 1 to m_delete(). Expected object with _m_delete Unknown program: m_delete(ptest()->settable(),"test1") ptest.pike:59: ptest()->main()
Which is incorrect as per the m_delete synopsis:
mixed m_delete(object|mapping map, mixed index)
No, it is not.
The error message isn't consistent. The error message speaks both about m_delete() (fine) and _m_delete (not fine) - this is confusing.
- is there any way to install a hook for an object to intercept
index deletion in the above code (without the cast)?
Yes, as stated above.
thanks
marek
/ Brevbäraren