Index: doc/index.html
===================================================================
diff -u -ra15fb82a6c951540fdf1555473ca9a6fcae7c84c -rbc2fe454630ac53d4ea617baa30e4ac93fa8fd30
--- doc/index.html (.../index.html) (revision a15fb82a6c951540fdf1555473ca9a6fcae7c84c)
+++ doc/index.html (.../index.html) (revision bc2fe454630ac53d4ea617baa30e4ac93fa8fd30)
@@ -23,7 +23,7 @@
- - Directory './library/lib':
Script.xotcl, htmllib.xotcl, make.xotcl, makeDoc.xotcl, metadataAnalyzer.xotcl, mixinStrategy.xotcl, package.xotcl, staticMetadata.xotcl, test.xotcl, trace.xotcl, upvarcompat.xotcl, xodoc.xotcl, xotcl1.xotcl - Directory './library/store':
JufGdbmStorage.xotcl, MemStorage.xotcl, MultiStorage.xotcl, Persistence.xotcl, Storage.xotcl, TclGdbmStorage.xotcl, TextFileStorage.xotcl, persistenceExample.xotcl - Directory './library/serialize':
Serializer.xotcl - Directory './tests':
12.xotcl, aliastest.xotcl, destroytest.xotcl, forwardtest.xotcl, info-method.xotcl, interceptor-slot.xotcl, method-modifiers.xotcl, mix.xotcl, mixinoftest.xotcl, o2.xotcl, object-system.xotcl, parameters.xotcl, protected.xotcl, slottest.xotcl, speedtest.xotcl, stack.xotcl, testo.xotcl, testx.xotcl, var.xotcl, varresolutiontest.xotcl - Directory './apps/scripts':
adapter.xotcl, adapterExample.xotcl, composite.xotcl, compositeExample.xotcl, observer.xotcl, parameter.xotcl, pinger.xotcl, simpleFilters.xotcl, soccerClub.xotcl, soccerClub2.xotcl - Directory './apps/comm':
ftp.xotcl, link-checker.xotcl, secure-webclient.xotcl, secure-webserver.xotcl, webclient.xotcl, webserver.xotcl - Directory './apps/actiweb/univ':
UNIVERSAL.xotcl - Directory './apps/utils':
xo-daemon, xo-whichPkg
+ - Directory './library/lib':
Script.xotcl, htmllib.xotcl, make.xotcl, makeDoc.xotcl, metadataAnalyzer.xotcl, mixinStrategy.xotcl, package.xotcl, staticMetadata.xotcl, test.xotcl, trace.xotcl, upvarcompat.xotcl, xodoc.xotcl, xotcl1.xotcl - Directory './library/store':
JufGdbmStorage.xotcl, MemStorage.xotcl, MultiStorage.xotcl, Persistence.xotcl, Storage.xotcl, TclGdbmStorage.xotcl, TextFileStorage.xotcl, persistenceExample.xotcl - Directory './library/serialize':
Serializer.xotcl - Directory './tests':
12.xotcl, aliastest.xotcl, destroytest.xotcl, forwardtest.xotcl, info-method.xotcl, interceptor-slot.xotcl, method-modifiers.xotcl, mix.xotcl, mixinoftest.xotcl, o2.xotcl, object-system.xotcl, parameters.xotcl, protected.xotcl, slottest.xotcl, speedtest.xotcl, stack.xotcl, testo.xotcl, testx.xotcl, varresolutiontest.xotcl, varresolutiontest1.xotcl - Directory './apps/scripts':
adapter.xotcl, adapterExample.xotcl, composite.xotcl, compositeExample.xotcl, observer.xotcl, parameter.xotcl, pinger.xotcl, simpleFilters.xotcl, soccerClub.xotcl, soccerClub2.xotcl - Directory './apps/comm':
ftp.xotcl, link-checker.xotcl, secure-webclient.xotcl, secure-webserver.xotcl, webclient.xotcl, webserver.xotcl - Directory './apps/actiweb/univ':
UNIVERSAL.xotcl - Directory './apps/utils':
xo-daemon, xo-whichPkg
Index: generic/xotcl.c
===================================================================
diff -u -r363468ca6ba6f70121e3b561303a116fa5942992 -rbc2fe454630ac53d4ea617baa30e4ac93fa8fd30
--- generic/xotcl.c (.../xotcl.c) (revision 363468ca6ba6f70121e3b561303a116fa5942992)
+++ generic/xotcl.c (.../xotcl.c) (revision bc2fe454630ac53d4ea617baa30e4ac93fa8fd30)
@@ -1600,7 +1600,8 @@
if (methodObj) {
if ((osPtr->overloadedMethods & 1<definedMethods & 1<methods[methodIdx];
+}
+
static int
callDestroyMethod(Tcl_Interp *interp, XOTclObject *object, int flags) {
int result;
@@ -6397,10 +6417,15 @@
/* normal dispatch */
result = ObjectDispatch(clientData, interp, objc, objv, 0);
} else {
- Tcl_Obj *tov[2];
- tov[0] = objv[0];
- tov[1] = XOTclGlobalObjs[XOTE_DEFAULTMETHOD];
- result = ObjectDispatch(clientData, interp, 2, tov, XOTCL_CM_NO_UNKNOWN);
+ Tcl_Obj *methodObj = MethodObj(interp, (XOTclObject *)clientData, XO_defaultmethod_idx);
+ if (methodObj) {
+ Tcl_Obj *tov[2];
+ tov[0] = objv[0];
+ tov[1] = methodObj;
+ result = ObjectDispatch(clientData, interp, 2, tov, XOTCL_CM_NO_UNKNOWN);
+ } else {
+ result = TCL_OK;
+ }
}
return result;
@@ -8605,14 +8630,18 @@
Tcl_Obj **nobjv, *resultObj = Tcl_GetObjResult(interp);
/*
- * Call the user-defined constructor 'init' and pass the result of
+ * Call the scripted constructor and pass the result of
* configure to it as arguments
*/
INCR_REF_COUNT(resultObj);
Tcl_ListObjGetElements(interp, resultObj, &nobjc, &nobjv);
-
- result = callMethod((ClientData) object, interp, XOTclGlobalObjs[XOTE_INIT],
- nobjc+2, nobjv, XOTCL_CM_NO_PROTECT);
+ /* CallDirectly does not make much sense, since init is already
+ defined in predefined */
+ methodObj = MethodObj(interp, object, XO_init_idx);
+ if (methodObj) {
+ result = callMethod((ClientData) object, interp, methodObj,
+ nobjc+2, nobjv, XOTCL_CM_NO_PROTECT);
+ }
object->flags |= XOTCL_INIT_CALLED;
DECR_REF_COUNT(resultObj);
}
@@ -12875,24 +12904,29 @@
* the the string representation.
*/
/*fprintf(stderr, "calling %s objectparameter\n", objectName(object));*/
+ Tcl_Obj *methodObj = MethodObj(interp, object, XO_objectparameter_idx);
- result = callMethod((ClientData) object, interp, XOTclGlobalObjs[XOTE_OBJECTPARAMETER],
- 2, 0, XOTCL_CM_NO_PROTECT);
-
- if (result == TCL_OK) {
- rawConfArgs = Tcl_GetObjResult(interp);
- /*fprintf(stderr, ".... rawConfArgs for %s => %s\n", objectName(object), ObjStr(rawConfArgs));*/
- INCR_REF_COUNT(rawConfArgs);
-
- /* Parse the string representation to obtain the internal representation */
- result = ParamDefsParse(interp, methodName, rawConfArgs, XOTCL_DISALLOWED_ARG_OBJECT_PARAMETER, parsedParamPtr);
+ if (methodObj) {
+ result = callMethod((ClientData) object, interp, methodObj,
+ 2, 0, XOTCL_CM_NO_PROTECT);
+
if (result == TCL_OK) {
- XOTclParsedParam *ppDefPtr = NEW(XOTclParsedParam);
- ppDefPtr->paramDefs = parsedParamPtr->paramDefs;
- ppDefPtr->possibleUnknowns = parsedParamPtr->possibleUnknowns;
- object->cl->parsedParamPtr = ppDefPtr;
+ rawConfArgs = Tcl_GetObjResult(interp);
+ /*fprintf(stderr, ".... rawConfArgs for %s => %s\n", objectName(object), ObjStr(rawConfArgs));*/
+ INCR_REF_COUNT(rawConfArgs);
+
+ /* Parse the string representation to obtain the internal representation */
+ result = ParamDefsParse(interp, methodName, rawConfArgs, XOTCL_DISALLOWED_ARG_OBJECT_PARAMETER, parsedParamPtr);
+ if (result == TCL_OK) {
+ XOTclParsedParam *ppDefPtr = NEW(XOTclParsedParam);
+ ppDefPtr->paramDefs = parsedParamPtr->paramDefs;
+ ppDefPtr->possibleUnknowns = parsedParamPtr->possibleUnknowns;
+ object->cl->parsedParamPtr = ppDefPtr;
+ }
+ DECR_REF_COUNT(rawConfArgs);
}
- DECR_REF_COUNT(rawConfArgs);
+ } else {
+ result = TCL_OK;
}
}
return result;
Index: generic/xotclInt.h
===================================================================
diff -u -r363468ca6ba6f70121e3b561303a116fa5942992 -rbc2fe454630ac53d4ea617baa30e4ac93fa8fd30
--- generic/xotclInt.h (.../xotclInt.h) (revision 363468ca6ba6f70121e3b561303a116fa5942992)
+++ generic/xotclInt.h (.../xotclInt.h) (revision bc2fe454630ac53d4ea617baa30e4ac93fa8fd30)
@@ -539,8 +539,7 @@
XOTE_EMPTY, XOTE_ONE,
/* methods called internally */
XOTE_CONFIGURE,
- XOTE_DEFAULTMETHOD,
- XOTE_INIT, XOTE_MOVE, XOTE_OBJECTPARAMETER,
+ XOTE_MOVE,
XOTE_RESIDUALARGS,
XOTE_UNKNOWN, XOTE___UNKNOWN,
/* var names */
@@ -562,8 +561,7 @@
"", "1",
/* methods called internally */
"configure",
- "defaultmethod",
- "init", "move", "objectparameter",
+ "move",
"residualargs",
"unknown", "__unknown",
/* var names */