Index: Makefile.in
===================================================================
diff -u -r9f7fa883bf6ed48f1401f815caca1e34f56584a1 -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0
--- Makefile.in (.../Makefile.in) (revision 9f7fa883bf6ed48f1401f815caca1e34f56584a1)
+++ Makefile.in (.../Makefile.in) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0)
@@ -342,28 +342,18 @@
#TESTFLAGS = -srcdir $(srcdir)
test-core: $(TCLSH_PROG)
- $(TCLSH) $(src_test_dir_native)/object-system.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/destroytest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/aliastest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/protected.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/testx.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/testo.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/speedtest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/forwardtest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/mixinoftest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/varresolutiontest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
- $(TCLSH) $(src_test_dir_native)/slottest.xotcl \
- -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/object-system.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/destroytest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/info-method.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/aliastest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/protected.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/testx.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/testo.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/speedtest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/forwardtest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/mixinoftest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/varresolutiontest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
+ $(TCLSH) $(src_test_dir_native)/slottest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS)
test-http: $(TCLSH_PROG)
Index: doc/index.html
===================================================================
diff -u -r9f7fa883bf6ed48f1401f815caca1e34f56584a1 -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0
--- doc/index.html (.../index.html) (revision 9f7fa883bf6ed48f1401f815caca1e34f56584a1)
+++ doc/index.html (.../index.html) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0)
@@ -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':
aliastest.xotcl, destroytest.xotcl, forwardtest.xotcl, mixinoftest.xotcl, o2.xotcl, object-system.xotcl, objparametertest.xotcl, protected.xotcl, slottest.xotcl, speedtest.xotcl, testo.xotcl, testx.xotcl, varresolutiontest.xotcl - Directory './apps/scripts':
adapter.xotcl, adapterExample.xotcl, composite.xotcl, compositeExample.xotcl, observer.xotcl, parameter.xotcl, pinger.xotcl, simpleFilters.xotcl, soccerClub.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':
aliastest.xotcl, destroytest.xotcl, forwardtest.xotcl, info-method.xotcl, mixinoftest.xotcl, o2.xotcl, object-system.xotcl, objparametertest.xotcl, protected.xotcl, slottest.xotcl, speedtest.xotcl, testo.xotcl, testx.xotcl, varresolutiontest.xotcl - Directory './apps/scripts':
adapter.xotcl, adapterExample.xotcl, composite.xotcl, compositeExample.xotcl, observer.xotcl, parameter.xotcl, pinger.xotcl, simpleFilters.xotcl, soccerClub.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/gentclAPI.decls
===================================================================
diff -u -rdb7c710aa3b6386c33af9a318876f21a88b8aafd -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0
--- generic/gentclAPI.decls (.../gentclAPI.decls) (revision db7c710aa3b6386c33af9a318876f21a88b8aafd)
+++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0)
@@ -160,9 +160,6 @@
}
objectMethod noinit XOTclONoinitMethod {
}
-objectMethod parametercmd XOTclOParametercmdMethod {
- {-argName "name" -required 1}
-}
objectMethod procsearch XOTclOProcSearchMethod {
{-argName "name" -required 1}
}
@@ -171,6 +168,9 @@
objectMethod residualargs XOTclOResidualargsMethod {
{-argName "args" -type allargs}
}
+objectMethod setter XOTclOSetterMethod {
+ {-argName "name" -required 1}
+}
objectMethod uplevel XOTclOUplevelMethod {
{-argName "args" -type allargs}
}
@@ -211,9 +211,6 @@
{-argName "mixin" -required 1}
{-argName "guard" -required 1 -type tclobj}
}
-classMethod instparametercmd XOTclCInstParametercmdMethod {
- {-argName "name" -required 1}
-}
classMethod method XOTclCMethodMethod {
{-argName "-inner-namespace" -type switch}
{-argName "-per-object" -type switch}
@@ -224,7 +221,8 @@
{-argName "-precondition" -nrargs 1 -type tclobj}
{-argName "-postcondition" -nrargs 1 -type tclobj}
}
-classMethod instforward XOTclCInstForwardMethod {
+classMethod forward XOTclCForwardMethod {
+ {-argName "-per-object" -type switch}
{-argName "name" -required 1 -type tclobj}
{-argName "-default" -nrargs 1 -type tclobj}
{-argName "-earlybinding"}
@@ -242,7 +240,10 @@
{-argName "name" -required 1 -type tclobj}
{-argName "args" -type allargs}
}
-
+classMethod setter XOTclCSetterMethod {
+ {-argName "-per-object" -type switch}
+ {-argName "name" -required 1}
+}
#
# check methods
#
@@ -263,10 +264,6 @@
{-argName "-definition"}
{-argName "name"}
}
-infoObjectMethod body XOTclObjInfoBodyMethod {
- {-argName "object" -required 1 -type object}
- {-argName "methodName" -required 1}
-}
infoObjectMethod check XOTclObjInfoCheckMethod {
{-argName "object" -required 1 -type object}
}
@@ -277,10 +274,6 @@
infoObjectMethod class XOTclObjInfoClassMethod {
{-argName "object" -required 1 -type object}
}
-infoObjectMethod commands XOTclObjInfoCommandsMethod {
- {-argName "object" -required 1 -type object}
- {-argName "pattern" -required 0}
-}
infoObjectMethod filter XOTclObjInfoFilterMethod {
{-argName "object" -required 1 -type object}
{-argName "-order"}
@@ -302,6 +295,14 @@
infoObjectMethod invar XOTclObjInfoInvarMethod {
{-argName "object" -required 1 -type object}
}
+#### TODO should object methods have -per-object?
+infoObjectMethod method XOTclObjInfoMethodMethod {
+ {-argName "object" -required 1 -type object}
+ {-argName "-per-object"}
+ {-argName "infomethodsubcmd" -type "definition|name|type"}
+ {-argName "name"}
+}
+### TODO should object methods have -per-object?
infoObjectMethod methods XOTclObjInfoMethodsMethod {
{-argName "object" -required 1 -type object}
{-argName "-defined"}
@@ -329,10 +330,6 @@
{-argName "methodName" -required 1}
{-argName "-varNames"}
}
-infoObjectMethod parametercmd XOTclObjInfoParametercmdMethod {
- {-argName "object" -required 1 -type object}
- {-argName "pattern"}
-}
infoObjectMethod post XOTclObjInfoPostMethod {
{-argName "object" -required 1 -type object}
{-argName "methodName" -required 1}
@@ -374,14 +371,6 @@
{-argName "-closure"}
{-argName "pattern" -type objpattern}
}
-infoClassMethod instbody XOTclClassInfoInstbodyMethod {
- {-argName "class" -required 1 -type class}
- {-argName "methodName" -required 1}
-}
-infoClassMethod instcommands XOTclClassInfoInstcommandsMethod {
- {-argName "class" -required 1 -type class}
- {-argName "pattern"}
-}
infoClassMethod instfilter XOTclClassInfoInstfilterMethod {
{-argName "class" -required 1 -type class}
{-argName "-guards"}
@@ -414,10 +403,6 @@
{-argName "-closure"}
{-argName "pattern" -type objpattern}
}
-infoClassMethod instparametercmd XOTclClassInfoInstparametercmdMethod {
- {-argName "class" -required 1 -type class}
- {-argName "pattern"}
-}
infoClassMethod instparams XOTclClassInfoInstparamsMethod {
{-argName "class" -required 1 -type class}
{-argName "methodName" -required 1}
Index: generic/gentclAPI.tcl
===================================================================
diff -u -re767edf5c498094f6e00150541bfb7beab52b619 -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0
--- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision e767edf5c498094f6e00150541bfb7beab52b619)
+++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0)
@@ -264,7 +264,7 @@
char *methodName;
Tcl_ObjCmdProc *proc;
int nrParameters;
- XOTclParam paramDefs[10];
+ XOTclParam paramDefs[11];
} methodDefinition;
static int ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[],
Index: generic/predefined.h
===================================================================
diff -u -rdb7c710aa3b6386c33af9a318876f21a88b8aafd -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0
--- generic/predefined.h (.../predefined.h) (revision db7c710aa3b6386c33af9a318876f21a88b8aafd)
+++ generic/predefined.h (.../predefined.h) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0)
@@ -22,22 +22,12 @@
"Object method defaultmethod {} {::xotcl::self}\n"
"Object method objectparameter {} {;}\n"
"Class method -per-object __unknown {name} {}\n"
-"Object method alias {-per-object:switch methodName -cmd -source-object -source-method -source-per-object:switch} {\n"
-"if {[info exists cmd]} {\n"
-"set cmd [namespace origin $cmd]} elseif {[info exists source-method]} {\n"
-"if {![info exists source-object]} {\n"
-"set source-object [self]} else {\n"
-"set source-object [::xotcl::dispatch ${source-object} -objscope ::xotcl::self]}\n"
-"if {${source-per-object}} {\n"
-"set cmd ${source-object}::$methodName} else {\n"
-"set cmd ::xotcl::classes${source-object}::${source-method}}}\n"
-"if {${per-object} && [::xotcl::is [self] class]} {\n"
-"eval ::xotcl::alias [self] $methodName -per-object $cmd} else {\n"
-"eval ::xotcl::alias [self] $methodName $cmd}}\n"
+"Object method alias {-per-object:switch methodName cmd} {\n"
+"::xotcl::alias [self] $methodName {*}[expr {${per-object} ? \"-per-object\" : \"\"}] $cmd}\n"
"Object create ::xotcl2::objectInfo\n"
"Object create ::xotcl2::classInfo\n"
"::xotcl::dispatch objectInfo -objscope ::eval {\n"
-".alias is -cmd ::xotcl::is\n"
+".alias is ::xotcl::is\n"
".method info {obj} {\n"
"set methods [list]\n"
"foreach name [::xotcl::cmd::ObjectInfo::methods [self] -defined] {\n"
@@ -47,19 +37,19 @@
".method unknown {method obj args} {\n"
"error \"[::xotcl::self] unknown info option \\\"$method\\\"; [$obj info info]\"}}\n"
"::xotcl::dispatch classInfo -objscope ::eval {\n"
-".alias is -cmd ::xotcl::is\n"
-".alias classparent -cmd ::xotcl::cmd::ObjectInfo::parent\n"
-".alias classchildren -cmd ::xotcl::cmd::ObjectInfo::children\n"
-".alias info -source-object objectInfo -source-per-object -source-method info\n"
-".alias unknown -source-object objectInfo -source-per-object -source-method unknown}\n"
+".alias is ::xotcl::is\n"
+".alias classparent ::xotcl::cmd::ObjectInfo::parent\n"
+".alias classchildren ::xotcl::cmd::ObjectInfo::children\n"
+".alias info [::xotcl::cmd::ObjectInfo::method objectInfo -per-object name info]\n"
+".alias unknown [::xotcl::cmd::ObjectInfo::method objectInfo -per-object name info]}\n"
"foreach cmd [info command ::xotcl::cmd::ObjectInfo::*] {\n"
"::xotcl::alias ::xotcl2::objectInfo [namespace tail $cmd] $cmd\n"
"::xotcl::alias ::xotcl2::classInfo [namespace tail $cmd] $cmd}\n"
"foreach cmd [info command ::xotcl::cmd::ClassInfo::*] {\n"
"::xotcl::alias ::xotcl2::classInfo [namespace tail $cmd] $cmd}\n"
"unset cmd\n"
-"Object instforward info -onerror ::xotcl::infoError ::xotcl2::objectInfo %1 {%@2 %self}\n"
-"Class instforward info -onerror ::xotcl::infoError ::xotcl2::classInfo %1 {%@2 %self}\n"
+"Object forward info -onerror ::xotcl::infoError ::xotcl2::objectInfo %1 {%@2 %self}\n"
+"Class forward info -onerror ::xotcl::infoError ::xotcl2::classInfo %1 {%@2 %self}\n"
"proc ::xotcl::infoError msg {\n"
"regsub -all \"