Index: doc/next-migration.html =================================================================== diff -u -N -rd79efb10b92ad2045196990af50bc042e60b88f4 -r56f48a605e58baed9ed8d0f4d43cd704bf34811d --- doc/next-migration.html (.../next-migration.html) (revision d79efb10b92ad2045196990af50bc042e60b88f4) +++ doc/next-migration.html (.../next-migration.html) (revision 56f48a605e58baed9ed8d0f4d43cd704bf34811d) @@ -821,7 +821,7 @@ instance variables). The encapsulation of NX is stronger than in XOTcl but still weak compared to languages like C++; a developer can still access other objects' variables via some idioms, but NX makes - accesses to other objects variables explicit. The requiredness to + accesses to other objects' variables explicit. The requiredness to make these accesses explicit should encourage developer to implement well defined interfaces to provide access to instance variables.

@@ -1959,7 +1959,7 @@ C instproc foo args {...} C instproc bar args { my foo 1 2 3 ;# invoke own method - o baz ;# invoke other objects method + o baz ;# invoke other object's method } Object o o proc baz {} {...} @@ -1978,7 +1978,7 @@ :method foo args {...} :method bar args { :foo 1 2 3 ;# invoke own method - o baz ;# invoke other objects method + o baz ;# invoke other object's method } } Object create o { @@ -2112,7 +2112,7 @@ # resolver (preferred and fastest way) ... method ... { - set /:newVar/ ?value? + set :/newVar/ ?value? } @@ -2179,7 +2179,7 @@
# Read own instance variable
 
 ... method ... {
-   set /varName/ [set /:otherVar/]
+   set /varName/ [set :/otherVar/]
 }
... method ... {
-   set /newVar/ ${/:otherVar/}
+   set /newVar/ ${:/otherVar/}
 }
@@ -2225,7 +2225,7 @@
# Test existence of own instance variable
 
 ... method ... {
-   info /:varName/
+   info :/varName/
 }
-
/cls/ info methods -type alias ?pattern?
+
/cls/ info methods -type alias ?pattern?
+/cls/ info methods -type forwarder ?pattern?
+/cls/ info methods -type object ?pattern?
+/cls/ info methods -callprotection public|protected ...
- -
-
-
# n.a.
-
-
-
/cls/ info methods -type forwarder ?pattern?
- - -
-
-
# n.a.
-
-
-
/cls/ info methods -type object ?pattern?
- - -
-
-
# n.a.
-
-
-
/cls/ info methods -callprotection public|protected ...
- @@ -4064,86 +3989,11 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/obj/ info object methods -type alias ?pattern?
+
/obj/ info object methods -type alias ?pattern?
+/obj/ info object methods -type forwarder ?pattern?
+/obj/ info object methods -type object ?pattern?
+/obj/ info object methods -callprotection public|protected ...
- -
-
-
# n.a.
-
-
-
/obj/ info object methods -type forwarder ?pattern?
- - -
-
-
# n.a.
-
-
-
/obj/ info object methods -type object ?pattern?
- - -
-
-
# n.a.
-
-
-
/obj/ info object methods -callprotection public|protected ...
- @@ -4197,10 +4047,10 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/obj/ info object method exists /methodName/
-/obj/ info object methods /methodName/
-/cls/ info method exists /methodName/
-/cls/ info methods /methodName/
+
/cls/ info method exists /methodName/
+/cls/ info methods /methodName/
+/obj/ info object method exists /methodName/
+/obj/ info object methods /methodName/
@@ -4433,7 +4283,7 @@
-

2.6.6. List definition of scripted methods defined by classes

+

2.6.6. List definition of scripted methods

XOTcl contains a long list of info subcommands for different kinds of methods and for obtaining more detailed information about these methods.

@@ -4442,10 +4292,10 @@ with a single command the full definition of a scripted method, and furthermore, it works as well the same way to obtain e.g. the definition of a forwarder or an alias.

-

Another powerful introspection option in NX is info method -parametersyntax which obtains a representation of the parameters of a -method in the style of Tcl man pages (regardless of the kind of -method).

+

While XOTcl uses different names for info options for objects and +classes (using the prefix "inst" for instance specific method), NX +uses for object specific method the modifier object. For definition +of class object specific methods, use the modifier object as usual.

-
/cls/ info method definition /methodName/
+
/cls/ info method definition /methodName/
+/obj/ info object method definition /methodName/
+
/cls/ info instbody /methodName/
+/obj/ info body /methodName/
+
/cls/ info method body /methodName/
+/obj/ info object method body /methodName/
+
/cls/ info instargs /methodName/
+/obj/ info args /methodName/
+
/cls/ info method args /methodName/
+/obj/ info object method args /methodName/
+
/cls/ info instnonposargs /methodName/
+/obj/ info object method args /methodName/
+
/cls/ info method parameter /methodName/
+/obj/ info object method parameter /methodName/
+
/cls/ info instdefault /methodName/
+/obj/ info default /methodName/
+
# not needed, part of
+# "info ?object? method parameter"
+
/cls/ info instpre /methodName/
+/obj/ info pre /methodName/
+
/cls/ info method precondition /methodName/
+/obj/ info object method precondition /methodName/
+
/cls/ info instpost /methodName/
+/obj/ info post /methodName/
+
/cls/ info method postcondition /methodName/
+/obj/ info object method postcondition /methodName/
- - - -
@@ -4498,7 +4349,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instbody /methodName/
-
/cls/ info method body /methodName/
@@ -4524,7 +4377,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instargs /methodName/
-
/cls/ info method args /methodName/
@@ -4550,7 +4405,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instnonposargs /methodName/
-
/cls/ info method parameter /methodName/
@@ -4576,7 +4433,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instdefault /methodName/
-
# not needed, part of "info method parameter"
@@ -4602,7 +4461,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instpre /methodName/
-
/cls/ info method precondition /methodName/
@@ -4628,7 +4489,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info instpost /methodName/
-
/cls/ info method postcondition /methodName/
-
-
# n.a.
-
-
/cls/ info method parametersyntax /methodName/
- -
-

2.6.7. List definition of scripted object specific methods

-

While XOTcl uses different names for info options for objects and -classes (using the prefix "inst" for instance specific method), NX -uses for object specific method the modifier object.

+

Another powerful introspection option in NX is info ?object? method +syntax which obtains a representation of the parameters of a +method in the style of Tcl man pages (regardless of the kind of +method).

-
/obj/ info object method definition /methodName/
+
/cls/ info method syntax /methodName/
+/obj/ info object method syntax /methodName/
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
/obj/ info body /methodName/
-
-
/obj/ info object method body /methodName/
-
-
/obj/ info args /methodName/
-
-
/obj/ info object method args /methodName/
-
-
/obj/ info nonposargs /methodName/
-
-
/obj/ info object method parameter /methodName/
-
-
/obj/ info default /methodName/
-
-
# not needed, part of "info ?object? method parameter"
-
-
/obj/ info pre /methodName/
-
-
/obj/ info object method precondition /methodName/
-
-
/obj/ info post /methodName/
-
-
/obj/ info object method postcondition /methodName/
-
-
# n.a.
-
-
/obj/ info object method parametersyntax /methodName/
-

For definition of class object specific methods, use the modifier -object as usual.

-

2.6.8. List Configure Parameters

+

2.6.7. List Configure Parameters

Obtain information, how newly created object can be configured. The configuration of objects is performed in many languages over arguments to the constructors. NX has - what we think - a superiour approach for @@ -4953,7 +4605,7 @@

# Return configure parameter(s), the parameters
 # provided by a class for its instances; these
 # parameters define, how objects of this
-# class can be configured. a pattern can
+# class can be configured. A pattern can
 # be used to filter the results.
 
 /cls/ info configure parameters ?pattern?
@@ -4987,7 +4639,7 @@
 
-

2.6.9. List Variable Handlers

+

2.6.8. List Variable Declarations (property and variable)

-

2.6.10. List Slots

+

2.6.9. List Slots

# -type is the class of the slot object # -closure includes slots of superclasses -/obj/infoobject slots ?-type ...??pattern?/cls/info slots \ ?-type value??-closure??-source value??pattern? +/obj/infoobject slots ?-type ...??pattern?# List reachable slot objects defined for obj # -source might be all|application|baseclasses @@ -5124,7 +4776,7 @@
-

2.6.11. List Filter or Mixins

+

2.6.10. List Filter or Mixins

In NX all introspection options for filters are grouped under info filter and all introspection options for mixins are under info mixin. Therefore, NX follows here the approach of using hierarchical @@ -5270,7 +4922,7 @@

-

2.6.12. List definition of methods defined by aliases, setters or forwarders

+

2.6.11. List definition of methods defined by aliases, setters or forwarders

As mentioned earlier, info method definition can be used on every kind of method. The same call can be used to obtain the definition of a scripted method, a method-alias, a forwarder or a setter method.

@@ -5320,7 +4972,7 @@
-

2.6.13. List Method-Handles

+

2.6.12. List Method-Handles

NX supports method-handles to provide means to obtain further information about a method or to change maybe some properties of a method. When a method is created, the method creating method returns @@ -5368,17 +5020,17 @@ # can be used e.g. for aliases. "handle" is the short # form of "definitionhandle". # -/obj/ info object method handle /methodName/ -/cls/ info method handle /methodName/ +/cls/ info method handle /methodName/ +/obj/ info object method handle /methodName/ # # For ensemble methods (method name contains # spaces) one can query as well the registration # handle, which is the handle to the root of the # ensemble; the definiton handle points to the # leaf of the ensemble. # -/obj/ info object method registrationhandle /methodName/ -/cls/ info method registrationhandle /methodName/ +/cls/ info method registrationhandle /methodName/ +/obj/ info object method registrationhandle /methodName/ # # For aliases, one can query the original definition # via "info method origin" @@ -5391,7 +5043,7 @@

-

2.6.14. List type of a method

+

2.6.13. List type of a method

The method info ?object? method type is new in NX to obtain the type of the specified method.

@@ -5432,40 +5084,15 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/cls/ info method type /methodName/
+
/cls/ info method type /methodName/
+/obj/ info object method type /methodName/
-
- - -
-
-
# n.a.
-
-
/obj/ info object method type /methodName/
-

2.6.15. List the scope of mixin classes

+

2.6.14. List the scope of mixin classes

NX provides a richer set of introspection options to obtain information, where mixins classes are mixed into.

@@ -5585,7 +5212,7 @@
-

2.6.16. Check properties of object and classes

+

2.6.15. Check properties of object and classes

Similar as noted before, NX uses rather a hierarchical approach of naming using multiple layers of subcommands).

@@ -5796,7 +5423,7 @@
-

2.6.17. Call-stack Introspection

+

2.6.16. Call-stack Introspection

Call-stack introspection is very similar in NX and XOTcl. NX uses for subcommand the term current instead of self, since self has a strong connotation to the current object. The term proc is renamed @@ -6637,7 +6264,7 @@