Index: doc/migration1-2.html =================================================================== diff -u -r2053d3641bf7135e0341790cb2e5153a9167f30d -r25de23e98a24210b149179c5d1f52836a65fddab --- doc/migration1-2.html (.../migration1-2.html) (revision 2053d3641bf7135e0341790cb2e5153a9167f30d) +++ doc/migration1-2.html (.../migration1-2.html) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -177,7 +177,7 @@ someObject instvar newVar
set newVar value
- ::xotcl::instvar -object someObject newVar
+ ::xotcl::importvar someObject newVar
set newVar value @@ -197,5 +197,5 @@
- Last modified: Fri Jan 1 18:19:12 CET 2010 + Last modified: Sat Jan 2 15:04:41 CET 2010 Index: generic/gentclAPI.decls =================================================================== diff -u -rb62dcaa16d03cd56d95a75f493cbd0de0fb5c60b -r25de23e98a24210b149179c5d1f52836a65fddab --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision b62dcaa16d03cd56d95a75f493cbd0de0fb5c60b) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -51,8 +51,8 @@ {-argName "name"} {-argName "args" -type allargs} } -xotclCmd instvar XOTclInstvarCmd { - {-argName "-object" -nrargs 1 -type object} +xotclCmd importvar XOTclImportvarCmd { + {-argName "object" -type object} {-argName "args" -type args} } xotclCmd is XOTclIsCmd { Index: generic/predefined.h =================================================================== diff -u -rf9807b1cea03590c9573b5a521760538d53ee90f -r25de23e98a24210b149179c5d1f52836a65fddab --- generic/predefined.h (.../predefined.h) (revision f9807b1cea03590c9573b5a521760538d53ee90f) +++ generic/predefined.h (.../predefined.h) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -378,7 +378,7 @@ "inobject}\n" "::xotcl::ScopedNew method init {} {\n" ".public method new {-childof args} {\n" -"::xotcl::instvar -object [::xotcl::self class] {inobject object} withclass\n" +"::xotcl::importvar [::xotcl::self class] {inobject object} withclass\n" "if {![::xotcl::is $object object]} {\n" "$withclass create $object}\n" "eval ::xotcl::next -childof $object $args}}\n" @@ -436,7 +436,7 @@ "::eval $po configure [lrange $arg 1 end]\n" "if {[$po exists extra] || [$po exists setter] ||\n" "[$po exists getter] || [$po exists access]} {\n" -"::xotcl::instvar -object $po extra setter getter access defaultParam\n" +"::xotcl::importvar $po extra setter getter access defaultParam\n" "if {![info exists extra]} {set extra \"\"}\n" "if {![info exists defaultParam]} {set defaultParam \"\"}\n" "if {![info exists setter]} {set setter set}\n" Index: generic/predefined.xotcl =================================================================== diff -u -rf9807b1cea03590c9573b5a521760538d53ee90f -r25de23e98a24210b149179c5d1f52836a65fddab --- generic/predefined.xotcl (.../predefined.xotcl) (revision f9807b1cea03590c9573b5a521760538d53ee90f) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -722,7 +722,7 @@ ::xotcl::ScopedNew method init {} { .public method new {-childof args} { - ::xotcl::instvar -object [::xotcl::self class] {inobject object} withclass + ::xotcl::importvar [::xotcl::self class] {inobject object} withclass if {![::xotcl::is $object object]} { $withclass create $object } @@ -812,7 +812,7 @@ if {[$po exists extra] || [$po exists setter] || [$po exists getter] || [$po exists access]} { - ::xotcl::instvar -object $po extra setter getter access defaultParam + ::xotcl::importvar $po extra setter getter access defaultParam if {![info exists extra]} {set extra ""} if {![info exists defaultParam]} {set defaultParam ""} if {![info exists setter]} {set setter set} Index: generic/tclAPI.h =================================================================== diff -u -rfcf06c1f38122e0058d3092a3efa9f01d1e7ce04 -r25de23e98a24210b149179c5d1f52836a65fddab --- generic/tclAPI.h (.../tclAPI.h) (revision fcf06c1f38122e0058d3092a3efa9f01d1e7ce04) +++ generic/tclAPI.h (.../tclAPI.h) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -171,7 +171,7 @@ static int XOTclDotCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclFinalizeObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclGetSelfObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclInstvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclImportvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclInterpObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclIsCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclMethodPropertyCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -258,7 +258,7 @@ static int XOTclDotCmd(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); static int XOTclFinalizeObjCmd(Tcl_Interp *interp); static int XOTclGetSelfObjCmd(Tcl_Interp *interp, int selfoption); -static int XOTclInstvarCmd(Tcl_Interp *interp, XOTclObject *withObject, int nobjc, Tcl_Obj *CONST nobjv[]); +static int XOTclImportvarCmd(Tcl_Interp *interp, XOTclObject *object, int nobjc, Tcl_Obj *CONST nobjv[]); static int XOTclInterpObjCmd(Tcl_Interp *interp, char *name, int objc, Tcl_Obj *CONST objv[]); static int XOTclIsCmd(Tcl_Interp *interp, Tcl_Obj *object, int objectkind, Tcl_Obj *value); static int XOTclMethodPropertyCmd(Tcl_Interp *interp, XOTclObject *object, Tcl_Obj *methodName, int withPer_object, int methodproperty, Tcl_Obj *value); @@ -346,7 +346,7 @@ XOTclDotCmdIdx, XOTclFinalizeObjCmdIdx, XOTclGetSelfObjCmdIdx, - XOTclInstvarCmdIdx, + XOTclImportvarCmdIdx, XOTclInterpObjCmdIdx, XOTclIsCmdIdx, XOTclMethodPropertyCmdIdx, @@ -1863,19 +1863,19 @@ } static int -XOTclInstvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { +XOTclImportvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], - method_definitions[XOTclInstvarCmdIdx].paramDefs, - method_definitions[XOTclInstvarCmdIdx].nrParameters, + method_definitions[XOTclImportvarCmdIdx].paramDefs, + method_definitions[XOTclImportvarCmdIdx].nrParameters, &pc) != TCL_OK) { return TCL_ERROR; } else { - XOTclObject *withObject = (XOTclObject *)pc.clientData[0]; + XOTclObject *object = (XOTclObject *)pc.clientData[0]; parseContextRelease(&pc); - return XOTclInstvarCmd(interp, withObject, objc-pc.lastobjc, objv+pc.lastobjc); + return XOTclImportvarCmd(interp, object, objc-pc.lastobjc, objv+pc.lastobjc); } } @@ -2406,8 +2406,8 @@ {"::xotcl::self", XOTclGetSelfObjCmdStub, 1, { {"selfoption", 0, 0, convertToSelfoption}} }, -{"::xotcl::instvar", XOTclInstvarCmdStub, 2, { - {"-object", 0, 1, convertToObject}, +{"::xotcl::importvar", XOTclImportvarCmdStub, 2, { + {"object", 0, 0, convertToObject}, {"args", 0, 0, convertToNothing}} }, {"::xotcl::interp", XOTclInterpObjCmdStub, 2, { Index: generic/xotcl.c =================================================================== diff -u -rf4cb2e4e7480820bada88c519980cfb0a4d3f1be -r25de23e98a24210b149179c5d1f52836a65fddab --- generic/xotcl.c (.../xotcl.c) (revision f4cb2e4e7480820bada88c519980cfb0a4d3f1be) +++ generic/xotcl.c (.../xotcl.c) (revision 25de23e98a24210b149179c5d1f52836a65fddab) @@ -10571,10 +10571,7 @@ static int GetInstvarsIntoCurrentScope(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); static int -XOTclInstvarCmd(Tcl_Interp *interp, XOTclObject *object, int objc, Tcl_Obj *CONST objv[]) { - if (object == NULL) object = GetSelfObj(interp); - if (!object) - return XOTclVarErrMsg(interp, "instvar: no current object", (char *) NULL); +XOTclImportvarCmd(Tcl_Interp *interp, XOTclObject *object, int objc, Tcl_Obj *CONST objv[]) { return GetInstvarsIntoCurrentScope(interp, object, objc, objv); }