Index: generic/xotcl.c =================================================================== diff -u -r802641dc2edee9e8ac569ad9c9cbadc949df8d47 -r94c42bd6f92e314fb45b3c392dd273a78384520a --- generic/xotcl.c (.../xotcl.c) (revision 802641dc2edee9e8ac569ad9c9cbadc949df8d47) +++ generic/xotcl.c (.../xotcl.c) (revision 94c42bd6f92e314fb45b3c392dd273a78384520a) @@ -1703,11 +1703,14 @@ static void requireObjNamespace(Tcl_Interp *interp, XOTclObject *obj) { if (!obj->nsPtr) makeObjNamespace(interp, obj); + /* setting the namespace resolver here would be the correct thing, + but unforunately, this has the side effect, that we can't + set fresh variables via the set method... + */ /* Tcl_SetNamespaceResolvers(obj->nsPtr, (Tcl_ResolveCmdProc*)NULL, varResolver, (Tcl_ResolveCompiledVarProc*)NULL); */ - } extern void XOTclRequireObjNamespace(Tcl_Interp *interp, XOTcl_Object *obj) { @@ -9767,9 +9770,23 @@ int rc; XOTcl_FrameDecls; /*fprintf(stderr,"objscopedMethod obj=%p, ptr=%p\n", obj, tcd->objProc);*/ + /* + if (obj->nsPtr) { + fprintf(stderr,"objscopedMethod obj=%p %s, ptr=%p set resolver, ns=%s\n", obj, ObjStr(obj->cmdName), tcd->objProc, obj->nsPtr->fullName); + + Tcl_SetNamespaceResolvers(obj->nsPtr, (Tcl_ResolveCmdProc*)NULL, + varResolver, (Tcl_ResolveCompiledVarProc*)NULL); + }*/ XOTcl_PushFrame(interp, obj); rc = (tcd->objProc)(tcd->cd, interp, objc, objv); XOTcl_PopFrame(interp, obj); + + /* + if (obj->nsPtr) { + Tcl_SetNamespaceResolvers(obj->nsPtr, (Tcl_ResolveCmdProc*)NULL, + NULL, (Tcl_ResolveCompiledVarProc*)NULL); + } + */ return rc; } @@ -13202,8 +13219,13 @@ #include "predefined.h" /* fprintf(stderr, "predefined=<<%s>>\n", cmd);*/ - if (Tcl_GlobalEval(interp, cmd) != TCL_OK) + if (Tcl_GlobalEval(interp, cmd) != TCL_OK) { + static char cmd[] = + "puts stderr \"Error in predefined code\n\ + $::errorInfo\""; + Tcl_EvalEx(interp, cmd, -1, 0); return TCL_ERROR; + } } #ifndef AOL_SERVER