Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TclOO: additional mapping call in TclOOObjectCmdCore

Closed / Fixed1791215fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-09-09 20:09:59
from apw: then there only remain 2 other issues concerning Itcl: RFE 1773103 and the mapping call proc, which I have sent you some time ago. I have pasted the current diff at http://paste.tclers.tk/380 it is to allow me to map ns1::method1 to namespace ns1 and method method1 if TclOOObjectCmdCore is called.
dkf Ticket [1791215fff]: 2 changes [History diff]2007-09-10 06:03:04
dkf Ticket [1791215fff]: 1 change [History diff]2007-10-02 05:18:26
dkfplain2007-10-12 22:18:49
Logged In: YES 
user_id=79902
Originator: NO

Added. Changed the argument order so that the interp comes first and the non-interp in/out argument comes last. No setter function currently; don't understand what it's supposed to do well enough to write the documentation. :-)
wiedeplain2007-10-13 22:50:06
Logged In: YES 
user_id=558925
Originator: YES

Donal, thanks for intergrating. I have just forgot to add the setter function, here it is:
void
Tcl_ObjectSetMapCmdNameProc(
    Tcl_Object oPtr,
    TclOO_MapMethodName mapMethodNameProc)
{
    ((Object *)oPtr)->mapMethodNameProc = mapMethodNameProc;
}

Could you please add that too. Thanks.
Will try to think about forwarding a documentation for the functionality to you.
wiedeplain2007-10-13 23:20:23
Logged In: YES 
user_id=558925
Originator: YES

Just figured out that the signature must be:
typedef int (*TclOO_MapMethodNameProc)(Tcl_Interp *interp, struct Object *oPtr,
        struct Class **startClsPtrPtr, Tcl_Obj *methodObj);
as I am also returning a different startClassPtr.
Example:
for "cl1::method1" I am returning "method1" in methodObj and the class pointer for "cl1" in startClassPtrPtr
dkf Ticket [1791215fff]: 1 change [History diff]2007-12-30 22:34:20
dkf Closed ticket [1791215fff]. [History diff]2008-01-03 07:14:03
Log in (anonymous is fine) to add a comment.