Index: doc/Object.man =================================================================== diff -u -rbaee0c34119f4b237787204b8c3e64bc04c05782 -rcfb3421c9ebcc80ee2b48544717135b56c7c9946 --- doc/Object.man (.../Object.man) (revision baee0c34119f4b237787204b8c3e64bc04c05782) +++ doc/Object.man (.../Object.man) (revision cfb3421c9ebcc80ee2b48544717135b56c7c9946) @@ -750,26 +750,27 @@ [call [arg obj] [method uplevel] [opt [arg level]] [arg arg1] [opt "[arg arg2] ..."]] Evaluate a script or a command at a different stack-frame -level. Behaves like Tcl's [cmd uplevel], with the following -important exceptions. +level. The command behaves in essence like Tcl's [cmd uplevel], but can +be used to achieve identical results when filters or mixins are +registered. [list_begin itemized] -[item] If the [arg level] specifier is omitted, [method "uplevel"] -will skip any auxiliary frames added to the stack by active [term "filter"]s and [term "mixin"]s. The -resulting stack-frame level corresponds to the [term "callinglevel"] -as indicated by [cmd nx::current]. +[item] If the [arg level] specifier is omitted, [method uplevel] +will skip any auxiliary frames added to the stack by active +[term "filter"]s and [term mixin]s. The resulting stack-frame level +corresponds to the [term callinglevel] as indicated by [cmd +nx::current]. In this case method [method uplevel] can be used to +evaluate the command in the next enclosing procedure call, i.e., a +frame corresponding to a proc, method, or apply call, while skipping +frames of filters and mixins. -[item] If the [arg level] specifier is omitted, [method uplevel] gives -preference to the innermost enclosing procedure call, i.e., a frame -corresponding to a proc, method, or apply call. Any frames inbetween, -incl. those of filters and mixins (see above), will be skipped. - [item] If the [arg level] specifier is provided (relative, or -absolute), [method "uplevel"] will move execution into the requested -stack-frame level (incl. those introduced by active active [term "filter"]s and -[term "mixin"]s), if valid. +absolute), [method "uplevel"] will execute the command in the +stack-frame level. In such cases, method [method uplevel] +behaves like Tcl's [method uplevel] command. + [list_end] [example { @@ -800,26 +801,26 @@ [call [arg obj] [method upvar] [opt [arg level]] [arg otherVar1] [arg localVar1] [opt "[arg otherVar2] [arg localVar2] ..."]] -Links one or more local variables to variables defined for other -scopes (namespaces, objects, call frames). Behaves like Tcl's [cmd "upvar"], -with the following important exceptions. +Links one or more local variables to variables defined in other +scopes (namespaces, objects, call frames). +The command behaves in essence like Tcl's [cmd upvar], but can +be used to achieve identical results when filters or mixins are +registered. [list_begin itemized] -[item] If the [arg level] specifier is omitted, [method "upvar"] +[item] If the [arg level] specifier is omitted, [method upvar] will skip any auxiliary frames added to the stack by active [term "filter"]s and [term "mixin"]s. The resulting stack-frame level corresponds to the [term "callinglevel"] -as indicated by [cmd nx::current]. +as indicated by [cmd nx::current]. Therefore, method [method upvar] gives +access to the next enclosing procedure call, i.e., a frame +corresponding to a proc, method, or apply call, while skipping +frames of filters and mixins. -[item] If the [arg level] specifier is omitted, [method upvar] gives -preference to the innermost enclosing procedure call, i.e., a frame -corresponding to a proc, method, or apply call. Any frames inbetween, -incl. those of filters and mixins (see above), will be skipped. - [item] If the [arg level] specifier is provided (relative, or absolute), [method "upvar"] will link into the requested -stack-frame level (incl. those introduced by active active [term "filter"]s and -[term "mixin"]s), if valid. +stack-frame level. In theses cases, method [method upvar] +behaves like Tcl's [method upvar] command. [list_end] Index: library/xotcl/doc/tutorial.html =================================================================== diff -u -r93875ccd487d0d959e936789d578e189e26cb6b4 -rcfb3421c9ebcc80ee2b48544717135b56c7c9946 --- library/xotcl/doc/tutorial.html (.../tutorial.html) (revision 93875ccd487d0d959e936789d578e189e26cb6b4) +++ library/xotcl/doc/tutorial.html (.../tutorial.html) (revision cfb3421c9ebcc80ee2b48544717135b56c7c9946) @@ -861,7 +861,7 @@
Initially XOTcl offers two new commands: Object and Class. They represent hooks to the features of the language. This section discusses both of them in detail and shows how they -function in the context of XOTcl. Note that even if most of this is +function in the context of XOTcl. Note, that even if most of this is compatible to OTcl, a few changes occur. For this reason, this section is no introduction to plain OTcl. The Object command provides access to the Object class, which holds the common @@ -1024,7 +1024,7 @@
self class: the self command with the argument class returns the name of the - class, which holds the currently executing instproc. Note that this + class, which holds the currently executing instproc. Note, that this may be different to the class of the current object. If it is called from a proc it returns an empty string.
@@ -1041,7 +1041,7 @@ my set persons($name) [clock seconds] }-
Note that there is a difference to the realization of these +
Note, that there is a difference to the realization of these object information to OTcl. XOTcl uses commands in order to make XOTcl-methods compatible to Tcl-procedures and accessible via namespace-paths. OTcl uses the three variables self, class @@ -1544,8 +1544,8 @@ leaves it's instances with the class Object.
So all empty class- and superclass-relationships are automatically -reset to Object. Note that this are differences to OTcl, -where the destruction of a class destroys all instances and an empty +reset to Object. Note, that this are differences to OTcl, +where the destruction of an class destroys all instances and an empty super-class list remains empty.
Since the concept of a meta-class are sometimes confusing to people of a background of some other programming @@ -1969,7 +1970,7 @@ doInitializations.
- Note that recreate is not called, when a someone tries + Note, that recreate is not called, when a someone tries to recreate a class as an object or an object as a class. In these cases, destroy + create are used.
@@ -2319,7 +2320,7 @@that registers the mixin before init is called. When a mixin is registered after object creation and it needs initializations, it is necessary to -define special methods for this. Note that the behavior described +define special methods for this. Note, that the behavior described here is introduced in version 0.84 to ensure consistent behavior of intrinsic classes, per-object and per-class mixins, and to achieve predictable behavior for dynamic registration for all kind of mixins, @@ -2896,7 +2897,7 @@ className instmixin mixinList The inverse operation of info inmixin is instmixinof finds -out, into which objects a per-object mixin class is mixed into. +out, into which objects an per-object mixin class is mixed into.All messages to a filtered object must go through the filter before they reach their destination object. A simple example would be a sole filter on the class of the object. To define such a filter two steps -are necessary. Firstly a filter method has to be defined, then the +are necessary. Firstly an filter method has to be defined, then the filter has to be registered. The filter method consists of three parts which are all optional. A filter method has the following form:
@@ -2811,13 +2812,13 @@ The inverse operation of info mixin is mixinof finds -out, into which objects a per-object mixin class is mixed into. +out, into which objects an per-object mixin class is mixed into.clsName info mixinof ?pattern?-Note that the constructors (init methods) of per-object mixins (and per-class mixins) +
Note, that the constructors (init methods) of per-object mixins (and per-class mixins) are only called, if the mixin is registered already during object initialization (when init is called). For per-object mixins, one can achieve the initialization of a mixin via an idiom like @@ -2826,7 +2827,7 @@
className info instmixinof ?-closure? ?pattern? @@ -2961,7 +2962,7 @@Per-class mixins are applied transitively. That means the per-class -mixin A of a per-class mixin B is also applied for an objectin B's +mixin A of a per-class mixin B is also applied for an object in in B's scope. This is exactly the same as how superclasses are applied for instances. Consider the following example
@@ -3243,7 +3244,7 @@-Note that the list of possible actions can be +Note, that the list of possible actions can be extended by extending the class ::xotcl::Relations.
@@ -3256,9 +3257,9 @@ accessible within their scope. But the interceptors are mechanisms, which cover more then their sole scope. The meaningful usage of the meta-programming abilities often requires to go further and to get -information from the caller's and the callee's scope (e.g. for +information from the caller's and the callee's scope (e.g for delegation decisions). Therefore, we introduced rich call-stack -information for the interceptors. Note that these are also available +information for the interceptors. Note, that these are also available for ordinary methods, but the "called..." info options return empty strings. @@ -3382,7 +3383,7 @@-
Note that three options with the prefix calling +
Note, that three options with the prefix calling represent the values of self, self proc, and self class in the scope where the original call was invoked. In the following section we will show a simple program in which all of the @@ -4769,7 +4770,7 @@
Automatic Name Creation
The XOTcl autoname -instance method provides a simple way to take the task of +instance method provides an simple way to take the task of automatically creating names out of the responsibility of the programmer. The example below shows how to create on each invocation of method new an agent with a fresh name