Index: doc/next-migration.html =================================================================== diff -u -r1a05667da4190fc231eb30304adc739d38202bf2 -ra67dbaef19de17336a77df24f280795e88f86956 --- doc/next-migration.html (.../next-migration.html) (revision 1a05667da4190fc231eb30304adc739d38202bf2) +++ doc/next-migration.html (.../next-migration.html) (revision a67dbaef19de17336a77df24f280795e88f86956) @@ -734,58 +734,68 @@
-
-
Class create Stack {
+
+
+Class create Stack {
 
-   #
-   # Stack of Things
-   #
+   #
+   # Stack of Things
+   #
+
+   :method init {} {
+     set :things ""
+   }
 
-   :method init {} {
-     set :things ""
-   }
+   :public method push {thing} {
+      set :things [linsert ${:things} 0 $thing]
+      return $thing
+   }
 
-   :public method push {thing} {
-      set :things [linsert ${:things} 0 $thing]
-      return $thing
-   }
-
-   :public method pop {} {
-      set top [lindex ${:things} 0]
-      set :things [lrange ${:things} 1 end]
-      return $top
-   }
-}
+ :public method pop {} { + set top [lindex ${:things} 0] + set :things [lrange ${:things} 1 end] + return $top + } +}
-
-
#
-# Stack of Things
-#
+
+
+#
+# Stack of Things
+#
+
+Class Stack
 
-Class Stack
+Stack instproc init {} {
+   my instvar things
+   set things ""
+}
 
-Stack instproc init {} {
-   my instvar things
-   set things ""
-}
+Stack instproc  push {thing} {
+   my instvar things
+   set things [linsert $things 0 $thing]
+   return $thing
+}
 
-Stack instproc  push {thing} {
-   my instvar things
-   set things [linsert $things 0 $thing]
-   return $thing
-}
-
-Stack instproc pop {} {
-   my instvar things
-   set top [lindex $things 0]
-   set things [lrange $things 1 end]
-}
+Stack instproc pop {} { + my instvar things + set top [lindex $things 0] + set things [lrange $things 1 end] +}
@@ -827,32 +837,37 @@ single script:

Using Multiple Object Systems in a single Script
-
-
   namespace eval mypackage {
+
+
+   namespace eval mypackage {
 
-      package require XOTcl 2.0
+      package require XOTcl 2.0
 
-      # Import XOTcl into the current namespace
-      namespace import -force ::xotcl::*
+      # Import XOTcl into the current namespace
+      namespace import -force ::xotcl::*
 
-      # Define a class using XOTcl
-      Class C1
-      C1 instproc foo {} {puts "hello world"}
+      # Define a class using XOTcl
+      Class C1
+      C1 instproc foo {} {puts "hello world"}
 
-      package require nx
+      package require nx
 
-      # Import NX into the current namespace;
-      # "Class" will be after the command "::nx::Class"
-      namespace import -force ::nx::*
+      # Import NX into the current namespace;
+      # "Class" will be after the command "::nx::Class"
+      namespace import -force ::nx::*
 
-      # Define a class using NX
-      Class create C2 {
-         :public method foo {} {puts "hello world"}
-      }
-   }
+ # Define a class using NX + Class create C2 { + :public method foo {} {puts "hello world"} + } + }

One could certainly create object or classes from the different object systems via fully qualified names (e.g. using e.g. ::xotcl::Class or ::nx::Class), but for migration for systems without explicit @@ -883,31 +898,51 @@

-
-
Class ClassName
+
+
+Class ClassName
-
-
Class create ClassName
+
+
+Class create ClassName
-
-
Object ObjectName
+
+
+Object ObjectName
-
-
Object create ObjectName
+
+
+Object create ObjectName
@@ -933,68 +968,98 @@
-
-
Class C
-C instproc foo args {...}
-C proc bar args {...}
+
+
+Class C
+C instproc foo args {...}
+C proc bar args {...}
-
-
# Define method and class-object method
-# in the init-block of a class
-
-Class create C {
-  :method foo args {...}
-  :class-object method bar args {...}
-}
+
+
+# Define method and class-object method
+# in the init-block of a class
+
+Class create C {
+  :method foo args {...}
+  :class-object method bar args {...}
+}
-
-
# Define method and class-object method with separate calls
-
-Class create C
-C method foo args {...}
-C class-object method bar args {...}
+
+
+# Define method and class-object method with separate calls
+
+Class create C
+C method foo args {...}
+C class-object method bar args {...}
-
-
Object o
-o set x 1
-o proc foo args {...}
+
+
+Object o
+o set x 1
+o proc foo args {...}
-
-
# Define class-object method and set instance variable
-# in the init-block of an object
-
-Object create o {
-  set :x 1
-  :method foo args {...}
-}
+
+
+# Define class-object method and set instance variable
+# in the init-block of an object
+
+Object create o {
+  set :x 1
+  :method foo args {...}
+}
-
-
# Define class-object method and set instance variable
-# with separate commands
-
-Object create o
-o eval {set :x 1}
-o method foo args {...}
+
+
+# Define class-object method and set instance variable
+# with separate commands
+
+Object create o
+o eval {set :x 1}
+o method foo args {...}
@@ -1018,180 +1083,245 @@
-
-
# Methods for defining methods:
-#
-#     proc
-#     instproc
-#     forward
-#     instforward
-#     parametercmd
-#     instparametercmd
-#
-# All these methods return empty.
+
+
+# Methods for defining methods:
+#
+#     proc
+#     instproc
+#     forward
+#     instforward
+#     parametercmd
+#     instparametercmd
+#
+# All these methods return empty.
-
-
# Methods for defining methods:
-#
-#     method
-#     forward
-#     alias
-#     attribute
-#
-# All these methods return method-handles.
+
+
+# Methods for defining methods:
+#
+#     method
+#     forward
+#     alias
+#     attribute
+#
+# All these methods return method-handles.
-
-
Class C
-C instproc foo args {...}
-C proc bar args {...}
+
+
+Class C
+C instproc foo args {...}
+C proc bar args {...}
 
-Object o
-o proc baz args {...}
+Object o +o proc baz args {...}
-
-
# Define scripted methods
+
+
+# Define scripted methods
+
+Class create C {
+  :method foo args {...}
+  :class-object method bar args {...}
+}
 
-Class create C {
-  :method foo args {...}
-  :class-object method bar args {...}
-}
-
-Object create o {
-  :method baz args {...}
-}
+Object create o { + :method baz args {...} +}
-
-
Class C
-C instforward f1 ...
-C forward f2 ...
+
+
+Class C
+C instforward f1 ...
+C forward f2 ...
 
-Object o
-o forward f3 ...
+Object o +o forward f3 ...
-
-
# Define forwarder
+
+
+# Define forwarder
+
+Class create C {
+  :forward f1 ...
+  :class-object forward f2 ...
+}
 
-Class create C {
-  :forward f1 ...
-  :class-object forward f2 ...
-}
-
-Object create o {
-  :forward f3 ...
-}
+Object create o { + :forward f3 ... +}
-
-
Class C
-C instparametercmd p1
-C parametercmd p2
+
+
+Class C
+C instparametercmd p1
+C parametercmd p2
 
-Object o
-o parametercmd p3
+Object o +o parametercmd p3
-
-
# Define setter and getter methods
+
+
+# Define setter and getter methods
+
+Class create C
+::nsf::setter C p1
+::nsf::setter C -per-object p2
 
-Class create C
-::nsf::setter C p1
-::nsf::setter C -per-object p2
-
-Object create o
-::nsf::setter o p3
+Object create o +::nsf::setter o p3
-
-
# Method "alias" not available
+
+
+# Method "alias" not available
-
-
# Define method aliases
-# (to scripted or non-scripted methods)
+
+
+# Define method aliases
+# (to scripted or non-scripted methods)
+
+Class create C {
+  :alias a1 ...
+  :class-object alias a2 ...
+}
 
-Class create C {
-  :alias a1 ...
-  :class-object alias a2 ...
-}
-
-Object create o {
-  :alias a3 ...
-}
+Object create o { + :alias a3 ... +}
-
-
# Parameters only available at class level
-
-Class C \
-   -parameter {
-    x
-    {y 1}
-}
+
+
+# Parameters only available at class level
+
+Class C \
+   -parameter {
+    x
+    {y 1}
+}
-
-
# Define object attributes
-# (parameters for initializing objects)
+
+
+# Define object attributes
+# (parameters for initializing objects)
+
+Class create C {
+  :attribute x
+  :attribute {y 1}
+  :class-object attribute oa1
+}
 
-Class create C {
-  :attribute x
-  :attribute {y 1}
-  :class-object attribute oa1
-}
-
-Object create o {
-  :attribute oa2
-}
+Object create o { + :attribute oa2 +}
-
-
Class create C \
-   -attributes {
-    x
-    {y 1}
-}
+
+
+Class create C \
+   -attributes {
+    x
+    {y 1}
+}
@@ -1215,35 +1345,45 @@
-
-
# Method modifiers
-#
-#   "class-object",
-#   "public", and
-#   "protected"
-#
-# are not available
+
+
+# Method modifiers
+#
+#   "class-object",
+#   "public", and
+#   "protected"
+#
+# are not available
-
-
# Method modifiers orthogonal over all kinds of methods
-#
-# Method-definition-methods:
-#    method, forward, alias, attribute
-
-Class create C {
-  :/method-definiton-method/ ...
-  :public /method-definiton-method/ ...
-  :protected /method-definiton-method/ ...
-  :class-object /method-definiton-method/ ...
-  :protected class-object /method-definiton-method/ ...
-  :public class-object /method-definiton-method/ ...
-}
+
+
+# Method modifiers orthogonal over all kinds of methods
+#
+# Method-definition-methods:
+#    method, forward, alias, attribute
+
+Class create C {
+  :/method-definiton-method/ ...
+  :public /method-definiton-method/ ...
+  :protected /method-definiton-method/ ...
+  :class-object /method-definiton-method/ ...
+  :protected class-object /method-definiton-method/ ...
+  :public class-object /method-definiton-method/ ...
+}
@@ -1283,33 +1423,43 @@
-
-
Class C
-C instproc foo args {...}
-C instproc bar args {
-  my foo 1 2 3 ;# invoke own method
-  o baz        ;# invoke other objects method
-}
-Object o
-o proc baz {} {...}
+
+
+Class C
+C instproc foo args {...}
+C instproc bar args {
+  my foo 1 2 3 ;# invoke own method
+  o baz        ;# invoke other objects method
+}
+Object o
+o proc baz {} {...}
-
-
Class create C {
-  :method foo args {...}
-  :method bar args {
-     :foo 1 2 3 ;# invoke own method
-     o baz      ;# invoke other objects method
-  }
-}
-Object create o {
-  :method baz {} {...}
-}
+
+
+Class create C {
+  :method foo args {...}
+  :method bar args {
+     :foo 1 2 3 ;# invoke own method
+     o baz      ;# invoke other objects method
+  }
+}
+Object create o {
+  :method baz {} {...}
+}
@@ -1346,134 +1496,194 @@
-
-
Class C
-C instproc foo args {
-  # Method scoped variable a
-  set a 1
-  # Instance variable b
-  my instvar b
-  set b 2
-  # Global variable/namespaced variable c
-  set ::c 3
-}
+
+
+Class C
+C instproc foo args {
+  # Method scoped variable a
+  set a 1
+  # Instance variable b
+  my instvar b
+  set b 2
+  # Global variable/namespaced variable c
+  set ::c 3
+}
-
-
Class create C {
-  :method foo args {...}
-    # Method scoped variable a
-    set a 1
-    # Instance variable b
-    set :b 2
-    # Global variable/namespaced variable c
-    set ::c 3
-  }
-}
+
+
+Class create C {
+  :method foo args {...}
+    # Method scoped variable a
+    set a 1
+    # Instance variable b
+    set :b 2
+    # Global variable/namespaced variable c
+    set ::c 3
+  }
+}
-
-
... instproc ... {
-   my set /varName/ ?value?
-}
+
+
+... instproc ... {
+   my set /varName/ ?value?
+}
-
-
# Set own instance variable to a value via resolver
-# (preferred and fastest way)
-
-... method ... {
-   set /:newVar/ ?value?
-}
+
+
+# Set own instance variable to a value via resolver
+# (preferred and fastest way)
+
+... method ... {
+   set /:newVar/ ?value?
+}
-
-
... instproc ... {
-   my instvar /varName/
-   set /varName/ ?value?
-}
+
+
+... instproc ... {
+   my instvar /varName/
+   set /varName/ ?value?
+}
-
-
# Set own instance variable via variable import
-
-... method ... {
-   ::nx::var import [self] /varName/
-   set /varName/ ?value?
-}
+
+
+# Set own instance variable via variable import
+
+... method ... {
+   ::nx::var import [self] /varName/
+   set /varName/ ?value?
+}
-
-
... instproc ... {
-   set /varName/ [my set /otherVar/]
-}
+
+
+... instproc ... {
+   set /varName/ [my set /otherVar/]
+}
-
-
# Read own instance variable
-
-... method ... {
-   set /varName/ [set /:otherVar/]
-}
+
+
+# Read own instance variable
+
+... method ... {
+   set /varName/ [set /:otherVar/]
+}
-
-
... method ... {
-   set /newVar/ ${/:otherVar/}
-}
+
+
+... method ... {
+   set /newVar/ ${/:otherVar/}
+}
-
-
... instproc ... {
-   my exists /varName/
-}
+
+
+... instproc ... {
+   my exists /varName/
+}
-
-
# Test existence of own instance variable
-
-... method ... {
-   info /:varName/
-}
+
+
+# Test existence of own instance variable
+
+... method ... {
+   info /:varName/
+}
-
-
 ... method ... {
-   ::nx::var exists [self] /varName/
-}
+
+
+ ... method ... {
+   ::nx::var exists [self] /varName/
+}
@@ -1497,80 +1707,125 @@
-
-
/obj/ set /varName/ ?value?
+
+
+/obj/ set /varName/ ?value?
-
-
# Set instance variable of object obj to a value via
-# resolver (preferred way: define attribute on obj)
-
-/obj/ eval [list set /:varName/ ?value?]
+
+
+# Set instance variable of object obj to a value via
+# resolver (preferred way: define attribute on obj)
+
+/obj/ eval [list set /:varName/ ?value?]
-
-
set /varName/ [/obj/ set /otherVar/]
+
+
+set /varName/ [/obj/ set /otherVar/]
-
-
# Read instance variable of object obj via resolver
-
-set /varName/ [/obj/ eval {set /:otherVar/}]
+
+
+# Read instance variable of object obj via resolver
+
+set /varName/ [/obj/ eval {set /:otherVar/}]
-
-
... instproc ... {
-   /obj/ instvar /varName/
-   set /varName/ ?value?
-}
+
+
+... instproc ... {
+   /obj/ instvar /varName/
+   set /varName/ ?value?
+}
-
-
# Read instance variable of object /obj/ via import
-
-... method ... {
-   ::nx::var import /obj/ /varName/
-   set /varName/ ?value?
-}
+
+
+# Read instance variable of object /obj/ via import
+
+... method ... {
+   ::nx::var import /obj/ /varName/
+   set /varName/ ?value?
+}
-
-
/obj/ exists varName
+
+
+/obj/ exists varName
-
-
# Test existence of instance variable of object obj
-
-/obj/ eval {info exists /:varName/}
+
+
+# Test existence of instance variable of object obj
+
+/obj/ eval {info exists /:varName/}
-
-
::nx::var exists /obj/ /varName/
+
+
+::nx::var exists /obj/ /varName/
@@ -1604,208 +1859,283 @@
-
-
# Object parameter specified as a list (short form)
-# "a" has no default, "b" has default "1"
+
+
+# Object parameter specified as a list (short form)
+# "a" has no default, "b" has default "1"
+
+Class Foo -parameter {a {b 1}}
 
-Class Foo -parameter {a {b 1}}
+# Create instance of the class Foo
+Foo f1 -a 0
 
-# Create instance of the class Foo
-Foo f1 -a 0
-
-# Object f1 has a == 0 and b == 1
+# Object f1 has a == 0 and b == 1
-
-
# Object parameter specified as a list (short form)
-# "a" has no default, "b" has default "1"
+
+
+# Object parameter specified as a list (short form)
+# "a" has no default, "b" has default "1"
+
+Class create Foo -attributes {a {b 1}}
 
-Class create Foo -attributes {a {b 1}}
+# Create instance of the class Foo
+Foo create f1 -a 0
 
-# Create instance of the class Foo
-Foo create f1 -a 0
-
-# Object f1 has a == 0 and b == 1
+# Object f1 has a == 0 and b == 1
-
-
# Object parameter specified via slots
+
+
+# Object parameter specified via slots
+
+Class Foo -slots {
+   Attribute a
+   Attribute b -default 1
+}
 
-Class Foo -slots {
-   Attribute a
-   Attribute b -default 1
-}
+# Create instance of the class Foo
+Foo f1 -a 0
 
-# Create instance of the class Foo
-Foo f1 -a 0
-
-# Object f1 has a == 0 and b == 1
-
+# Object f1 has a == 0 and b == 1 +
-
-
# Object parameter specified via attribute methods
-# (allow method modifieres and scripted configuration)
+
+
+# Object parameter specified via attribute methods
+# (allow method modifieres and scripted configuration)
+
+Class create Foo {
+   :attribute a
+   :attribute {b 1}
+}
 
-Class create Foo {
-   :attribute a
-   :attribute {b 1}
-}
+# Create instance of the class Foo
+Foo create f1 -a 0
 
-# Create instance of the class Foo
-Foo create f1 -a 0
-
-# Object f1 has a == 0 and b == 1
+# Object f1 has a == 0 and b == 1
-
-
# Object parameter with configured slot, defining an attribute
-# specific type checker
-
-Class Person -slots {
-   Attribute create sex -type "sex" {
-     my proc type=sex {name value} {
-       switch -glob $value {
-         m* {return m}
-         f* {return f}
-         default {error "expected sex but got $value"}
-       }
-     }
-   }
-}
+
+
+# Object parameter with configured slot, defining an attribute
+# specific type checker
+
+Class Person -slots {
+   Attribute create sex -type "sex" {
+     my proc type=sex {name value} {
+       switch -glob $value {
+         m* {return m}
+         f* {return f}
+         default {error "expected sex but got $value"}
+       }
+     }
+   }
+}
-
-
# Object parameter with scripted definition, defining an attribute
-# specific type checker
-
-Class create Person {
-   :attribute sex {
-     :type "sex"
-     :method type=sex {name value} {
-       switch -glob $value {
-         m* {return m}
-         f* {return f}
-         default {error "expected sex but got $value"}
-       }
-     }
-   }
-}
+
+
+# Object parameter with scripted definition, defining an attribute
+# specific type checker
+
+Class create Person {
+   :attribute sex {
+     :type "sex"
+     :method type=sex {name value} {
+       switch -glob $value {
+         m* {return m}
+         f* {return f}
+         default {error "expected sex but got $value"}
+       }
+     }
+   }
+}
-
-
# Predefined value constraints for parameter not available
+
+
+# Predefined value constraints for parameter not available
-
-
# Predefined value constraints:
-#    object, class, alnum, alpha, ascii, boolean, control,
-#    digit, double, false, graph, integer, lower, print,
-#    punct,  space, true, upper, wordchar, xdigit
-#
-# User defined value constraints are possible.
-# All parameter value checkers can be turned on and off.
-#
-# Define a boolean attribute and an integer attribute with a
-# default
-
-Class create Foo -attributes {
-   a:boolean
-   {b:integer 1}
-}
+
+
+# Predefined value constraints:
+#    object, class, alnum, alpha, ascii, boolean, control,
+#    digit, double, false, graph, integer, lower, print,
+#    punct,  space, true, upper, wordchar, xdigit
+#
+# User defined value constraints are possible.
+# All parameter value checkers can be turned on and off.
+#
+# Define a boolean attribute and an integer attribute with a
+# default
+
+Class create Foo -attributes {
+   a:boolean
+   {b:integer 1}
+}
-
-
Class create Foo {
-   :attribute a:boolean
-   :attribute {b:integer 1}
-}
+
+
+Class create Foo {
+   :attribute a:boolean
+   :attribute {b:integer 1}
+}
-
-
# Required parameter not available
+
+
+# Required parameter not available
-
-
# Required parameter:
-# Define a required attribute a and a required boolean
-# attribute b
-
-Class create Foo -attributes {
-   a:required
-   b:boolean,required
-}
+
+
+# Required parameter:
+# Define a required attribute a and a required boolean
+# attribute b
+
+Class create Foo -attributes {
+   a:required
+   b:boolean,required
+}
-
-

-Class create Foo {
-   :attribute a:required
-   :attribute b:boolean,required
-}
+
+
+
+Class create Foo {
+   :attribute a:required
+   :attribute b:boolean,required
+}
-
-
# Multiplicity for parameter not available
+
+
+# Multiplicity for parameter not available
-
-
# Parameter with multiplicity
-
-Class create Foo -attributes {
-  {ints:integer,0..n ""} ;# list of integers, with default
-   objs:object,1..n       ;# non-empty list of objects
-   obj:object,0..1        ;# single object, maybe empty
-}
+
+
+# Parameter with multiplicity
+
+Class create Foo -attributes {
+  {ints:integer,0..n ""} ;# list of integers, with default
+   objs:object,1..n       ;# non-empty list of objects
+   obj:object,0..1        ;# single object, maybe empty
+}
-
-
Class create Foo {
-  :attribute {ints:integer,0..n ""}
-   :attribute objs:object,1..n
-   :attribute obj:object,0..1
-}
+
+
+Class create Foo {
+  :attribute {ints:integer,0..n ""}
+   :attribute objs:object,1..n
+   :attribute obj:object,0..1
+}
@@ -1834,67 +2164,87 @@
-
-
# Define method foo with non-positional parameters
-# (x, y and y) and positional parameter (a and b)
+
+
+# Define method foo with non-positional parameters
+# (x, y and y) and positional parameter (a and b)
+
+Class C
+C instproc foo {-x:integer -y:required -z a b} {....}
+C create c1
 
-Class C
-C instproc foo {-x:integer -y:required -z a b} {....}
-C create c1
-
-# invoke method foo
-c1 foo -x 1 -y a 2 3
+# invoke method foo +c1 foo -x 1 -y a 2 3
-
-
# Define method foo with non-positional parameters
-# (x, y and y) and positional parameter (a and b)
-
-Class create C {
-   :public method foo {-x:integer -y:required -z a b} {....}
-   :create c1
-}
-# invoke method foo
-c1 foo -x 1 -y a 2 3
+
+
+# Define method foo with non-positional parameters
+# (x, y and y) and positional parameter (a and b)
+
+Class create C {
+   :public method foo {-x:integer -y:required -z a b} {....}
+   :create c1
+}
+# invoke method foo
+c1 foo -x 1 -y a 2 3
-
-
# n.a.
+
+
+# n.a.
-
-
# Define various forms of parameters not available in XOTcl 1
+
+
+# Define various forms of parameters not available in XOTcl 1
+
+Class create C {
+   # trailing (or interleaved) non-positional parameters
+   :public method m1 {a b -x:integer -y} {....}
 
-Class create C {
-   # trailing (or interleaved) non-positional parameters
-   :public method m1 {a b -x:integer -y} {....}
+   # postional parameters with value constraints
+   :public method m2 {a:integer b:boolean} {....}
 
-   # postional parameters with value constraints
-   :public method m2 {a:integer b:boolean} {....}
+   # optional postional parameter (trailing)
+   :public method set {varName value:optional} {....}
 
-   # optional postional parameter (trailing)
-   :public method set {varName value:optional} {....}
+   # parameter with multiplicty
+   :public method m3 {-objs:object,1..n c:class,0..1} {....}
 
-   # parameter with multiplicty
-   :public method m3 {-objs:object,1..n c:class,0..1} {....}
-
-   # In general, the same list of value constraints as for
-   # object parameter is available (see above).
-   #
-   # User defined value constraints are possible.
-   # All parameter value checkers can be turned on and off.
-}
+ # In general, the same list of value constraints as for + # object parameter is available (see above). + # + # User defined value constraints are possible. + # All parameter value checkers can be turned on and off. +}
@@ -1923,36 +2273,46 @@
-
-
# n.a.
+
+
+# n.a.
-
-
# Define method foo with non-positional parameters
-# (x, y and y) and positional parameter (a and b)
+
+
+# Define method foo with non-positional parameters
+# (x, y and y) and positional parameter (a and b)
+
+Class create C {
+   # Define method foo which returns an integer value
+   :method foo -returns integer {-x:integer} {....}
 
-Class create C {
-   # Define method foo which returns an integer value
-   :method foo -returns integer {-x:integer} {....}
+   # Define an alias for the Tcl command ::incr
+   # and assure, it always returns in integer
+   :alias incr -returns integer ::incr
 
-   # Define an alias for the Tcl command ::incr
-   # and assure, it always returns in integer
-   :alias incr -returns integer ::incr
+   # Define a forwarder that has to return integer
+   :forward ++ -returns integer ::expr 1 +
 
-   # Define a forwarder that has to return integer
-   :forward ++ -returns integer ::expr 1 +
-
-  # Define a method that has to return a non-empty
-  # list of objects
-  :public class-object method instances {} -returns object,1..n {
-    return [:info instances]
-   }
-}
+ # Define a method that has to return a non-empty + # list of objects + :public class-object method instances {} -returns object,1..n { + return [:info instances] + } +}
@@ -1979,57 +2339,87 @@
-
-
/cls/ instmixin ...
-/cls/ instmixinguard mixin /condition/
+
+
+/cls/ instmixin ...
+/cls/ instmixinguard mixin /condition/
-
-
# Register per-class mixin and guard for a class
-
-/cls/ mixin ...
-/cls/ mixin guard mixin /condition/
+
+
+# Register per-class mixin and guard for a class
+
+/cls/ mixin ...
+/cls/ mixin guard mixin /condition/
-
-
/cls/ mixin ...
-/cls/ mixin guard mixin /condition/
+
+
+/cls/ mixin ...
+/cls/ mixin guard mixin /condition/
-
-
# Register per-object mixin and guard for a class
-
-/cls/ class-object mixin ...
-/cls/ class-object mixin guard mixin /condition/
+
+
+# Register per-object mixin and guard for a class
+
+/cls/ class-object mixin ...
+/cls/ class-object mixin guard mixin /condition/
-
-
/obj/ mixin ...
-/obj/ mixinguard mixin /condition/
+
+
+/obj/ mixin ...
+/obj/ mixinguard mixin /condition/
-
-
# Register per-object mixin and guard for an object
-
-/obj/ mixin ...
-/obj/ mixin guard mixin /condition/
+
+
+# Register per-object mixin and guard for an object
+
+/obj/ mixin ...
+/obj/ mixin guard mixin /condition/
@@ -2053,57 +2443,87 @@
-
-
/cls/ instfilter ...
-/cls/ instfilterguard filter /condition/
+
+
+/cls/ instfilter ...
+/cls/ instfilterguard filter /condition/
-
-
# Register per-class filter and guard for a class
-
-/cls/ filter ...
-/cls/ filter guard filter /condition/
+
+
+# Register per-class filter and guard for a class
+
+/cls/ filter ...
+/cls/ filter guard filter /condition/
-
-
/cls/ filter ...
-/cls/ filterguard ...
+
+
+/cls/ filter ...
+/cls/ filterguard ...
-
-
# Register per-object filter and guard for a class
-
-/cls/ class-object filter ...
-/cls/ class-object filter guard filter /condition/
+
+
+# Register per-object filter and guard for a class
+
+/cls/ class-object filter ...
+/cls/ class-object filter guard filter /condition/
-
-
/obj/ filter ...
-/obj/ filterguard filter /condition/
+
+
+/obj/ filter ...
+/obj/ filterguard filter /condition/
-
-
# Register per-object filter and guard for an object
-
-/obj/ filter ...
-/obj/ filter guard filter /condition/
+
+
+# Register per-object filter and guard for an object
+
+/obj/ filter ...
+/obj/ filter guard filter /condition/
@@ -2130,101 +2550,171 @@
-
-
/obj/ info commands ?pattern?
+
+
+/obj/ info commands ?pattern?
-
-
/obj/ info methods ?pattern?
+
+
+/obj/ info methods ?pattern?
-
-
/obj/ info parametercmd ?pattern?
+
+
+/obj/ info parametercmd ?pattern?
-
-
/obj/ info methods -methodtype setter ?pattern?
+
+
+/obj/ info methods -methodtype setter ?pattern?
-
-
/obj/ info procs ?pattern?
+
+
+/obj/ info procs ?pattern?
-
-
/obj/ info methods -methodtype scripted ?pattern?
+
+
+/obj/ info methods -methodtype scripted ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info methods -methodtype alias ?pattern?
+
+
+/obj/ info methods -methodtype alias ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info methods -methodtype forwarder ?pattern?
+
+
+/obj/ info methods -methodtype forwarder ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info methods -methodtype object ?pattern?
+
+
+/obj/ info methods -methodtype object ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info methods -callprotection public|protected ...
+
+
+/obj/ info methods -callprotection public|protected ...
@@ -2248,101 +2738,171 @@
-
-
/cls/ info instcommands ?pattern?
+
+
+/cls/ info instcommands ?pattern?
-
-
/cls/ info methods ?pattern?
+
+
+/cls/ info methods ?pattern?
-
-
/cls/ info instparametercmd ?pattern?
+
+
+/cls/ info instparametercmd ?pattern?
-
-
/cls/ info methods -methodtype setter ?pattern?
+
+
+/cls/ info methods -methodtype setter ?pattern?
-
-
/cls/ info instprocs ?pattern?
+
+
+/cls/ info instprocs ?pattern?
-
-
/cls/ info methods -methodtype scripted ?pattern?
+
+
+/cls/ info methods -methodtype scripted ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info methods -methodtype alias ?pattern?
+
+
+/cls/ info methods -methodtype alias ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info methods -methodtype forwarder ?pattern?
+
+
+/cls/ info methods -methodtype forwarder ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info methods -methodtype object ?pattern?
+
+
+/cls/ info methods -methodtype object ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info methods -callprotection public|protected ...
+
+
+/cls/ info methods -callprotection public|protected ...
@@ -2366,101 +2926,171 @@
-
-
/cls/ info commands ?pattern?
+
+
+/cls/ info commands ?pattern?
-
-
/cls/ class-object info methods ?pattern?
+
+
+/cls/ class-object info methods ?pattern?
-
-
/cls/ info parametercmd ?pattern?
+
+
+/cls/ info parametercmd ?pattern?
-
-
/cls/ class-object info methods -methodtype setter ?pattern?
+
+
+/cls/ class-object info methods -methodtype setter ?pattern?
-
-
/cls/ info procs ?pattern?
+
+
+/cls/ info procs ?pattern?
-
-
/cls/ class-object info methods -methodtype scripted ?pattern?
+
+
+/cls/ class-object info methods -methodtype scripted ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ class-object info methods -methodtype alias ?pattern?
+
+
+/cls/ class-object info methods -methodtype alias ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ class-object info methods -methodtype forwarder ?pattern?
+
+
+/cls/ class-object info methods -methodtype forwarder ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ class-object info methods -methodtype object ?pattern?
+
+
+/cls/ class-object info methods -methodtype object ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ class-object info methods -callprotection public|protected ...
+
+
+/cls/ class-object info methods -callprotection public|protected ...
@@ -2484,73 +3114,113 @@
-
-
/obj/ info methods ?pattern?
+
+
+/obj/ info methods ?pattern?
-
-
/obj/ info lookup methods ... ?pattern?
-# Returns list of method names
+
+
+/obj/ info lookup methods ... ?pattern?
+# Returns list of method names
-
-
# n.a.
+
+
+# n.a.
-
-
# List only application specific methods
-/obj/ info lookup methods -source application ... ?pattern?
-# Returns list of method names
+
+
+# List only application specific methods
+/obj/ info lookup methods -source application ... ?pattern?
+# Returns list of method names
-
-
# Options for 'info methods'
-#
-# -incontext
-# -nomixins
+
+
+# Options for 'info methods'
+#
+# -incontext
+# -nomixins
-
-
# Options for 'info lookup methods'
-#
-# -source ...
-# -callprotection ...
-# -incontext
-# -methodtype ...
-# -nomixins
+
+
+# Options for 'info lookup methods'
+#
+# -source ...
+# -callprotection ...
+# -incontext
+# -methodtype ...
+# -nomixins
-
-
# n.a.
+
+
+# n.a.
-
-
# List slot objects defined for obj
-/obj/ info lookup slots
-# Returns list of slot objects
+
+
+# List slot objects defined for obj
+/obj/ info lookup slots
+# Returns list of slot objects
@@ -2574,33 +3244,53 @@
-
-
/obj/ procsearch /methodName/
+
+
+/obj/ procsearch /methodName/
-
-
/obj/ info lookup method /methodName/
-# Returns method-handle
+
+
+/obj/ info lookup method /methodName/
+# Returns method-handle
-
-
/obj/ filtersearch /methodName/
+
+
+/obj/ filtersearch /methodName/
-
-
/obj/ info lookup filter /methodName/
-# Returns method-handle
+
+
+/obj/ info lookup filter /methodName/
+# Returns method-handle
@@ -2624,101 +3314,171 @@
-
-
/cls/ info instbody /methodName/
+
+
+/cls/ info instbody /methodName/
-
-
/cls/ info method body /methodName/
+
+
+/cls/ info method body /methodName/
-
-
/cls/ info instargs /methodName/
+
+
+/cls/ info instargs /methodName/
-
-
/cls/ info method args /methodName/
+
+
+/cls/ info method args /methodName/
-
-
/cls/ info instnonposargs /methodName/
+
+
+/cls/ info instnonposargs /methodName/
-
-
/cls/ info method parameter /methodName/
+
+
+/cls/ info method parameter /methodName/
-
-
/cls/ info instdefault /methodName/
+
+
+/cls/ info instdefault /methodName/
-
-
/cls/ info instdefault /methodName/
+
+
+/cls/ info instdefault /methodName/
-
-
/cls/ info instpre /methodName/
+
+
+/cls/ info instpre /methodName/
-
-
/cls/ info method precondition /methodName/
+
+
+/cls/ info method precondition /methodName/
-
-
/cls/ info instpost /methodName/
+
+
+/cls/ info instpost /methodName/
-
-
/cls/ info method postcondition /methodName/
+
+
+/cls/ info method postcondition /methodName/
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info method definition /methodName/
+
+
+/cls/ info method definition /methodName/
@@ -2742,115 +3502,195 @@
-
-
/obj/ info body /methodName/
+
+
+/obj/ info body /methodName/
-
-
/obj/ info method body /methodName/
+
+
+/obj/ info method body /methodName/
-
-
/obj/ info args /methodName/
+
+
+/obj/ info args /methodName/
-
-
/obj/ info method args /methodName/
+
+
+/obj/ info method args /methodName/
-
-
/obj/ info nonposargs /methodName/
+
+
+/obj/ info nonposargs /methodName/
-
-
/obj/ info method parameter /methodName/
+
+
+/obj/ info method parameter /methodName/
-
-
/obj/ info default /methodName/
+
+
+/obj/ info default /methodName/
-
-
/obj/ info method parameter /methodName/
+
+
+/obj/ info method parameter /methodName/
-
-
/obj/ info pre /methodName/
+
+
+/obj/ info pre /methodName/
-
-
/obj/ info method precondition /methodName/
+
+
+/obj/ info method precondition /methodName/
-
-
/obj/ info pre /methodName/
+
+
+/obj/ info pre /methodName/
-
-
/obj/ info method precondition /methodName/
+
+
+/obj/ info method precondition /methodName/
-
-
/obj/ info post /methodName/
+
+
+/obj/ info post /methodName/
-
-
/obj/ info post /methodName/
+
+
+/obj/ info post /methodName/
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info method definition /methodName/
+
+
+/obj/ info method definition /methodName/
@@ -2875,174 +3715,294 @@
-
-
/obj/ info filter ?-guards? ?-order? ?pattern?
+
+
+/obj/ info filter ?-guards? ?-order? ?pattern?
-
-
# ... info filter methods -order ... returns method-handles
-# instead of triples (applies to all three variants)
-
-/obj/ info filter methods ?-guards? ?-order? ?pattern?
+
+
+# ... info filter methods -order ... returns method-handles
+# instead of triples (applies to all three variants)
+
+/obj/ info filter methods ?-guards? ?-order? ?pattern?
-
-
/obj/ info filterguard /name/
+
+
+/obj/ info filterguard /name/
-
-
/obj/ info filter guard /name/
+
+
+/obj/ info filter guard /name/
-
-
/cls/ info filter ?-guards? ?-order? ?pattern?
+
+
+/cls/ info filter ?-guards? ?-order? ?pattern?
-
-
/cls/ class-object info filter methods ?-guards? ?-order? ?pattern?
+
+
+/cls/ class-object info filter methods ?-guards? ?-order? ?pattern?
-
-
/cls/ info filterguard /name/
+
+
+/cls/ info filterguard /name/
-
-
/cls/ class-object info filter guard /name/
+
+
+/cls/ class-object info filter guard /name/
-
-
/cls/ info instfilter ?-guards? ?-order? ?pattern?
+
+
+/cls/ info instfilter ?-guards? ?-order? ?pattern?
-
-
/cls/ info filter methods ?-guards? ?-order? ?pattern?
+
+
+/cls/ info filter methods ?-guards? ?-order? ?pattern?
-
-
/cls/ info instfilterguard /name/
+
+
+/cls/ info instfilterguard /name/
-
-
/cls/ info filter guard /name/
+
+
+/cls/ info filter guard /name/
-
-
/obj/ info mixin ?-guards? ?-order? ?pattern?
+
+
+/obj/ info mixin ?-guards? ?-order? ?pattern?
-
-
/obj/ info mixin classes ?-guards? ?-order? ?pattern?
+
+
+/obj/ info mixin classes ?-guards? ?-order? ?pattern?
-
-
/obj/ info mixinguard /name/
+
+
+/obj/ info mixinguard /name/
-
-
/obj/ info mixin guard /name/
+
+
+/obj/ info mixin guard /name/
-
-
/cls/ info mixin ?-guards? ?-order? ?pattern?
+
+
+/cls/ info mixin ?-guards? ?-order? ?pattern?
-
-
/cls/ class-object info mixin classes ?-guards? ?-order? ?pattern?
+
+
+/cls/ class-object info mixin classes ?-guards? ?-order? ?pattern?
-
-
/cls/ info mixinguard /name/
+
+
+/cls/ info mixinguard /name/
-
-
/cls/ class-object info mixin guard /name/
+
+
+/cls/ class-object info mixin guard /name/
-
-
/cls/ info instmixin ?-guards? ?-order? ?pattern?
+
+
+/cls/ info instmixin ?-guards? ?-order? ?pattern?
-
-
/cls/ info mixin classes ?-guards? ?-order? ?pattern?
+
+
+/cls/ info mixin classes ?-guards? ?-order? ?pattern?
-
-
/cls/ info instmixinguard /name/
+
+
+/cls/ info instmixinguard /name/
-
-
/cls/ info mixin guard /name/
+
+
+/cls/ info mixin guard /name/
@@ -3066,31 +4026,51 @@
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info method definition /methodName/
+
+
+/obj/ info method definition /methodName/
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ info method definition /methodName/
+
+
+/cls/ info method definition /methodName/
@@ -3114,31 +4094,51 @@
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info method handle /methodName/
+
+
+/obj/ info method handle /methodName/
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ ?class-object? info method handle /methodName/
+
+
+/cls/ ?class-object? info method handle /methodName/
@@ -3162,31 +4162,51 @@
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info method type /methodName/
+
+
+/obj/ info method type /methodName/
-
-
# n.a.
+
+
+# n.a.
-
-
/cls/ ?class-object? info method type /methodName/
+
+
+/cls/ ?class-object? info method type /methodName/
@@ -3210,58 +4230,93 @@
-
-
/cls/ info mixinof ?-closure? ?pattern?
+
+
+/cls/ info mixinof ?-closure? ?pattern?
-
-
# List objects, where /cls/ is a per-object mixin
-
-/cls/ info mixinof -scope object ?-closure? ?pattern?
+
+
+# List objects, where /cls/ is a per-object mixin
+
+/cls/ info mixinof -scope object ?-closure? ?pattern?
-
-
/cls/ info instmixinof ?-closure? ?pattern?
+
+
+/cls/ info instmixinof ?-closure? ?pattern?
-
-
# List classes, where /cls/ is a per-class mixin
-
-/cls/ info mixinof -scope class ?-closure? ?pattern?
+
+
+# List classes, where /cls/ is a per-class mixin
+
+/cls/ info mixinof -scope class ?-closure? ?pattern?
-
-
# n.a.
+
+
+# n.a.
-
-
# List objects and classes, where /cls/ is
-# either a per-object or a per-class mixin
-
-/cls/ info mixinof -scope all ?-closure? ?pattern?
+
+
+# List objects and classes, where /cls/ is
+# either a per-object or a per-class mixin
+
+/cls/ info mixinof -scope all ?-closure? ?pattern?
-
-
/cls/ info mixinof ?-closure? ?pattern?
+
+
+/cls/ info mixinof ?-closure? ?pattern?
@@ -3285,87 +4340,147 @@
-
-
/obj/ istype /sometype/
+
+
+/obj/ istype /sometype/
-
-
/obj/ info has type /sometype/
+
+
+/obj/ info has type /sometype/
-
-
/obj/ ismixin /cls/
+
+
+/obj/ ismixin /cls/
-
-
/obj/ info has mixin /cls/
+
+
+/obj/ info has mixin /cls/
-
-
/obj/ isclass ?/cls/?
+
+
+/obj/ isclass ?/cls/?
-
-
/obj/ info is class
+
+
+/obj/ info is class
-
-
/obj/ ismetaclass /cls/
+
+
+/obj/ ismetaclass /cls/
-
-
/obj/ info is metaclass
+
+
+/obj/ info is metaclass
-
-
# n.a.
+
+
+# n.a.
-
-
/obj/ info is baseclass
+
+
+/obj/ info is baseclass
-
-
/obj/ isobject /obj/
+
+
+/obj/ isobject /obj/
-
-
::nsf::isobject /obj/
+
+
+::nsf::isobject /obj/
@@ -3389,193 +4504,328 @@
-
-
self
+
+
+self
-
-
current
+
+
+current
-
-
current object
+
+
+current object
-
-
self class
+
+
+self class
-
-
current class
+
+
+current class
-
-
self proc
+
+
+self proc
-
-
current method
+
+
+current method
-
-
self callingclass
+
+
+self callingclass
-
-
current currentclass
+
+
+current currentclass
-
-
self callingobject
+
+
+self callingobject
-
-
current callingobject
+
+
+current callingobject
-
-
self callingproc
+
+
+self callingproc
-
-
current callingmethod
+
+
+current callingmethod
-
-
self calledclass
+
+
+self calledclass
-
-
current calledclass
+
+
+current calledclass
-
-
self calledproc
+
+
+self calledproc
-
-
current calledmethod
+
+
+current calledmethod
-
-
self isnextcall
+
+
+self isnextcall
-
-
current isnextcall
+
+
+current isnextcall
-
-
self next
+
+
+self next
-
-
# Returns method-handle
-current next
+
+
+# Returns method-handle
+current next
-
-
self filterreg
+
+
+self filterreg
-
-
# Returns method-handle
-current filterreg
+
+
+# Returns method-handle
+current filterreg
-
-
self callinglevel
+
+
+self callinglevel
-
-
current callinglevel
+
+
+current callinglevel
-
-
self activelevel
+
+
+self activelevel
-
-
current activelevel
+
+
+current activelevel
@@ -3600,17 +4850,27 @@
-
-
/obj/ requireNamespace
+
+
+/obj/ requireNamespace
-
-
/obj/ require namespace
+
+
+/obj/ require namespace
@@ -3638,115 +4898,195 @@
-
-
/obj/ check /checkoptions/
+
+
+/obj/ check /checkoptions/
-
-
::nsf::assertion /obj/ check /checkptions/
+
+
+::nsf::assertion /obj/ check /checkptions/
-
-
/obj/ info check
+
+
+/obj/ info check
-
-
::nsf::assertion /obj/ check
+
+
+::nsf::assertion /obj/ check
-
-
/obj/ invar /conditions/
+
+
+/obj/ invar /conditions/
-
-
::nsf::assertion /obj/ object-invar /conditions/
+
+
+::nsf::assertion /obj/ object-invar /conditions/
-
-
/obj/ info invar
+
+
+/obj/ info invar
-
-
::nsf::assertion /obj/ object-invar
+
+
+::nsf::assertion /obj/ object-invar
-
-
/cls/ instinvar /conditions/
+
+
+/cls/ instinvar /conditions/
-
-
::nsf::assertion /cls/ class-invar /conditions/
+
+
+::nsf::assertion /cls/ class-invar /conditions/
-
-
/cls/ info instinvar
+
+
+/cls/ info instinvar
-
-
::nsf::assertion /cls/ class-invar
+
+
+::nsf::assertion /cls/ class-invar
-
-
/cls/ invar /conditions/
+
+
+/cls/ invar /conditions/
-
-
::nsf::assertion /cls/ object-invar /conditions/
+
+
+::nsf::assertion /cls/ object-invar /conditions/
-
-
/cls/ info invar
+
+
+/cls/ info invar
-
-
::nsf::assertion /cls/ object-invar
+
+
+::nsf::assertion /cls/ object-invar
@@ -3784,12 +5124,17 @@

In XOTcl 1, it was possible to call a parameter method during object creation via the -param without a value (in the example below -x.

-
-
Class Foo -parameter {x y}
-Foo f1 -x -y 1
+
+
+Class Foo -parameter {x y}
+Foo f1 -x -y 1

Such cases are most likely mistakes. All parameter configurations in XOTcl 2 require an argument.

@@ -3800,13 +5145,18 @@ incorrectly the parameter x (set via default from Foo), while in XOTcl 2, the variable won’t be set.

-
-
Class Foo -parameter {{x 1}}
-Class Bar -superclass Foo -parameter x
-Bar b1
+
+
+Class Foo -parameter {{x 1}}
+Class Bar -superclass Foo -parameter x
+Bar b1
@@ -3817,12 +5167,17 @@ was possible to call e.g. a method foo of the slot object Foo::slot::ints via the following two interfaces the same way:

-
-
Foo::slot::ints foo ...
-Foo slot ints foo ...
+
+
+Foo::slot::ints foo ...
+Foo slot ints foo ...

In the Next Scripting Framework, only the first form has the same semantic as before. In the second form (invocation of objects via method interface) has now the ensemble object semantics. This means @@ -3853,11 +5208,16 @@

The exit hander interface changed from a method of ::xotcl::Object into the Tcl command ::nsf::exithandler:

-
-
::nsf::exithandler set|get|unset ?arg?
+
+
+::nsf::exithandler set|get|unset ?arg?