Index: Makefile.in =================================================================== diff -u -rb75c46b9676c6aeff6a95a12f8cafeb420530751 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- Makefile.in (.../Makefile.in) (revision b75c46b9676c6aeff6a95a12f8cafeb420530751) +++ Makefile.in (.../Makefile.in) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -242,7 +242,7 @@ $(target_doc_dir)/langRef-xotcl.html: $(src_lib_dir)/xotcl/doc/langRef.xotcl $(XOTCL_DOC_SOURCE) @docs=""; \ for i in $(XOTCL_DOC_SOURCE); do docs="$$docs `@CYGPATH@ $$i`"; done; \ - $(TCLSH) $(src_lib_dir_native)/lib/makeDoc.xotcl \ + $(TCLSH) $(src_lib_dir)/xotcl/library/lib/makeDoc.xotcl \ $(target_doc_dir) $$docs pdf: Index: TODO =================================================================== diff -u -rb75c46b9676c6aeff6a95a12f8cafeb420530751 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- TODO (.../TODO) (revision b75c46b9676c6aeff6a95a12f8cafeb420530751) +++ TODO (.../TODO) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -952,6 +952,7 @@ - added new Makefile target test-xotcl - finished test migration for now +- deactivated __next for now TODO: - nameing @@ -1007,6 +1008,7 @@ TODO "Kleinigkeiten" +- integrate ::nx::doc::make with Makefile.in - decide on syntax in documentation (info method parameter | info method parametersyntax | mixture) - decide on paths for documentation of next and xotcl 2, with Index: doc/index.html =================================================================== diff -u -r183ec0e7c071586238bf5ed90a05dbbda91d4582 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- doc/index.html (.../index.html) (revision 183ec0e7c071586238bf5ed90a05dbbda91d4582) +++ doc/index.html (.../index.html) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -23,7 +23,7 @@

Index: doc/xo-daemon.html =================================================================== diff -u -r46f02e4868e118466d888b35d6b281b3f2ba31ac -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- doc/xo-daemon.html (.../xo-daemon.html) (revision 46f02e4868e118466d888b35d6b281b3f2ba31ac) +++ doc/xo-daemon.html (.../xo-daemon.html) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -2,23 +2,23 @@ - XOTcl - Documentation -- ./apps/utils/xo-daemon + XOTcl - Documentation -- ./library/xotcl/apps/utils/xo-daemon

- ./apps/utils/xo-daemon - ./apps/utils/xo-daemon

+ ./library/xotcl/apps/utils/xo-daemon + ./library/xotcl/apps/utils/xo-daemon

Package/File Information

No package provided/required

Filename: - - ./apps/utils/xo-daemon + + ./library/xotcl/apps/utils/xo-daemon

Index: doc/xo-whichPkg.html =================================================================== diff -u -r46f02e4868e118466d888b35d6b281b3f2ba31ac -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 46f02e4868e118466d888b35d6b281b3f2ba31ac) +++ doc/xo-whichPkg.html (.../xo-whichPkg.html) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -2,23 +2,23 @@ - XOTcl - Documentation -- ./apps/utils/xo-whichPkg + XOTcl - Documentation -- ./library/xotcl/apps/utils/xo-whichPkg

- ./apps/utils/xo-whichPkg - ./apps/utils/xo-whichPkg

+ ./library/xotcl/apps/utils/xo-whichPkg + ./library/xotcl/apps/utils/xo-whichPkg

Package/File Information

No package provided/required

Filename: - - ./apps/utils/xo-whichPkg + + ./library/xotcl/apps/utils/xo-whichPkg

Index: generic/gentclAPI.decls =================================================================== diff -u -rf62c1f601dda43d69c8b159e81b57d4271cd3175 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision f62c1f601dda43d69c8b159e81b57d4271cd3175) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -454,10 +454,11 @@ {-argName "mixin" -required 1} {-argName "guard" -required 1 -type tclobj} } -objectMethod __next XOTclONextMethod { - {-argName "args" -type allargs} -} +# objectMethod __next XOTclONextMethod { +# {-argName "args" -type allargs} +#} + # @method ::nx::Object#mixinguard # # @param mixin Index: generic/predefined.h =================================================================== diff -u -rf62c1f601dda43d69c8b159e81b57d4271cd3175 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- generic/predefined.h (.../predefined.h) (revision f62c1f601dda43d69c8b159e81b57d4271cd3175) +++ generic/predefined.h (.../predefined.h) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -27,7 +27,7 @@ "foreach cmd [info command ::nx::core::cmd::Class::*] {\n" "set cmdName [namespace tail $cmd]\n" "::nx::core::alias Class $cmdName $cmd}\n" -"foreach cmd [list __next cleanup noinit residualargs uplevel upvar] {\n" +"foreach cmd [list cleanup noinit residualargs uplevel upvar] {\n" "::nx::core::methodproperty Object $cmd protected 1}\n" "foreach cmd [list recreate] {\n" "::nx::core::methodproperty Class $cmd protected 1}\n" Index: generic/predefined.tcl =================================================================== diff -u -r79287f596cc2c14ecd2b788d217699e2baeb050d -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- generic/predefined.tcl (.../predefined.tcl) (revision 79287f596cc2c14ecd2b788d217699e2baeb050d) +++ generic/predefined.tcl (.../predefined.tcl) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -56,7 +56,8 @@ } # set a few aliases as protected - foreach cmd [list __next cleanup noinit residualargs uplevel upvar] { + # "__next", if defined, should be added as well + foreach cmd [list cleanup noinit residualargs uplevel upvar] { ::nx::core::methodproperty Object $cmd protected 1 } Index: generic/tclAPI.h =================================================================== diff -u -r8aaec98df564488dc8540cd078d6a32dd55a08f7 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- generic/tclAPI.h (.../tclAPI.h) (revision 8aaec98df564488dc8540cd078d6a32dd55a08f7) +++ generic/tclAPI.h (.../tclAPI.h) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -190,7 +190,6 @@ static int XOTclOFilterSearchMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclOInstVarMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclOMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclONextMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclONoinitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclORequireNamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclOResidualargsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -270,7 +269,6 @@ static int XOTclOFilterSearchMethod(Tcl_Interp *interp, XOTclObject *obj, CONST char *filter); static int XOTclOInstVarMethod(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); static int XOTclOMixinGuardMethod(Tcl_Interp *interp, XOTclObject *obj, CONST char *mixin, Tcl_Obj *guard); -static int XOTclONextMethod(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); static int XOTclONoinitMethod(Tcl_Interp *interp, XOTclObject *obj); static int XOTclORequireNamespaceMethod(Tcl_Interp *interp, XOTclObject *obj); static int XOTclOResidualargsMethod(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); @@ -351,7 +349,6 @@ XOTclOFilterSearchMethodIdx, XOTclOInstVarMethodIdx, XOTclOMixinGuardMethodIdx, - XOTclONextMethodIdx, XOTclONoinitMethodIdx, XOTclORequireNamespaceMethodIdx, XOTclOResidualargsMethodIdx, @@ -1329,16 +1326,6 @@ } static int -XOTclONextMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - XOTclObject *obj = (XOTclObject *)clientData; - if (!obj) return XOTclObjErrType(interp, objv[0], "Object", ""); - - - return XOTclONextMethod(interp, obj, objc, objv); - -} - -static int XOTclONoinitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; XOTclObject *obj = (XOTclObject *)clientData; @@ -2156,9 +2143,6 @@ {"mixin", 1, 0, convertToString}, {"guard", 1, 0, convertToTclobj}} }, -{"::nx::core::cmd::Object::__next", XOTclONextMethodStub, 1, { - {"args", 0, 0, convertToNothing}} -}, {"::nx::core::cmd::Object::noinit", XOTclONoinitMethodStub, 0, { } }, Index: generic/xotcl.c =================================================================== diff -u -rf62c1f601dda43d69c8b159e81b57d4271cd3175 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- generic/xotcl.c (.../xotcl.c) (revision f62c1f601dda43d69c8b159e81b57d4271cd3175) +++ generic/xotcl.c (.../xotcl.c) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -12853,6 +12853,7 @@ mixin, " on ", objectName(object), (char *) NULL); } +#if 0 /* method for calling e.g. $obj __next */ static int XOTclONextMethod(Tcl_Interp *interp, XOTclObject *object, int objc, Tcl_Obj *CONST objv[]) { XOTclCallStackContent *cscPtr = CallStackGetObjectFrame(interp, object); @@ -12862,8 +12863,10 @@ return XOTclVarErrMsg(interp, "__next: can't find object", objectName(object), (char *) NULL); methodName = (char *)Tcl_GetCommandName(interp, cscPtr->cmdPtr); + /* fprintf(stderr, "methodName %s\n", methodName);*/ return XOTclNextMethod(object, interp, cscPtr->cl, methodName, objc-1, &objv[1], 0, NULL); } +#endif static int XOTclONoinitMethod(Tcl_Interp *interp, XOTclObject *object) { object->flags |= XOTCL_INIT_CALLED; Index: library/xotcl/tests/testx.xotcl =================================================================== diff -u -rf3b7952aabc9e4f9079febd1f5b7f5fb833fd50c -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision f3b7952aabc9e4f9079febd1f5b7f5fb833fd50c) +++ library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -3122,11 +3122,11 @@ ::errorCheck [b info procs] objproc "info procs" ::errorCheck [B info instprocs] myProc2 "info instprocs" - ::errorCheck [lsort [b info methods]] "__next abstract append array autoname check class cleanup configure contains copy defaultmethod destroy eval exists extractConfigureArg f filter filterguard filtersearch forward hasclass incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move myProc myProc2 myProcMix1 myProcMix2 noinit objectparameter objproc parametercmd proc procsearch requireNamespace residualargs self set setFilter signature subst trace unknown unset uplevel upvar volatile vwait" "b info methods" + ::errorCheck [lsort [b info methods]] "abstract append array autoname check class cleanup configure contains copy defaultmethod destroy eval exists extractConfigureArg f filter filterguard filtersearch forward hasclass incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move myProc myProc2 myProcMix1 myProcMix2 noinit objectparameter objproc parametercmd proc procsearch requireNamespace residualargs self set setFilter signature subst trace unknown unset uplevel upvar volatile vwait" "b info methods" ::errorCheck [lsort [b info methods -nocmds]] "abstract check extractConfigureArg f filtersearch hasclass init isclass ismetaclass ismixin isobject istype method myProc myProc2 myProcMix1 myProcMix2 objectparameter objproc proc procsearch self setFilter signature unknown" "b info methods -nocmds" - ::errorCheck [lsort [b info methods -noprocs]] "__next append array autoname class cleanup configure destroy eval exists filter filterguard forward incr info instvar invar lappend mixin mixinguard noinit requireNamespace residualargs set subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" + ::errorCheck [lsort [b info methods -noprocs]] "append array autoname class cleanup configure destroy eval exists filter filterguard forward incr info instvar invar lappend mixin mixinguard noinit requireNamespace residualargs set subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" ::errorCheck [lsort [b info methods -nocmds -nomixins]] "abstract check extractConfigureArg f filtersearch hasclass init isclass ismetaclass ismixin isobject istype method myProc myProc2 objectparameter objproc proc procsearch self setFilter signature unknown" "b info methods -nocmds -nomixins" ::errorCheck [b info methods -nocmds -noprocs] "" "b info methods -nocmds -noprocs" @@ -3521,9 +3521,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 objectparameter parametercmd print proc procsearch requireNamespace residualargs salary self set signature subst trace unknown unset uplevel upvar volatile vwait" "condmixin all methods" + ::errorCheck [lsort [jim info methods]] "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 objectparameter parametercmd print proc procsearch requireNamespace residualargs salary self set signature subst trace unknown 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 objectparameter parametercmd print proc procsearch requireNamespace residualargs salary self set signature subst trace unknown unset uplevel upvar volatile vwait" "all methods in context" + ::errorCheck "[lsort [jim info methods -incontext]]" "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 objectparameter parametercmd print proc procsearch requireNamespace residualargs salary self set signature subst trace unknown 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" Index: tests/doc.tcl =================================================================== diff -u -r8aaec98df564488dc8540cd078d6a32dd55a08f7 -r8f2c993e02fe43f23c7e1653d05f6e298c23b2b2 --- tests/doc.tcl (.../doc.tcl) (revision 8aaec98df564488dc8540cd078d6a32dd55a08f7) +++ tests/doc.tcl (.../doc.tcl) (revision 8f2c993e02fe43f23c7e1653d05f6e298c23b2b2) @@ -557,8 +557,10 @@ Test case issues? { # TODO: is [autoname -instance] really needed? + # is autoname needed in Next Scripting? # TODO: why is XOTclNextObjCmd/::nx::core::next not in gentclAPI.decls? + # why should it be there? there are pros and cons, and very little benefit, or? # TODO: where to locate the @ comments (in predefined.xotcl, in # gentclAPI.decls)? how to deal with ::nx::core::* vs. ::nx::* @@ -569,54 +571,152 @@ # TODO: Object->cleanup() said: "Resets an object or class into an # initial state, as after construction." If by construction it means # after create(), then cleanup() is missing a configure() call to - # set defaults, etc! + # set defaults, etc! + # ?? cleanup does not set defaults; depending on "softrecreate", it + # deletes instances, childobjects, procs, instprocs, .... # TODO: exists and bestandteil von info() oder selbstständig? # ausserdem: erlauben von :-präfix?! + # we have discussed this already + # TODO: should we keep a instvar variant (i support this!) + # what means "keep". next scripting should be mininmal, + # "instvar" is not needed and error-prone. We have now + # "::nx::var import" and ::nx::core::importvar + # (of you want, similar to variable or global). + # TODO: verify the use of filtersearch()? should it return a method # handle and the filter name? how to deal with it when refactoring # procsearch()? + # ?? what does it return? What is the issue? + # TODO: mixinguard doc is missing in old doc + # mixinguard is described in the tutorial, it should have been documented + # in the langref as well + # TODO: what is Object->__next() for? + # See the following script: + # + +# Object instproc defaultmethod {} {puts "[self proc]"; return [self]} +# Class A +# A instproc defaultmethod {} {puts "[self proc]"; [::xotcl::my info parent] __next} +# Class D -instproc t {} {puts "my stuff"} +# D create d1 +# puts [d1 t] +# ### we create a subobject named t, which shadows effectively D->t +# A create d1::t +# puts === +# # when we call "d1 t", we effectively call "d1::t", which calls "default method". +# # the defaultmethod should do a next on object d1. +# puts [d1 t] +# puts ===EXIT + + # but seems - at least in this usecase broken. Deactivated + # in source for now. + # TODO: what to do with hasNamespace()? [Object info is namespace]? + # what is wrong with ":info hashNamespace"? + # TODO: why is XOTclOUplevelMethodStub/XOTclOUplevelMethod defined # with "args" while it logically uses the stipulated parameter # signature (level ...). is this because of the first pos, optional # parameter? ... same goes for upvar() ... + # the logic is a tribute to the argument logic in Tcl, which complex. + # uplevel ?level? arg ?arg ...? + # It is a combination between an optional first argument and + # and an args logic. + # + # Most likely, it could be partly solved with a logic for optional + # first arguments (if the number of actual arguments is + # higher than the minimal number of arguments, one could fill optional + # paramter up..... but this calculation requires as well the interactions + # with nonpos arguments, which might be values for positional arguments + # as well.... not, sure, it is worth to invest much time here. + # TODO: is Object->uplevel still needed with an integrated cs management? + # yes, this is completely unrelated with the kind of callstack implemtation. + # the methods upvar and uplevel are interceptor transparent, which means + # that an uplevel will work for a method the same way, when a mixin or filter + # are registered. + # TODO: how is upvar affected by the ":"-prefixing? -> AVOID_RESOLVERS ... + + # this is a tcl question, maybe version dependent. # TODO: do all member-creating operations return valid, canonical handles! + # what are member-creating operations? if you mean "method-creating methods" + # they should (in next scripting) (i.e. necessary for e.g. method modifiers). + # TODO: the objectsystems subcommand of ::nx::core::configure does # not really fit in there because it does not allow for configuring # anything. it is a mere introspection-only command. relocate (can # we extend standard [info] somehow, i.e., [info objectsystems] + # what means "configuring anything"? + # maybe you are refering to "configure objectsystems" which is parked there. + # there would be an option to change the internally called methods via + # configure as well, but i think, one is asking for troubles by allowing + # this. + # extending info is possible via the shadowcommands, but the tct + # does not like it. + # + # ad configure: we could fold as well methodproperty and + # objectproperty into configure since these allow as well setting + # and querying.... + # + # configure method METHODHANDLE public + # configure object OBJECT metaclass + # + # but there, the object property is just for quering. + # Another option is define and "info" + # + # ::nx::core::info object OBJECT metaclass + # ::nx::core::info objectsystems + # + # but if we would fold these into tcl-info, conflicts with + # tcl will arise. + # TODO: extend [info level] & [info frame]! + # + # Why and what exactly? + # If we would do it the tcloo-way, it would be very expensive. + # whe have "info frame" implemnted with a less expensive approach since March 1 # TODO: there is still --noArgs on [next], which does not correspond # to single-dashed flags used elsewhere. Why? + # + # (a) backward compatibility and (b) dow you have suggestions? # TODO: renaming of self to current? + # + # what do you mean by "renaming"? + # maybe we should not import "self" into next scripting. # TODO: is [self callingclass] == [[self callingobject] info class]? + # + # no # TODO: "# @subcommand next Returns the name of the method next on # the precedence path as a string" shouldn't these kinds of # introspective commands return method handles (in the sense of # alias)? Retrieving the name from a handle is the more specific # operation (less generic). ... same for "filterreg" - + # + # this is most likely "self next" and "self filterreg". + # there are already changes to xotcl (see migration guide). + # since the handle works now as well for "info method", + # this could be effectively done, but it requires + # backward compatibility. } if {$log} {