Index: TODO =================================================================== diff -u -r3e2056578f71e9fb14f5c1ee35a9d626747eb285 -r537b7cd99b6bc0a28b0f73c2691e08b8bd319147 --- TODO (.../TODO) (revision 3e2056578f71e9fb14f5c1ee35a9d626747eb285) +++ TODO (.../TODO) (revision 537b7cd99b6bc0a28b0f73c2691e08b8bd319147) @@ -3935,6 +3935,14 @@ be used in connection with slotassign - added regression test for slot.initialize +nsf.c: +- pass property name to slot "initialize" method to conform + with the interface to "assign", "get" ... (all these receive + the property name as well) +- allow slot "initialize" method to be protected + (handled similarly to "init") + + ======================================================================== TODO: Index: generic/nsf.c =================================================================== diff -u -r3e2056578f71e9fb14f5c1ee35a9d626747eb285 -r537b7cd99b6bc0a28b0f73c2691e08b8bd319147 --- generic/nsf.c (.../nsf.c) (revision 3e2056578f71e9fb14f5c1ee35a9d626747eb285) +++ generic/nsf.c (.../nsf.c) (revision 537b7cd99b6bc0a28b0f73c2691e08b8bd319147) @@ -21363,8 +21363,12 @@ NsfObject *slotObject = GetSlotObject(interp, paramPtr->slotObj); if (likely(slotObject != NULL)) { + Tcl_Obj *ov[1]; + + ov[0] = paramPtr->nameObj; result = NsfCallMethodWithArgs(interp, (Nsf_Object *)slotObject, NsfGlobalObjs[NSF_INITIALIZE], - object->cmdName, 1, NULL, NSF_CSC_IMMEDIATE); + object->cmdName, 2, ov, + NSF_CSC_IMMEDIATE|NSF_CM_IGNORE_PERMISSIONS); } if (result != TCL_OK) { /* @@ -21503,7 +21507,8 @@ Tcl_ResetResult(interp); result = NsfCallMethodWithArgs(interp, (Nsf_Object*)object, methodObj, - ov0, oc, ovPtr, NSF_CSC_IMMEDIATE); + ov0, oc, ovPtr, + NSF_CSC_IMMEDIATE|NSF_CM_IGNORE_PERMISSIONS); } } else /* must be NSF_ARG_FORWARD */ { Tcl_Obj *forwardSpec = paramPtr->method ? paramPtr->method : NULL; /* different default? */ Index: tests/parameters.test =================================================================== diff -u -r3e2056578f71e9fb14f5c1ee35a9d626747eb285 -r537b7cd99b6bc0a28b0f73c2691e08b8bd319147 --- tests/parameters.test (.../parameters.test) (revision 3e2056578f71e9fb14f5c1ee35a9d626747eb285) +++ tests/parameters.test (.../parameters.test) (revision 537b7cd99b6bc0a28b0f73c2691e08b8bd319147) @@ -2400,7 +2400,7 @@ ? {nx::Class create Foo { :property bar { - :public method initialize { object } { + :public method initialize { object property } { incr ::slotcalls 1 } }} Index: tests/varresolution.test =================================================================== diff -u -rf0f51c24f9e80aa5d0b6a20da9afd37339aab02e -r537b7cd99b6bc0a28b0f73c2691e08b8bd319147 --- tests/varresolution.test (.../varresolution.test) (revision f0f51c24f9e80aa5d0b6a20da9afd37339aab02e) +++ tests/varresolution.test (.../varresolution.test) (revision 537b7cd99b6bc0a28b0f73c2691e08b8bd319147) @@ -1151,7 +1151,7 @@ # (lambda frames) # -::nx::Test case foo { +::nx::Test case var-resolver-uplevel-apply { nx::Object create o1 { set :a o1.a