Index: TODO =================================================================== diff -u -ra5e11e1cf74cc5432824aaaf3c45cd436a6e072c -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea --- TODO (.../TODO) (revision a5e11e1cf74cc5432824aaaf3c45cd436a6e072c) +++ TODO (.../TODO) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) @@ -1488,6 +1488,8 @@ qualified names). - added tcl-cool as an additional sample-object-system for nsf +- changed internal method name requireNamespace to "require_namespace" + TODO: - remove TCL85STACK_TRACE and TCL85STACK_TRACE - check my for NRE-enabling Index: generic/gentclAPI.decls =================================================================== diff -u -r2fa3f1c596fedf924397e424b532d7f223c8b621 -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 2fa3f1c596fedf924397e424b532d7f223c8b621) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) @@ -17,7 +17,7 @@ # # Next Scripting commands # -nsfCmd __db__yield NsfDebugYiedCmd { +nsfCmd __db_yield NsfDebugYiedCmd { } nsfCmd __db_run_assertions NsfDebugRunAssertionsCmd { } @@ -194,7 +194,7 @@ objectMethod noinit NsfONoinitMethod { } -objectMethod requireNamespace NsfORequireNamespaceMethod { +objectMethod require_namespace NsfORequireNamespaceMethod { } objectMethod residualargs NsfOResidualargsMethod { Index: generic/tclAPI.h =================================================================== diff -u -r2fa3f1c596fedf924397e424b532d7f223c8b621 -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea --- generic/tclAPI.h (.../tclAPI.h) (revision 2fa3f1c596fedf924397e424b532d7f223c8b621) +++ generic/tclAPI.h (.../tclAPI.h) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) @@ -2125,7 +2125,7 @@ {"::nsf::__db_run_assertions", NsfDebugRunAssertionsCmdStub, 0, { } }, -{"::nsf::__db__yield", NsfDebugYiedCmdStub, 0, { +{"::nsf::__db_yield", NsfDebugYiedCmdStub, 0, { } }, {"::nsf::deprecated", NsfDeprecatedCmdStub, 3, { @@ -2261,7 +2261,7 @@ {"::nsf::cmd::Object::noinit", NsfONoinitMethodStub, 0, { } }, -{"::nsf::cmd::Object::requireNamespace", NsfORequireNamespaceMethodStub, 0, { +{"::nsf::cmd::Object::require_namespace", NsfORequireNamespaceMethodStub, 0, { } }, {"::nsf::cmd::Object::residualargs", NsfOResidualargsMethodStub, 1, { Index: library/nx/nx.tcl =================================================================== diff -u -re607595596399193900b411fa551280e7086963a -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea --- library/nx/nx.tcl (.../nx.tcl) (revision e607595596399193900b411fa551280e7086963a) +++ library/nx/nx.tcl (.../nx.tcl) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) @@ -39,7 +39,7 @@ # foreach cmd [info command ::nsf::cmd::Object::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "autoname" "exists" "filterguard" "instvar" "mixinguard" "requireNamespace"]} continue + if {$cmdName in [list "autoname" "exists" "filterguard" "instvar" "mixinguard" "require_namespace"]} continue ::nsf::alias Object $cmdName $cmd } @@ -324,7 +324,7 @@ ::nsf::require_method [::nsf::current object] [lindex $args 0] 0 } namespace { - ::nsf::dispatch [::nsf::current object] ::nsf::cmd::Object::requireNamespace + ::nsf::dispatch [::nsf::current object] ::nsf::cmd::Object::require_namespace } } } @@ -1280,7 +1280,7 @@ if {![info exists object]} {set object [::nsf::current object]} if {![::nsf::isobject $object]} {$class create $object} # reused in XOTcl, no "require" there, so use nsf primitiva - ::nsf::dispatch $object ::nsf::cmd::Object::requireNamespace + ::nsf::dispatch $object ::nsf::cmd::Object::require_namespace if {$withnew} { set m [ScopedNew new -volatile \ -container $object -withclass $class] @@ -1376,7 +1376,7 @@ ::nsf::relation $obj object-mixin [::nsf::relation $origin object-mixin] # reused in XOTcl, no "require" there, so use nsf primitiva if {[::nsf::dispatch $origin ::nsf::cmd::ObjectInfo::hasnamespace]} { - ::nsf::dispatch $obj ::nsf::cmd::Object::requireNamespace + ::nsf::dispatch $obj ::nsf::cmd::Object::require_namespace } } else { namespace eval $dest {} Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r8e08d180ae5161c0ef4410ba3fda6b4de613a391 -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 8e08d180ae5161c0ef4410ba3fda6b4de613a391) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) @@ -71,7 +71,7 @@ # provide the standard command set for ::xotcl::Object foreach cmd [info command ::nsf::cmd::Object::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "setter"]} continue + if {$cmdName in [list "setter" "require_namespace"]} continue ::nsf::alias Object $cmdName $cmd } @@ -234,6 +234,8 @@ ::nsf::alias Object mixinguard ::nsf::cmd::Object::mixinguard ::nsf::alias Class instmixinguard ::nsf::cmd::Class::mixinguard + ::nsf::alias Object requireNamespace ::nsf::cmd::Object::require_namespace + # define instproc and proc ::nsf::method Class instproc { name arguments body precondition:optional postcondition:optional @@ -714,7 +716,7 @@ ::nsf::alias ::xotcl::Class -per-object __unknown ::nx::Class::__unknown proc myproc {args} {linsert $args 0 [::xotcl::self]} - proc myvar {var} {.requireNamespace; return [::xotcl::self]::$var} + proc myvar {var} {:requireNamespace; return [::xotcl::self]::$var} Object create ::xotcl::config config proc load {obj file} {