Index: doc/next-migration.html =================================================================== diff -u -r01cc3b2a2d0ccf8b420fb73ab01c70308ac85d90 -re570f0508ee82bd7aeea0409c64855bb99ea5cee --- doc/next-migration.html (.../next-migration.html) (revision 01cc3b2a2d0ccf8b420fb73ab01c70308ac85d90) +++ doc/next-migration.html (.../next-migration.html) (revision e570f0508ee82bd7aeea0409c64855bb99ea5cee) @@ -1582,7 +1582,67 @@ the default protection for attributes. The defaults can be overwritten also e.g. on a class level.

+
+

2.2.4. Method and Attribute Deletion

+

NX provides an explicit delete method for the deletion of methods +and attributes.

+
+ +++ + + + + + + + + + + + +
XOTcl Next Scripting Language
+
+
# XOTcl provides only method deletion with
+# the equivalent of  Tcl's "proc foo {} {}"
+/obj/ proc foo {} {}
+/cls/ instproc foo {} {}
+
+# No support for attribute deletion
+
+
# Deletion of Methods
+#
+/obj/ delete method /name/
+/cls/ ?class? delete method /name/
+
+# Deletion of Attributes
+/obj/ delete attribute /name/
+/cls/ ?class? delete attribute /name/
+
+

2.3. Resolvers

The Next Scripting Framework defines Tcl resolvers for method and @@ -2391,8 +2451,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -

# Value constraints for parameter
-# not available
+
# No value constraints for parameter
+# available
# List slot objects defined for obj
-/obj/ info lookup slots ?-type /type/? ?-source
-all
+# -source might be all|application|baseclasses +# -type is the class of the slot object + +/obj/ info lookup slots ?-type ...? ?-source ... ?pattern? + +# Returns list of slot objects - -

application

-

baseclasses? ?pattern? -# Returns list of slot objects of specified type (class) and origin

-
-
-
-
-
-

2.6.6. List object/class where some method is defined

+

2.6.6. List object/class where a specified method is defined

info lookup can be used as well to determine, where exactly an artefact is located. One can obtain this way a method handle, where a method or filter is defined.

@@ -4452,7 +4507,127 @@ class as shown in examples above.

-

2.6.9. List Filter or Mixins

+

2.6.9. List Slots

+
+ +++ + + + + + + + + + + + +
XOTcl Next Scripting Language
+
+
# n.a.
+
+
# Return  list of slots objects defined on the
+# object or class
+#
+# -source might be all|application|baseclasses
+# -type is the class of the slot object
+# -closure includes slots of superclasses
+
+/obj/ info slots ?-type ...? ?pattern?
+/cls/ class info slots ?-type ...? ?pattern?
+/cls/ info slots ?-type ...? ?-source ...? ?-closure? ?pattern?
+
+
+
+

2.6.10. List Object parameters

+
+ +++ + + + + + + + + + + + +
XOTcl Next Scripting Language
+
+
# n.a.
+
+
# Return  parameter(s) provided by class for
+# its instances; defines, how objects of this
+# class can be configured. If name is provided
+# only the named object parameter is returned
+# otherwise the full list.
+#
+#
+# Return object parameters with leading dashes
+# for non-positional object parameters and
+# defaults
+/cls/ info parameter list ?name?
+
+# Return just the names of the parameters
+/cls/ info parameter name ?name?
+
+# Return the full parameter specs
+/cls/ info parameter spec ?name?
+
+# Return in the Tcl parameter syntax
+/cls/ info parameter syntax ?name?
+
+
+
+

2.6.11. 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 @@ -4800,7 +4975,7 @@

-

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

+

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

As mentioned earlier, info method definition can be used on every kind of method.

@@ -4841,40 +5016,15 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
/obj/ info method definition /methodName/
+
/obj/ info method definition /methodName/
+/cls/ ?class? info method definition /methodName/
- -
-
-
# n.a.
-
-
-
/cls/ info method definition /methodName/
-
-

2.6.11. List Method-Handles

+

2.6.13. 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 @@ -4917,40 +5067,15 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -

/obj/ info method handle /methodName/
+
/obj/ info method handle /methodName/
+/cls/ ?class? info method handle /methodName/
- -
-
-
# n.a.
-
-
-
/cls/ ?class? info method handle /methodName/
-
-

2.6.12. List type of a method

+

2.6.14. List type of a method

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

@@ -5024,7 +5149,7 @@
-

2.6.13. List the scope of mixin classes

+

2.6.15. List the scope of mixin classes

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

@@ -5144,7 +5269,7 @@
-

2.6.14. Check properties of object and classes

+

2.6.16. Check properties of object and classes

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

@@ -5322,7 +5447,7 @@
-

2.6.15. Call-stack Introspection

+

2.6.17. 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 @@ -6103,7 +6228,14 @@ # alternate approach via Next Scripting Framework ::nsf::relation f1 class ::nx::Object

+
+

3.2.4. Info heritage

+

info heritage returns in XOTcl 1 the transitive superclass +hierarchy, which is equivalent with info superclass -closure and +therefore not necessary. In XOTcl 2 (and NX), info heritage includes +as well the transitive per-class mixins.

+

3.3. Calling Objects via Method Interface

Since the Next Scripting Framework supports the so-called ensemble @@ -6176,7 +6308,7 @@