Index: generic/predefined.h =================================================================== diff -u -rf79e2c8697d6f0ae0082c257a65240e815e99ad8 -r46d2807a70f63de0d7b1f30921c4e7c418867652 --- generic/predefined.h (.../predefined.h) (revision f79e2c8697d6f0ae0082c257a65240e815e99ad8) +++ generic/predefined.h (.../predefined.h) (revision 46d2807a70f63de0d7b1f30921c4e7c418867652) @@ -18,7 +18,7 @@ "foreach cmd [info command ::xotcl::cmd::Class::*] {\n" "::xotcl::alias ::xotcl::Class [namespace tail $cmd] $cmd}\n" "::xotcl::Object instproc init args {}\n" -"::xotcl::Object instproc configureargs {} {;}\n" +"::xotcl::Object instproc objinterface {} {;}\n" "::xotcl::Class create ::xotcl::NonposArgs\n" "foreach cmd [info command ::xotcl::cmd::NonposArgs::*] {\n" "::xotcl::alias ::xotcl::NonposArgs [namespace tail $cmd] $cmd}\n" @@ -74,7 +74,7 @@ "eval next -childof $slotobject $args}\n" "::xotcl::MetaSlot create ::xotcl::Slot\n" "::xotcl::MetaSlot invalidateinterfacedefinition\n" -"::xotcl::Object instproc configureargs {} {\n" +"::xotcl::Object instproc objinterface {} {\n" "set arg_list [list]\n" "foreach slot [my info slotobjects] {\n" "set arg \"-[namespace tail $slot]\"\n" Index: generic/predefined.xotcl =================================================================== diff -u -rf79e2c8697d6f0ae0082c257a65240e815e99ad8 -r46d2807a70f63de0d7b1f30921c4e7c418867652 --- generic/predefined.xotcl (.../predefined.xotcl) (revision f79e2c8697d6f0ae0082c257a65240e815e99ad8) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 46d2807a70f63de0d7b1f30921c4e7c418867652) @@ -66,14 +66,17 @@ foreach cmd {array append eval incr lappend trace subst unset} { ::xotcl::alias ::xotcl::Object $cmd -objscope ::$cmd } + # provide the standard command set for ::xotcl::Class foreach cmd [info command ::xotcl::cmd::Class::*] { ::xotcl::alias ::xotcl::Class [namespace tail $cmd] $cmd } # "init" must exist on Object. per default it is empty. ::xotcl::Object instproc init args {} - ::xotcl::Object instproc configureargs {} {;} + # provide a placeholder for the bootup process. The real definition + # is based on slots, which are not available at this point. + ::xotcl::Object instproc objinterface {} {;} # # create class and object for nonpositional argument processing @@ -173,7 +176,7 @@ ::xotcl::MetaSlot create ::xotcl::Slot - # We have no working configureargs yet. So invalidate MetaSlot to + # We have no working objinterface yet. So invalidate MetaSlot to # avoid caching. ::xotcl::MetaSlot invalidateinterfacedefinition @@ -183,8 +186,9 @@ # } #} - # provide the generator for the initialisation argument specification - ::xotcl::Object instproc configureargs {} { + # Provide the a slot based mechanism for building an object + # configuration interface from slot definitions + ::xotcl::Object instproc objinterface {} { set arg_list [list] foreach slot [my info slotobjects] { set arg "-[namespace tail $slot]" @@ -245,7 +249,7 @@ foreach i [$class info instances] { if {![$i exists $att]} {::xotcl::setinstvar $i $att $default} # - # re-run configure to catch slot settings from "configureargs", + # re-run configure to catch slot settings from "objinterface", # such as defaults etc. # TODO: still needed? #$i configure Index: generic/xotcl.c =================================================================== diff -u -rf79e2c8697d6f0ae0082c257a65240e815e99ad8 -r46d2807a70f63de0d7b1f30921c4e7c418867652 --- generic/xotcl.c (.../xotcl.c) (revision f79e2c8697d6f0ae0082c257a65240e815e99ad8) +++ generic/xotcl.c (.../xotcl.c) (revision 46d2807a70f63de0d7b1f30921c4e7c418867652) @@ -10103,7 +10103,7 @@ result = TCL_OK; } else { /* get the string representation of the interface */ - result = callMethod((ClientData) obj, interp, XOTclGlobalObjects[XOTE_CONFIGUREARGS], 2, 0, 0); + result = callMethod((ClientData) obj, interp, XOTclGlobalObjects[XOTE_OBJINTERFACE], 2, 0, 0); if (result == TCL_OK) { rawConfArgs = Tcl_GetObjResult(interp); INCR_REF_COUNT(rawConfArgs); Index: generic/xotclInt.h =================================================================== diff -u -rf79e2c8697d6f0ae0082c257a65240e815e99ad8 -r46d2807a70f63de0d7b1f30921c4e7c418867652 --- generic/xotclInt.h (.../xotclInt.h) (revision f79e2c8697d6f0ae0082c257a65240e815e99ad8) +++ generic/xotclInt.h (.../xotclInt.h) (revision 46d2807a70f63de0d7b1f30921c4e7c418867652) @@ -548,7 +548,7 @@ XOTE_FORMAT, XOTE_INITSLOTS, XOTE_NEWOBJ, XOTE_GUARD_OPTION, XOTE_DEFAULTMETHOD, XOTE___UNKNOWN, XOTE___UNKNOWN__, XOTE_ARGS, XOTE_SPLIT, XOTE_COMMA, - XOTE_CONFIGUREARGS, + XOTE_OBJINTERFACE, /** these are the redefined tcl commands; leave them together at the end */ XOTE_EXPR, XOTE_INFO, XOTE_RENAME, XOTE_SUBST @@ -569,7 +569,7 @@ "format", "initslots", "__#", "-guard", "defaultmethod", "__unknown", "__unknown__", "args", "split", ",", - "configureargs", + "objinterface", "expr", "info", "rename", "subst", }; #endif Index: tests/testx.xotcl =================================================================== diff -u -r17116d26139732f6a75f3133b1edcf68000a604e -r46d2807a70f63de0d7b1f30921c4e7c418867652 --- tests/testx.xotcl (.../testx.xotcl) (revision 17116d26139732f6a75f3133b1edcf68000a604e) +++ tests/testx.xotcl (.../testx.xotcl) (revision 46d2807a70f63de0d7b1f30921c4e7c418867652) @@ -3014,7 +3014,7 @@ ::errorCheck [lsort [b info methods -nocmds]] "abstract contains copy defaultmethod extractConfigureArg f hasclass infoTraceFilter init method move myProc myProc2 myProcMix1 myProcMix2 objproc self setFilter signature" "b info methods -nocmds" - ::errorCheck [lsort [b info methods -noprocs]] "__next append array autoname check class cleanup configure destroy eval exists filter filterguard filtersearch forward incr info instvar invar isclass ismetaclass ismixin isobject istype lappend mixin mixinguard noinit parametercmd proc procsearch requireNamespace set setvalues subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" + ::errorCheck [lsort [b info methods -noprocs]] "__next append array autoname check class cleanup configure destroy eval exists filter filterguard filtersearch forward incr info instvar invar isclass ismetaclass ismixin isobject istype lappend mixin mixinguard noinit objinterface parametercmd proc procsearch requireNamespace set setvalues subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" ::errorCheck [lsort [b info methods -nocmds -nomixins]] "abstract contains copy defaultmethod extractConfigureArg f hasclass infoTraceFilter init method move myProc myProc2 objproc self setFilter signature" "b info methods -nocmds -nomixins" ::errorCheck [b info methods -nocmds -noprocs] "" "b info methods -nocmds -noprocs" @@ -3408,9 +3408,9 @@ set ::context payrollApp - ::errorCheck [lsort [jim info methods]] "__next abstract age append array autoname check class cleanup configure contains copy defaultmethod destroy driving-license eval exists extractConfigureArg filter filterguard filtersearch forward hasclass id incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move name noinit parametercmd print proc procsearch requireNamespace salary self set setvalues signature subst trace unset uplevel upvar volatile vwait" "condmixin all methods" + ::errorCheck [lsort [jim info methods]] "__next abstract age append array autoname check class cleanup configure contains copy defaultmethod destroy driving-license eval exists extractConfigureArg filter filterguard filtersearch forward hasclass id incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move name noinit objinterface parametercmd print proc procsearch requireNamespace salary self set setvalues signature subst trace unset uplevel upvar volatile vwait" "condmixin all methods" - ::errorCheck "[lsort [jim info methods -incontext]]" "__next abstract age append array autoname check class cleanup configure contains copy defaultmethod destroy eval exists extractConfigureArg filter filterguard filtersearch forward hasclass id incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move name noinit parametercmd print proc procsearch requireNamespace salary self set setvalues signature subst trace unset uplevel upvar volatile vwait" "all methods in context" + ::errorCheck "[lsort [jim info methods -incontext]]" "__next abstract age append array autoname check class cleanup configure contains copy defaultmethod destroy eval exists extractConfigureArg filter filterguard filtersearch forward hasclass id incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move name noinit objinterface parametercmd print proc procsearch requireNamespace salary self set setvalues signature subst trace unset uplevel upvar volatile vwait" "all methods in context" ::errorCheck [my show payrollApp jim] "{payrollApp: jim info methods salary => salary} {payrollApp: jim info methods -incontext salary => salary} {payrollApp: jim info methods driv* => driving-license} {payrollApp: jim info methods -incontext driv* => }" "payrollApp jim" ::errorCheck [my show shipmentApp jim] "{shipmentApp: jim info methods salary => salary} {shipmentApp: jim info methods -incontext salary => } {shipmentApp: jim info methods driv* => driving-license} {shipmentApp: jim info methods -incontext driv* => driving-license}" "shipmentApp jim"