Index: generic/predefined.h =================================================================== diff -u -r7050a52ac53992d9a3aec12e48b0fa58a26449e6 -r9258921e23a23575d69276bfe1e6afe7ba80ce74 --- generic/predefined.h (.../predefined.h) (revision 7050a52ac53992d9a3aec12e48b0fa58a26449e6) +++ generic/predefined.h (.../predefined.h) (revision 9258921e23a23575d69276bfe1e6afe7ba80ce74) @@ -13,7 +13,7 @@ "set cmdName [namespace tail $cmd]\n" "if {$cmdName in [list \"class-method\"]} continue\n" "::xotcl::alias Class $cmdName $cmd}\n" -"foreach cmd [list __next cleanup noinit residualargs] {\n" +"foreach cmd [list __next cleanup noinit residualargs uplevel upvar] {\n" "::xotcl::methodproperty Object $cmd protected 1}\n" "foreach cmd [list recreate] {\n" "::xotcl::methodproperty Class $cmd protected 1}\n" @@ -47,7 +47,8 @@ "return [::xotcl::dispatch [self] ::xotcl::cmd::Object::$what {*}$args]}}\n" ".method unknown {m args} {\n" "error \"Method '$m' unknown for [self].\\\n" -"Consider '[self] create $m $args' instead of '[self] $m $args'\"}}\n" +"Consider '[self] create $m $args' instead of '[self] $m $args'\"}\n" +"::xotcl::methodproperty [self] unknown protected 1}\n" "::xotcl::dispatch Object -objscope ::eval {\n" ".method public {args} {\n" "set p [lsearch -regexp $args {^(method|alias|forward|setter)$}]\n" @@ -61,7 +62,7 @@ "set r [{*}.$args]\n" "::xotcl::methodproperty [self] $r [self proc] true\n" "return $r}\n" -".method unknown {m args} {\n" +".protected method unknown {m args} {\n" "if {![self isnext]} {\n" "error \"[self]: unable to dispatch method '$m'\"}}\n" ".protected method init args {}\n" Index: generic/predefined.xotcl =================================================================== diff -u -r7050a52ac53992d9a3aec12e48b0fa58a26449e6 -r9258921e23a23575d69276bfe1e6afe7ba80ce74 --- generic/predefined.xotcl (.../predefined.xotcl) (revision 7050a52ac53992d9a3aec12e48b0fa58a26449e6) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 9258921e23a23575d69276bfe1e6afe7ba80ce74) @@ -35,7 +35,7 @@ } # set a few aliases as protected - foreach cmd [list __next cleanup noinit residualargs] { + foreach cmd [list __next cleanup noinit residualargs uplevel upvar] { ::xotcl::methodproperty Object $cmd protected 1 } foreach cmd [list recreate] { @@ -94,9 +94,11 @@ error "Method '$m' unknown for [self].\ Consider '[self] create $m $args' instead of '[self] $m $args'" } - + # protected is not jet defined + ::xotcl::methodproperty [self] unknown protected 1 } + ::xotcl::dispatch Object -objscope ::eval { # method modifier "public" @@ -118,7 +120,7 @@ } # unknown handler for Object - .method unknown {m args} { + .protected method unknown {m args} { if {![self isnext]} { error "[self]: unable to dispatch method '$m'" } @@ -137,7 +139,7 @@ # The method __unknown is called in cases, where we try to resolve # an unkown class. one could define a custom resolver with this name - # to load the class on the fly. After the call to __unknwn, XOTcl + # to load the class on the fly. After the call to __unknown, XOTcl # tries to resolve the class again. This meachnism is used e.g. by # the ::ttrace mechanism for partial loading by Zoran. #