Index: xotcl/ChangeLog =================================================================== diff -u -r900ba9665a79888f0561e2c4b8574c2e4a3dad8b -rf58919af57edbcf2e5a65a143618ab5add3c930a --- xotcl/ChangeLog (.../ChangeLog) (revision 900ba9665a79888f0561e2c4b8574c2e4a3dad8b) +++ xotcl/ChangeLog (.../ChangeLog) (revision f58919af57edbcf2e5a65a143618ab5add3c930a) @@ -1,4 +1,9 @@ 2004-08-01 Gustaf.Neumann@wu-wien.ac.at + * xotcl.c: calling __unknown when an object with an unknown + parent namespace is called (for handling nested object + classes in Zoran's ttrace package) + +2004-08-01 Gustaf.Neumann@wu-wien.ac.at * yet another fixed access to freed memory (when the configure method returned a non numerical value, which was tried to be converted into a number; setting refcounts properly helped. Index: xotcl/generic/xotcl.c =================================================================== diff -u -rd0042f1326f427aa395ed6e54d5690cb06d43c81 -rf58919af57edbcf2e5a65a143618ab5add3c930a --- xotcl/generic/xotcl.c (.../xotcl.c) (revision d0042f1326f427aa395ed6e54d5690cb06d43c81) +++ xotcl/generic/xotcl.c (.../xotcl.c) (revision f58919af57edbcf2e5a65a143618ab5add3c930a) @@ -1,4 +1,4 @@ -/* $Id: xotcl.c,v 1.19 2004/08/01 22:15:11 neumann Exp $ +/* $Id: xotcl.c,v 1.20 2004/08/02 22:17:22 neumann Exp $ * * XOTcl - Extended OTcl * @@ -1409,7 +1409,26 @@ if (parentObj) { requireObjNamespace(in, parentObj); } else { - result = 0; + /* call unknown and try again */ + Tcl_Obj *ov[3]; + int rc; + ov[0] = RUNTIME_STATE(in)->theClass->object.cmdName; + ov[1] = XOTclGlobalObjects[__UNKNOWN]; + ov[2] = Tcl_NewStringObj(parentName,-1); + INCR_REF_COUNT(ov[2]); + /*fprintf(stderr,"+++ calling __unknown for %s\n", ObjStr(ov[2]));*/ + rc = Tcl_EvalObjv(in, 3, ov, 0); + if (rc == TCL_OK) { + XOTclObject *parentObj = (XOTclObject*) GetObject(in, parentName); + if (parentObj) { + requireObjNamespace(in, parentObj); + } + result = (Tcl_FindNamespace(in, parentName, + (Tcl_Namespace *) NULL, TCL_GLOBAL_ONLY) != 0); + } else { + result = 0; + } + DECR_REF_COUNT(ov[2]); } } DSTRING_FREE(dsp);