Index: generic/predefined.xotcl =================================================================== diff -u -r62a9d39ecd1f540f08c895175a7f085cfb4ae845 -r68e773f0a21300bd799c60fefc76f696fd230ca0 --- generic/predefined.xotcl (.../predefined.xotcl) (revision 62a9d39ecd1f540f08c895175a7f085cfb4ae845) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 68e773f0a21300bd799c60fefc76f696fd230ca0) @@ -6,6 +6,8 @@ set bootstrap 1 } +puts stderr HELLLO-0 + # # First create the ::xotcl2 object system. # @@ -134,41 +136,41 @@ .protected method objectparameter {} {;} } + # define forward methods + ::xotcl::forward Object forward -verbose ::xotcl::forward %self -per-object + ::xotcl::forward Class forward -verbose ::xotcl::forward %self + # 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 __unknown, XOTcl # tries to resolve the class again. This meachnism is used e.g. by # the ::ttrace mechanism for partial loading by Zoran. # - # TODO: check, of protected is OK Class protected object method __unknown {name} {} - # Add an alias method. cmdName for XOTcl method can be added via + # Add alias methods. cmdName for XOTcl method can be added via # [... info method name ] - - #::xotcl::alias Object $cmd -objscope ::$cmd - + # Object public method alias {-objscope:switch methodName cmd} { - ::xotcl::alias [self] $methodName \ - -per-object \ + ::xotcl::alias [self] $methodName -per-object \ {*}[expr {${objscope} ? "-objscope" : ""}] \ $cmd } - Class public method alias {-objscope:switch methodName cmd} { ::xotcl::alias [self] $methodName \ {*}[expr {${objscope} ? "-objscope" : ""}] \ $cmd } - + + # Add setter methods. + # Object public method setter {methodName value:optional} { if {[info exists value]} { ::xotcl::setter [self] $methodName -per-object $value } else { ::xotcl::setter [self] $methodName -per-object } } - Class public method setter {methodName value:optional} { if {[info exists value]} { ::xotcl::setter [self] $methodName $value