Index: TODO =================================================================== diff -u -r3b7a544e17d23c11227445e2949b94b953fc312c -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- TODO (.../TODO) (revision 3b7a544e17d23c11227445e2949b94b953fc312c) +++ TODO (.../TODO) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -2522,6 +2522,23 @@ otherwise default values for slots would not be available * reduced verbosity of parameter forwarder +* Hopefully the last big naming change: + Instead of writing "C class-object method foo {} {...}" + one can write now "C class method foo {} {...}" to define + a class method named "foo" for class "C". This naming change + became possible by defining XOTcl's "class" (and "superclass") + as object parameter only. To change a class of an object o, + one has to use "o configure -class NEWCLASS". The term + "object-class" looks alien to language beginners, the term + "class" is much more straightforward. Changing classes + or superclasses is seldomly used by typicall application programs. + + For already existing nx scripts, changing "object-class" into + class should be straightforward. + +* various documentation updates (migration guide, nx tutorial) + + TODO: - maybe the destructor of a slot should remove the setter/forwarder - how to delete attributes Index: doc/next-migration.html =================================================================== diff -u -re3a84e351aaf79c02a63cc0741dde7b9bd550849 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- doc/next-migration.html (.../next-migration.html) (revision e3a84e351aaf79c02a63cc0741dde7b9bd550849) +++ doc/next-migration.html (.../next-migration.html) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -534,8 +534,8 @@

Migration Guide for the the Next Scripting Language

Gustaf Neumann
<neumann@wu-wien.ac.at>
-version 2.0, -December 2010 +version 2.1, +March 2011
Written for the Initial Release of the Next Scripting Framework.
Table of Contents
@@ -608,20 +608,19 @@
  • -The encapsulation of Next Scripting is stronger than in XOTcl but - still weak compared to languages like C++; a developer can still - access e.g. other variables via some idioms, but this makes - accesses to other objects variables explicit and requires more - typing effort. Through the weak encapsulation a programmer should - be encouraged to implement methods to provide access to 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 make these + accesses explicit should encourage developer to implement well + defined interfaces to provide access to instance variables.

  • The Next Scripting Language provides means of method - protection. Therefore developers have to define interfaces in order - to use methods from other objects. + protection. Therefore developers have to define interfaces in + order to use methods from other objects.

  • @@ -649,121 +648,65 @@
  • -The Next Scripting Language has a much smaller interface (less - predefined methods) than XOTcl: +The naming of the methods in the Next Scripting Language is much more + in line with the mainstream naming conventions in OO languages.

    -
      +
    • -NX: +The Next Scripting Language has a much smaller interface (less + predefined methods) than XOTcl (see Table 1), allthough the + expressability was increased in NX.

      -
      + + +
      +
      + ++++ - - + + + + + - - + + + + + - - + + + - - + + + -
      Table 1. Comparison of the Number of Methods in NX and XOTcl
      -Methods for Objects: -
      -
      -

      -18 -

      -
      NXXOTcl
      -Methods for Classes: -
      -
      -

      -7 -

      -

      Total

      41

      125

      -Info methods for Objects: -
      -
      -

      -14 -

      -

      Methods for Objects

      17

      52

      -Info method for Classes: -
      -
      -

      -6 -

      -

      Methods for Classes

      4

      24

      -
    • -
    • -

      -XOTcl: -

      -
      - - + + + - - + + + - - - - - - - - -
      -Methods for Objects: -
      -
      -

      -52 -

      -

      Info-methods for Objects

      14

      25

      -Methods for Classes: -
      -
      -

      -24 -

      -

      Info-methods for Classes

      6

      24

      -Info methods for Objects: -
      -
      -

      -25 -

      -
      -Info method for Classes: -
      -
      -

      -24 -

      -
      -
    • -
    -
  • -
  • -

    -The naming of the methods in the The Next Scripting Language is much more - in line with the mainstream naming conventions in OO languages. -

    -
  • -
    + + +

    Below is a small, introductory example showing an implementation of a class Stack in NX and XOTcl. NX supports a block syntax, where the methods are defined during the creation of the class. The XOTcl syntax @@ -845,7 +788,7 @@ set things "" } -Stack instproc push {thing} { +Stack instproc push {thing} { my instvar things set things [linsert $things 0 $thing] return $thing @@ -911,21 +854,14 @@ package require XOTcl 2.0 - # Import XOTcl into the current namespace - namespace import -force ::xotcl::* - - # Define a class using XOTcl - Class C1 + # Define a class using XOTcl + xotcl::Class C1 C1 instproc foo {} {puts "hello world"} package require 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 { + # Define a class using NX + nx::Class create C2 { :public method foo {} {puts "hello world"} } }

    @@ -1042,8 +978,8 @@ object-specific methods. When the term (e.g. method) is used on a class, the method will be inherited (applicable to the instances of the class). When the term is used on an object, an object-specific -method is defined. NX uses the method modifier class-object to -defined a class-method (method for the class-object).

    +method is defined. NX uses the method modifier class to +define a class-specific method (method for the class object).

    Furthermore, both XOTcl and NX distinguish between scripted methods (section 3.2.1) and C-defined methods (section 3.2.2). Section 3.2.3 introduces method protection, which is only supported by NX.

    @@ -1078,7 +1014,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    # Define method 'foo' and class-object
    +
    # Define method 'foo' and class
     # method 'bar' for a Class 'C' with separate
     # toplevel commands
     
    @@ -1096,12 +1032,12 @@
     .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
     .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
     
    -
    # Define method and class-object method
    +
    # Define method and class method
     # in the init-block of a class
     
     Class create C {
       :method foo args {...}
    -  :class-object method bar args {...}
    +  :class method bar args {...}
     }
    -
    # Define method and class-object method
    +
    # Define method and class method
     # with separate commands
     
     Class create C
     C method foo args {...}
    -C class-object method bar args {...}
    +C class method bar args {...}
    @@ -1150,7 +1086,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    # Define class-object method and set
    +
    # Define class method and set
     # instance variable in the init-block of
     # an object
     
    @@ -1169,7 +1105,7 @@
     .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
     .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
     
    -
    # Define class-object method and set
    +
    # Define class method and set
     # instance variable with separate
     # commands
     
    @@ -1300,7 +1236,7 @@
     
     Class create C {
       :forward f1 ...
    -  :class-object forward f2 ...
    +  :class forward f2 ...
     }
     
     Object create o {
    @@ -1319,7 +1255,11 @@
     .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
     .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
     
    -
    Class C
    +
    # Define setter and getter methods in XOTcl.
    +#
    +# XOTcl provides methods for these.
    +
    +Class C
     C instparametercmd p1
     C parametercmd p2
     
    @@ -1336,7 +1276,12 @@
     .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
     .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
     
    -
    # Define setter and getter methods
    +
    # Define setter and getter methods in NX.
    +#
    +# NX does not provide own methods, but uses
    +# the low level framework commands, since
    +# application developer will only seldomly
    +# need it.
     
     Class create C
     ::nsf::method::setter C p1
    @@ -1397,7 +1342,7 @@
     
     Class create C {
       :alias a1 ...
    -  :class-object alias a2 ...
    +  :class alias a2 ...
     }
     
     Object create o {
    @@ -1410,10 +1355,10 @@
     

    3.2.3. Method Modifiers and Method Protection

    -

    NX supports the three method modifiers class-object, public and +

    NX supports the three method modifiers class, public and protected. All method modifiers can be written in front of every method -defining command. The method modifier class-object is used to denote -class-object specific methods (see above). The concept of method +defining command. The method modifier class is used to denote +class-specific methods (see above). The concept of method protection is new in NX.

    # Method modifiers
     #
    -#   "class-object",
    +#   "class",
     #   "public", and
     #   "protected"
     #
    @@ -1459,31 +1404,37 @@
     .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
     .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
     
    -
    # Method modifiers orthogonal over all kinds of methods
    +
    # Method modifiers
     #
    -# Method-definition-methods:
    +#   "class",
    +#   "public", and
    +#   "protected"
    +#
    +# are applicable for all kinds of method
    +# defining 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/ ...
    +  :class /method-definiton-method/ ...
    +  :protected class /method-definiton-method/ ...
    +  :public class /method-definiton-method/ ...
     }
    -

    While XOTcl does not provide method protection, in NX, all methods are -defined per default as protected.

    -

    NX allows to configure the default call protection in various -ways. The command ::nx::configure defaultMethodCallProtection -true|false can be used to set the default call protection for -scripted methods, forwarder and aliases, while ::nx::configure -defaultAttributeCallProtection true|false can set the default -protection for attributes.

    +

    XOTcl does not provide method protection. In NX, all methods are +defined per default as protected. These defaults can be changed by the +application developer in various ways. The command ::nx::configure +defaultMethodCallProtection true|false can be used to set the default +call protection for scripted methods, forwarder and aliases, while +::nx::configure defaultAttributeCallProtection true|false can set +the default protection for attributes. The defaults can be overwritten +also e.g. on a class level.

    @@ -1557,7 +1508,7 @@ } } Object create o { - :method baz {} {...} + :public method baz {} {...} }
    @@ -2190,7 +2141,7 @@ Class create C { :attribute x :attribute {y 1} - :class-object attribute oa1 + :class attribute oa1 } Object create o { @@ -2568,7 +2519,10 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    # n.a.
    +
    # Only leading non-positional parameters
    +# are available; no optional positional
    +# parameters, no value constraints on
    +# positional parameters, no multiplicity, ...
    -
    # n.a.
    +
    # No return value checking available
    /cls/ instmixin ...
    -/cls/ instmixinguard mixin /condition/
    +/cls/ instmixinguard /mixin/ ?condition?
    /cls/ mixin ...
    -/cls/ mixin guard mixin /condition/
    +/cls/ mixin guard /mixin/ ?condition?
    /obj/ mixin ...
    -/obj/ mixinguard mixin /condition/
    +/obj/ mixinguard /mixin/ ?condition?
    /cls/ instfilter ...
    -/cls/ instfilterguard filter /condition/
    +/cls/ instfilterguard /filter/ ?condition?
    /obj/ filter ...
    -/obj/ filterguard filter /condition/
    +/obj/ filterguard /filter/ ?condition?
    -
    /cls/ class-object info methods ?pattern?
    +
    /cls/ class info methods ?pattern?
    @@ -3427,7 +3384,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods -methodtype setter ?pattern?
    +
    /cls/ class info methods -methodtype setter ?pattern?
    @@ -3453,7 +3410,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods -methodtype scripted ?pattern?
    +
    /cls/ class info methods -methodtype scripted ?pattern?
    @@ -3479,7 +3436,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods -methodtype alias ?pattern?
    +
    /cls/ class info methods -methodtype alias ?pattern?
    @@ -3505,7 +3462,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods -methodtype forwarder ?pattern?
    +
    /cls/ class info methods -methodtype forwarder ?pattern?
    @@ -3531,7 +3488,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods -methodtype object ?pattern?
    +
    /cls/ class info methods -methodtype object ?pattern?
    @@ -3557,7 +3514,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info methods \
    +
    /cls/ class info methods \
        -callprotection public|protected ...
    @@ -3638,8 +3595,8 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ ?class-object? info method exists /methodName/
    -/cls/ ?class-object? info methods /methodName/
    +
    /cls/ ?class? info method exists /methodName/
    +/cls/ ?class? info methods /methodName/
    @@ -4337,7 +4294,7 @@

    For definition of class object specific methods, use the modifier -class-object as shown in examples above.

    +class as shown in examples above.

    3.6.9. List Filter or Mixins

    @@ -4440,7 +4397,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info filter methods \
    +
    /cls/ class info filter methods \
        ?-guards? ?-order? ?pattern?
    @@ -4467,7 +4424,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info filter guard /name/
    +
    /cls/ class info filter guard /name/
    @@ -4600,7 +4557,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info mixin classes \
    +
    /cls/ class info mixin classes \
        ?-guards? ?-order? ?pattern?
    @@ -4627,7 +4584,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ class-object info mixin guard /name/
    +
    /cls/ class info mixin guard /name/
    @@ -4689,7 +4646,7 @@

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

    -

    As mentioned earlier, +info method definition" can be used on every +

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

    -
    /cls/ ?class-object? info method handle /methodName/
    +
    /cls/ ?class? info method handle /methodName/
    @@ -4905,7 +4862,7 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    /cls/ ?class-object? info method type /methodName/
    +
    /cls/ ?class? info method type /methodName/
    @@ -5923,7 +5880,7 @@

    4.2.1. Parameter usage without a value

    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.

    +creation via the dash-interface without a value (in the example below -x).

    -
    Class Foo -parameter {x y}
    +
    # XOTcl example
    +
    +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.

    @@ -5957,11 +5916,36 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -
    Class Foo -parameter {{x 1}}
    +
    # XOTcl example
    +
    +Class Foo -parameter {{x 1}}
     Class Bar -superclass Foo -parameter x
     Bar b1
    +
    +

    4.2.3. Ignored Parameter definitions

    +

    NX does not define the methods class and superclass but allows to +alter the class/superclass via configure. The class and superclass +can be certainly queried in all variants with info class or info superclass.

    +
    +
    +
    # NX example
    +
    +nx::Class create Foo
    +Foo create f1
    +# now oalter the class of object f1
    +f1 configure -class nx::Object
    +

    4.3. Calling Objects via Method Interface

    Since the Next Scripting Framework supports the so-called ensemble @@ -5980,7 +5964,9 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -

    Foo::slot::ints foo ...
    +
    # XOTcl example
    +
    +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 @@ -6022,16 +6008,17 @@ .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;} .nx-variable {color: #AF663F; font-weight: normal; font-style: normal;} -

    ::nsf::exithandler set|get|unset ?arg?
    +
    # NX example
    +::nsf::exithandler set|get|unset ?arg?

    Index: doc/next-migration.txt =================================================================== diff -u -re3a84e351aaf79c02a63cc0741dde7b9bd550849 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- doc/next-migration.txt (.../next-migration.txt) (revision e3a84e351aaf79c02a63cc0741dde7b9bd550849) +++ doc/next-migration.txt (.../next-migration.txt) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -1,7 +1,7 @@ Migration Guide for the the Next Scripting Language ==================================================== Gustaf Neumann -v2.0, December 2010: +v2.1, March 2011: Written for the Initial Release of the Next Scripting Framework. :Author Initials: GN :toc: @@ -69,17 +69,16 @@ obsolete in NX (especially for importing instance variables). On the other hand, XOTcl is complete symmetrical in this respect. -- The encapsulation of Next Scripting is stronger than in XOTcl but - still weak compared to languages like C++; a developer can still - access e.g. other variables via some idioms, but this _makes - accesses to other objects variables explicit_ and requires more - typing effort. Through the weak encapsulation a programmer should - be encouraged to implement methods to provide access to 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 make these + accesses explicit should encourage developer to implement well + defined interfaces to provide access to instance variables. - The Next Scripting Language provides means of _method - protection_. Therefore developers have to define interfaces in order - to use methods from other objects. + protection_. Therefore developers have to define interfaces in + order to use methods from other objects. - The Next Scripting Language provides _scripted init blocks_ for objects and classes (replacement for the dangerous dash "-" @@ -95,26 +94,25 @@ Framework provides the same value checkers for positional argument of methods, as well as for object parameters (`-parameter` in XOTcl 1). +- The naming of the methods in the Next Scripting Language is much more + in line with the mainstream naming conventions in OO languages. + - The Next Scripting Language has a much _smaller interface_ (less - predefined methods) than XOTcl: + predefined methods) than XOTcl (see Table 1), allthough the + expressability was increased in NX. - * NX: -[horizontal] -Methods for Objects: :: 18 -Methods for Classes: :: 7 -Info methods for Objects: :: 14 -Info method for Classes: :: 6 +.Comparison of the Number of Methods in NX and XOTcl +[width="50%",frame="topbot",options="header,footer",cols="3,>1,>1"] +|====================== +||NX|XOTcl +|Methods for Objects |17| 52 +|Methods for Classes | 4| 24 +|Info-methods for Objects |14| 25 +|Info-methods for Classes | 6| 24 +|Total | 41|125 +|====================== - * XOTcl: -[horizontal] -Methods for Objects: :: 52 -Methods for Classes: :: 24 -Info methods for Objects: :: 25 -Info method for Classes: :: 24 -- The naming of the methods in the The Next Scripting Language is much more - in line with the mainstream naming conventions in OO languages. - Below is a small, introductory example showing an implementation of a class +Stack+ in NX and XOTcl. NX supports a block syntax, where the methods are defined during the creation of the class. The XOTcl syntax @@ -169,7 +167,7 @@ set things "" } -Stack instproc push {thing} { +Stack instproc push {thing} { my instvar things set things [linsert $things 0 $thing] return $thing @@ -213,21 +211,14 @@ package require XOTcl 2.0 - # Import XOTcl into the current namespace - namespace import -force ::xotcl::* - - # Define a class using XOTcl - Class C1 + # Define a class using XOTcl + xotcl::Class C1 C1 instproc foo {} {puts "hello world"} package require 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 { + # Define a class using NX + nx::Class create C2 { :public method foo {} {puts "hello world"} } } @@ -305,8 +296,8 @@ object-specific methods. When the term (e.g. +method+) is used on a class, the method will be inherited (applicable to the instances of the class). When the term is used on an object, an object-specific -method is defined. NX uses the method modifier +class-object+ to -defined a class-method (method for the class-object). +method is defined. NX uses the method modifier +class+ to +define a class-specific method (method for the class object). Furthermore, both XOTcl and NX distinguish between scripted methods (section 3.2.1) and C-defined methods (section 3.2.2). Section 3.2.3 @@ -324,7 +315,7 @@ |[source,tcl] ---------------- -# Define method 'foo' and class-object +# Define method 'foo' and class # method 'bar' for a Class 'C' with separate # toplevel commands @@ -334,22 +325,22 @@ ---------------- |[source,tcl] ---------------- -# Define method and class-object method +# Define method and class method # in the init-block of a class Class create C { :method foo args {...} - :class-object method bar args {...} + :class method bar args {...} } ---------------- [source,tcl] ---------------- -# Define method and class-object method +# Define method and class method # with separate commands Class create C C method foo args {...} -C class-object method bar args {...} +C class method bar args {...} ---------------- |[source,tcl] @@ -364,7 +355,7 @@ |[source,tcl] ---------------- -# Define class-object method and set +# Define class method and set # instance variable in the init-block of # an object @@ -375,7 +366,7 @@ ---------------- [source,tcl] ---------------- -# Define class-object method and set +# Define class method and set # instance variable with separate # commands @@ -452,7 +443,7 @@ Class create C { :forward f1 ... - :class-object forward f2 ... + :class forward f2 ... } Object create o { @@ -462,6 +453,10 @@ |[source,tcl] ---------------- +# Define setter and getter methods in XOTcl. +# +# XOTcl provides methods for these. + Class C C instparametercmd p1 C parametercmd p2 @@ -472,7 +467,12 @@ |[source,tcl] ---------------- -# Define setter and getter methods +# Define setter and getter methods in NX. +# +# NX does not provide own methods, but uses +# the low level framework commands, since +# application developer will only seldomly +# need it. Class create C ::nsf::method::setter C p1 @@ -506,7 +506,7 @@ Class create C { :alias a1 ... - :class-object alias a2 ... + :class alias a2 ... } Object create o { @@ -519,10 +519,10 @@ [[method-protect-example]] ==== Method Modifiers and Method Protection -NX supports the three method modifiers +class-object+, +public+ and +NX supports the three method modifiers +class+, +public+ and +protected+. All method modifiers can be written in front of every method -defining command. The method modifier +class-object+ is used to denote -class-object specific methods (see above). The concept of method +defining command. The method modifier +class+ is used to denote +class-specific methods (see above). The concept of method protection is new in NX. [options="header",cols="asciidoc,asciidoc",frame="none",valign="middle"] @@ -533,41 +533,45 @@ ---------------- # Method modifiers # -# "class-object", +# "class", # "public", and # "protected" # # are not available ---------------- |[source,tcl] ---------------- -# Method modifiers orthogonal over all kinds of methods +# Method modifiers # -# Method-definition-methods: +# "class", +# "public", and +# "protected" +# +# are applicable for all kinds of method +# defining 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/ ... + :class /method-definiton-method/ ... + :protected class /method-definiton-method/ ... + :public class /method-definiton-method/ ... } ---------------- |====================== -While XOTcl does not provide method protection, in NX, all methods are -defined per default as protected. +XOTcl does not provide method protection. In NX, all methods are +defined per default as protected. These defaults can be changed by the +application developer in various ways. The command `::nx::configure +defaultMethodCallProtection true|false` can be used to set the default +call protection for scripted methods, forwarder and aliases, while +`::nx::configure defaultAttributeCallProtection true|false` can set +the default protection for attributes. The defaults can be overwritten +also e.g. on a class level. -NX allows to configure the default call protection in various -ways. The command `::nx::configure defaultMethodCallProtection -true|false` can be used to set the default call protection for -scripted methods, forwarder and aliases, while `::nx::configure -defaultAttributeCallProtection true|false` can set the default -protection for attributes. - - === Resolvers The Next Scripting Framework defines Tcl resolvers for method and @@ -615,7 +619,7 @@ } } Object create o { - :method baz {} {...} + :public method baz {} {...} } ---------------- |====================== @@ -940,7 +944,7 @@ Class create C { :attribute x :attribute {y 1} - :class-object attribute oa1 + :class attribute oa1 } Object create o { @@ -1159,7 +1163,10 @@ |[source,tcl] ---------------- -# n.a. +# Only leading non-positional parameters +# are available; no optional positional +# parameters, no value constraints on +# positional parameters, no multiplicity, ... ---------------- |[source,tcl] ---------------- @@ -1213,7 +1220,7 @@ |[source,tcl] ---------------- -# n.a. +# No return value checking available ---------------- |[source,tcl] ---------------- @@ -1240,7 +1247,7 @@ # Define a method that has to return a # non-empty list of objects - :public class-object method instances {} \ + :public class method instances {} \ -returns object,1..n { return [:info instances] } @@ -1261,7 +1268,7 @@ a per-class mixin, if the +mixin+ is registered on the object level, it is a object-level mixin. In both cases, the method +mixin+ is used. If a mixin is registered on the class object, one has to use the -modifier +class-object+ (in the same way as e.g. for defining methods). +modifier +class+ (in the same way as e.g. for defining methods). ==== Register Mixin Classes and Mixin Guards @@ -1272,41 +1279,41 @@ |[source,tcl] ---------------- /cls/ instmixin ... -/cls/ instmixinguard mixin /condition/ +/cls/ instmixinguard /mixin/ ?condition? ---------------- |[source,tcl] ---------------- # Register per-class mixin and guard for # a class /cls/ mixin ... -/cls/ mixin guard mixin /condition/ +/cls/ mixin guard /mixin/ ?condition? ---------------- |[source,tcl] ---------------- /cls/ mixin ... -/cls/ mixin guard mixin /condition/ +/cls/ mixin guard /mixin/ ?condition? ---------------- |[source,tcl] ---------------- # Register per-object mixin and guard for # a class -/cls/ class-object mixin ... -/cls/ class-object mixin guard mixin /condition/ +/cls/ class mixin ... +/cls/ class mixin guard /mixin/ ?condition? ---------------- |[source,tcl] ---------------- /obj/ mixin ... -/obj/ mixinguard mixin /condition/ +/obj/ mixinguard /mixin/ ?condition? ---------------- |[source,tcl] ---------------- # Register per-object mixin and guard for # an object /obj/ mixin ... -/obj/ mixin guard mixin /condition/ +/obj/ mixin guard /mixin/ ?condition? ---------------- |====================== @@ -1318,15 +1325,15 @@ |[source,tcl] ---------------- /cls/ instfilter ... -/cls/ instfilterguard filter /condition/ +/cls/ instfilterguard /filter/ ?condition? ---------------- |[source,tcl] ---------------- # Register per-class filter and guard for # a class /cls/ filter ... -/cls/ filter guard filter /condition/ +/cls/ filter guard /filter/ ?condition? ---------------- |[source,tcl] ---------------- @@ -1338,21 +1345,21 @@ # Register per-object filter and guard for # a class -/cls/ class-object filter ... -/cls/ class-object filter guard filter /condition/ +/cls/ class filter ... +/cls/ class filter guard /filter/ ?condition? ---------------- |[source,tcl] ---------------- /obj/ filter ... -/obj/ filterguard filter /condition/ +/obj/ filterguard /filter/ ?condition? ---------------- |[source,tcl] ---------------- # Register per-object filter and guard for # an object /obj/ filter ... -/obj/ filter guard filter /condition/ +/obj/ filter guard /filter/ ?condition? ---------------- |====================== @@ -1366,8 +1373,11 @@ In NX, one can use e.g. always +info method+ with a subcommand and the framework tries to hide the differences as far as possible. So, one can for example obtain with +info method parameter+ the parameters of -scripted and C-implemented methods the same way. In addition, NX -provides means to query the type of a method. +scripted and C-implemented methods the same way, one one can get the +definition of all methods via +info method definition+ and one can get +an manual-like interface description via +info method +parametersyntax+. In addition, NX provides means to query the type of +a method, and NX allows to filter by the type of the method. ==== List methods defined by classes @@ -1509,8 +1519,8 @@ ==== List class object specific methods -When class-object specific properties are queried, NX required to use -the modifier +class-object+ (like for the definition of the methods). +When class specific properties are queried, NX required to use +the modifier +class+ (like for the definition of the methods). In all other respects, this section is identical to the previous one. [options="header",cols="asciidoc,asciidoc",frame="none",valign="middle"] @@ -1523,55 +1533,55 @@ ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods ?pattern? +/cls/ class info methods ?pattern? ---------------- |[source,tcl] ---------------- /cls/ info parametercmd ?pattern? ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods -methodtype setter ?pattern? +/cls/ class info methods -methodtype setter ?pattern? ---------------- |[source,tcl] ---------------- /cls/ info procs ?pattern? ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods -methodtype scripted ?pattern? +/cls/ class info methods -methodtype scripted ?pattern? ---------------- |[source,tcl] ---------------- # n.a. ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods -methodtype alias ?pattern? +/cls/ class info methods -methodtype alias ?pattern? ---------------- |[source,tcl] ---------------- # n.a. ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods -methodtype forwarder ?pattern? +/cls/ class info methods -methodtype forwarder ?pattern? ---------------- |[source,tcl] ---------------- # n.a. ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods -methodtype object ?pattern? +/cls/ class info methods -methodtype object ?pattern? ---------------- |[source,tcl] ---------------- # n.a. ---------------- |[source,tcl] ---------------- -/cls/ class-object info methods \ +/cls/ class info methods \ -callprotection public\|protected ... ---------------- |====================== @@ -1605,8 +1615,8 @@ ---------------- |[source,tcl] ---------------- -/cls/ ?class-object? info method exists /methodName/ -/cls/ ?class-object? info methods /methodName/ +/cls/ ?class? info method exists /methodName/ +/cls/ ?class? info methods /methodName/ ---------------- |====================== @@ -1867,7 +1877,7 @@ |====================== For definition of class object specific methods, use the modifier -+class-object+ as shown in examples above. ++class+ as shown in examples above. ==== List Filter or Mixins @@ -1907,7 +1917,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ class-object info filter methods \ +/cls/ class info filter methods \ ?-guards? ?-order? ?pattern? ---------------- |[source,tcl] @@ -1916,7 +1926,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ class-object info filter guard /name/ +/cls/ class info filter guard /name/ ---------------- |[source,tcl] ---------------- @@ -1959,7 +1969,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ class-object info mixin classes \ +/cls/ class info mixin classes \ ?-guards? ?-order? ?pattern? ---------------- |[source,tcl] @@ -1968,7 +1978,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ class-object info mixin guard /name/ +/cls/ class info mixin guard /name/ ---------------- |[source,tcl] ---------------- @@ -1992,7 +2002,7 @@ ==== List definition of methods defined by aliases, setters or forwarders -As mentioned earlier, +info method definition" can be used on every +As mentioned earlier, +info method definition+ can be used on every kind of method. [options="header",cols="asciidoc,asciidoc",frame="none",valign="middle"] @@ -2043,7 +2053,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ ?class-object? info method handle /methodName/ +/cls/ ?class? info method handle /methodName/ ---------------- |====================== @@ -2070,7 +2080,7 @@ ---------------- |[source,tcl] ---------------- -/cls/ ?class-object? info method type /methodName/ +/cls/ ?class? info method type /methodName/ ---------------- |====================== @@ -2437,10 +2447,12 @@ ==== Parameter usage without a value 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`. +creation via the dash-interface without a value (in the example below `-x`). [source,tcl] ---------------- +# XOTcl example + Class Foo -parameter {x y} Foo f1 -x -y 1 ---------------- @@ -2456,12 +2468,29 @@ XOTcl 2, the variable won't be set. [source,tcl] ---------------- +# XOTcl example + Class Foo -parameter {{x 1}} Class Bar -superclass Foo -parameter x Bar b1 ---------------- +==== Ignored Parameter definitions +NX does not define the methods +class+ and +superclass+ but allows to +alter the class/superclass via +configure+. The class and superclass +can be certainly queried in all variants with +info class+ or +info superclass+. +[source,tcl] +---------------- +# NX example + +nx::Class create Foo +Foo create f1 +# now oalter the class of object f1 +f1 configure -class nx::Object +---------------- + + === Calling Objects via Method Interface Since the Next Scripting Framework supports the so-called _ensemble @@ -2472,6 +2501,8 @@ [source,tcl] ---------------- +# XOTcl example + Foo::slot::ints foo ... Foo slot ints foo ... ---------------- @@ -2508,6 +2539,7 @@ [source,tcl] ---------------- +# NX example ::nsf::exithandler set|get|unset ?arg? ---------------- Index: doc/next-tutorial.html =================================================================== diff -u -r57570354bfebc1bc24f1ba3d7976c44b2c2bd3e9 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- doc/next-tutorial.html (.../next-tutorial.html) (revision 57570354bfebc1bc24f1ba3d7976c44b2c2bd3e9) +++ doc/next-tutorial.html (.../next-tutorial.html) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -533,8 +533,8 @@ -

    The Next Scripting Language (NX) is a successor of XOTcl 1 and is -based on 10 years of experience with XOTcl in projects containing -several hundert thousand lines of code. While XOTcl was the first -language designed to provide language support for design patterns, -the focus of the Next Scripting Framework and NX are on combining this -with Language Oriented Programming. In many respects, NX was -designed to ease the learning of the language by novices (by using a -more mainstream terminology, higher orthogonality of the methods, less -predefined methods), to improve maintainability (remove sources of -common errors) and to encourage developer to write better structured -programs (to provide interfaces) especially for large projects, where -many developers are involved.

    +

    The Next Scripting Language (NX) is a highly flexible, Tcl +[Ousterhout 1990] based object oriented scripting language. It is a +successor of XOTcl 1 [Neumann and Zdun 2000a] and is based on 10 +years of experience with XOTcl in projects containing several hundert +thousand lines of code. While XOTcl was the first language designed to +provide language support for design patterns, the focus of the Next +Scripting Framework and NX are on combining this with Language +Oriented Programming. In many respects, NX was designed to ease the +learning of the language by novices (by using a more mainstream +terminology, higher orthogonality of the methods, less predefined +methods), to improve maintainability (remove sources of common errors) +and to encourage developer to write better structured programs (to +provide interfaces) especially for large projects, where many +developers are involved.

    The Next Scripting Language is based on the Next Scripting Framework which was developed based on the notion of language oriented programming. The Next Scripting Frameworks provides C-level support @@ -577,7 +579,7 @@

    1. NX and its Roots

    -

    Object oriented extensions of Tcl [Ousterhout 1990] have quite a +

    Object oriented extensions of Tcl have quite a long history. Two of the most prominent early Tcl based OO languages were incr Tcl (abbreviated as itcl) and Object Tcl (OTcl [Wetherall and Lindblad 1995]). While itcl provides a traditional @@ -632,7 +634,7 @@ and encapsulates the behavior of a stack and provides methods to a user of the data structure that abstract from the actual implementation.

    -

    2.1. Define a Class Stack

    +

    2.1. Define a Class "Stack"

    In our first example, we define a class named Stack with the methods push and pop. When an instance of the stack is created (e.g. a concrete stack s1) the stack will be initialized via the constructor @@ -764,7 +766,7 @@ 16 17 18 -

    !#/bin/env tclsh
    +
    #!/bin/env tclsh
     package require nx
     
     nx::Class create Stack {
    @@ -817,7 +819,7 @@
     objects (and classes as well).

    -

    2.2. Define an Object named stack

    +

    2.2. Define an Object Named "stack"

    The definition of the stack in Listing 2 is following the traditional object oriented approach, found in practically every object oriented programming language: Define a class @@ -1246,8 +1248,8 @@ in more detail). Since classes are objects, we can define as well object-specific methods for the class objects. However, since :method applied on classes defines methods for instances, we have to -use the method-modifier class-object to denote methods to be -applied on the class itself. Note that class-object methods are not +use the method-modifier class to denote methods to be +applied on the class itself. Note that class methods are not inherited to instances. These methods defined on the class object are actually exactly same as the object-specific methods in the examples above.

    @@ -1291,7 +1293,7 @@ 26
    nx::Class create Stack2 {
     
    -    :class-object method available_stacks {} {
    +    :public class method available_stacks {} {
           return [llength [:info instances]]
        }
     
    @@ -1317,7 +1319,7 @@
     puts [Stack available_stacks]

    The class Stack2 in Listing 14 consists of the the earlier definition of the class Stack extended by the -class-object-specific method available_stacks, that returns the +class-specific method available_stacks, that returns the current number of instances of the stack. The final command puts (line 26) prints 2 to the console.

    @@ -2403,8 +2405,8 @@

    Index: doc/next-tutorial.txt =================================================================== diff -u -r57570354bfebc1bc24f1ba3d7976c44b2c2bd3e9 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- doc/next-tutorial.txt (.../next-tutorial.txt) (revision 57570354bfebc1bc24f1ba3d7976c44b2c2bd3e9) +++ doc/next-tutorial.txt (.../next-tutorial.txt) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -1,7 +1,7 @@ Tutorial for the Next Scripting Language ========================================== Gustaf Neumann , Stefan Sobernig -v2.0, December 2010: +v2.1, March 2011: Written for the Initial Release of the Next Scripting Framework. :Author Initials: GN :toc: @@ -15,19 +15,22 @@ This document provides a tutorial for the Next Scripting Language NX. ***************************************************************************** -The Next Scripting Language (NX) is a successor of XOTcl 1 and is -based on 10 years of experience with XOTcl in projects containing -several hundert thousand lines of code. While XOTcl was the first -language designed to provide _language support for design patterns_, -the focus of the Next Scripting Framework and NX are on combining this -with _Language Oriented Programming_. In many respects, NX was -designed to ease the learning of the language by novices (by using a -more mainstream terminology, higher orthogonality of the methods, less -predefined methods), to improve maintainability (remove sources of -common errors) and to encourage developer to write better structured -programs (to provide interfaces) especially for large projects, where -many developers are involved. +The Next Scripting Language (NX) is a highly flexible, Tcl +<> based object oriented scripting language. It is a +successor of XOTcl 1 <> and is based on 10 +years of experience with XOTcl in projects containing several hundert +thousand lines of code. While XOTcl was the first language designed to +provide _language support for design patterns_, the focus of the Next +Scripting Framework and NX are on combining this with _Language +Oriented Programming_. In many respects, NX was designed to ease the +learning of the language by novices (by using a more mainstream +terminology, higher orthogonality of the methods, less predefined +methods), to improve maintainability (remove sources of common errors) +and to encourage developer to write better structured programs (to +provide interfaces) especially for large projects, where many +developers are involved. + The Next Scripting Language is based on the Next Scripting Framework which was developed based on the notion of language oriented programming. The Next Scripting Frameworks provides C-level support @@ -41,7 +44,7 @@ == NX and its Roots -Object oriented extensions of Tcl <> have quite a +Object oriented extensions of Tcl have quite a long history. Two of the most prominent early Tcl based OO languages were _incr Tcl_ (abbreviated as itcl) and Object Tcl (_OTcl_ <>). While itcl provides a traditional @@ -93,7 +96,7 @@ and encapsulates the behavior of a stack and provides methods to a user of the data structure that abstract from the actual implementation. -=== Define a Class Stack +=== Define a Class "Stack" In our first example, we define a class named +Stack+ with the methods +push+ and +pop+. When an instance of the stack is created (e.g. a @@ -181,7 +184,7 @@ {set:xmp-using-stack:Listing {figure-number}} [source,tcl,numbers] -------------------------------------------------- -!#/bin/env tclsh +#!/bin/env tclsh package require nx nx::Class create Stack { @@ -235,7 +238,7 @@ creating objects, such as the method +create+ which is used to create objects (and classes as well). -=== Define an Object named stack +=== Define an Object Named "stack" The definition of the stack in <> is following the traditional object oriented approach, found in @@ -554,8 +557,8 @@ in more detail). Since classes are objects, we can define as well object-specific methods for the class objects. However, since +:method+ applied on classes defines methods for instances, we have to -use the method-modifier +class-object+ to denote methods to be -applied on the class itself. Note that class-object methods are not +use the method-modifier +class+ to denote methods to be +applied on the class itself. Note that class methods are not inherited to instances. These methods defined on the class object are actually exactly same as the object-specific methods in the examples above. @@ -567,7 +570,7 @@ -------------------------------------------------- nx::Class create Stack2 { - :class-object method available_stacks {} { + :public class method available_stacks {} { return [llength [:info instances]] } @@ -595,7 +598,7 @@ The class +Stack2+ in <> consists of the the earlier definition of the class +Stack+ extended by the -class-object-specific method +available_stacks+, that returns the +class-specific method +available_stacks+, that returns the current number of instances of the stack. The final command +puts+ (line 26) prints 2 to the console. Index: generic/nsf.c =================================================================== diff -u -r3b7a544e17d23c11227445e2949b94b953fc312c -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- generic/nsf.c (.../nsf.c) (revision 3b7a544e17d23c11227445e2949b94b953fc312c) +++ generic/nsf.c (.../nsf.c) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -13640,7 +13640,7 @@ : Tcl_NewStringObj("public", 6)); } if (withPer_object) { - Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj("class-object", 12)); + Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj("class", 5)); } Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj(registerCmdName, -1)); Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj(methodName, -1)); Index: library/lib/doc-tools.tcl =================================================================== diff -u -rbbf48b80f31cfe50ba2114cf0ec6f1465b60c2e1 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision bbf48b80f31cfe50ba2114cf0ec6f1465b60c2e1) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -185,7 +185,7 @@ namespace eval ::nx::doc::entities {} - :public class-object method normalise {tagpath names} { + :public class method normalise {tagpath names} { # puts stderr "tagpath $tagpath names $names" # 1) verify balancedness of if {[llength $tagpath] != [llength $names]} { @@ -204,7 +204,7 @@ } - :public class-object method find { + :public class method find { -strict:switch -all:switch tagpath @@ -520,7 +520,7 @@ next [list [list @doc:optional __initcmd:initcmd,optional]] } - :class-object attribute current_project:object,type=::nx::doc::@project,0..1 + :class attribute current_project:object,type=::nx::doc::@project,0..1 :public forward current_project [current] %method :attribute partof:object,type=::nx::doc::StructuredEntity @@ -765,7 +765,7 @@ Class create ContainerEntity -superclass StructuredEntity { Class create [current]::Resolvable { - :class-object attribute container:object,type=[:info parent] + :class attribute container:object,type=[:info parent] :method get_fully_qualified_name {name} { set container [[current class] container] if {![string match "::*" $name]} { @@ -856,14 +856,14 @@ [current class]::Resolvable container [current] foreach {attr part_class} [:part_attributes] { - $part_class class-object mixin add [current class]::Containable + $part_class class mixin add [current class]::Containable $part_class container [current] } } :method destroy {} { foreach {attr part_class} [:part_attributes] { - #$part_class class-object mixin add [current class]::Containable + #$part_class class mixin add [current class]::Containable if {[$part_class eval {info exists :container}] && \ [$part_class container] eq [current]} { $part_class eval {unset :container} @@ -1164,7 +1164,7 @@ set :part_class ::nx::doc::@param } - :public class-object method new { + :public class method new { -part_attribute:required -partof:object,type=::nx::doc::Entity -name:any,required @@ -1311,11 +1311,11 @@ :attribute spec :attribute default - :public class-object method id {partof_name scope name} { + :public class method id {partof_name scope name} { next [list [:get_unqualified_name ${partof_name}] $scope $name] } - # :class-object method id {partof_name name} { + # :class method id {partof_name name} { # # The method contains the parameter-specific name production rules. # # # # @param partof Refers to the entity object which contains this part @@ -1335,7 +1335,7 @@ # @param -name # @param args - :public class-object method new { + :public class method new { -part_attribute -partof:required -name:any,required @@ -1433,23 +1433,23 @@ Class create TemplateData { - :class-object attribute renderer + :class attribute renderer :public forward renderer [current] %method :public forward rendered [current] %method - :class-object method "rendered push" {e:object,type=::nx::doc::Entity} { + :class method "rendered push" {e:object,type=::nx::doc::Entity} { if {![info exists :__rendered_entity]} { set :__rendered_entity [list] } set :__rendered_entity [concat $e {*}${:__rendered_entity}] } - :class-object method "rendered pop" {} { + :class method "rendered pop" {} { set :__rendered_entity [lassign ${:__rendered_entity} e] return $e } - :class-object method "rendered top" {} { + :class method "rendered top" {} { return [lindex ${:__rendered_entity} 0] } @@ -1916,8 +1916,8 @@ # TODO: Why is call protection barfing when the protected target # is called from within a public forward. This should qualify as # a valid call site (from "within" the same object!), shouldn't it? - # :protected class-object attribute current_project:object,type=::nx::doc::@project - # :class-object attribute current_project:object,type=::nx::doc::@project + # :protected class attribute current_project:object,type=::nx::doc::@project + # :class attribute current_project:object,type=::nx::doc::@project # :public forward current_project [current] %method # :public forward print_name %current name @@ -2361,21 +2361,21 @@ namespace import -force ::nx::* Class create Sandbox { - :public class-object method type=in {name value arg} { + :public class method type=in {name value arg} { if {$value ni [split $arg |]} { error "The value '$value' provided for parameter $name not permissible." } return $value } - :public class-object method type=fqn {name value} { + :public class method type=fqn {name value} { if {[string first "::" $value] != 0} { error "The value '$value' must be a fully-qualified Tcl name." } return $value } - :public class-object method type=fpathtype {name value arg} { + :public class method type=fpathtype {name value arg} { # # Note: We might receive empty strings in case of [eval]s! # @@ -2386,7 +2386,7 @@ return $value } - :public class-object method type=nonempty {name value} { + :public class method type=nonempty {name value} { if {$value eq ""} { error "An empty value is not allowed for parameter '$name'." } @@ -3151,7 +3151,7 @@ # MetaClassToken n/a Class create MetadataToken { - :class-object attribute analyzer + :class attribute analyzer :public forward analyzer [current] %method :method as {partof:object,type=::nx::doc::StructuredEntity} \ -returns object,type=::nx::doc::Entity { @@ -3963,7 +3963,7 @@ } :attribute current_entity:object - :public class-object method process { + :public class method process { {-partof_entity ""} {-initial_section context} {-parsing_level 0} Index: library/lib/make.tcl =================================================================== diff -u -r9a578692ecf2d05eb4da0de37c7e0bdca3819570 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/lib/make.tcl (.../make.tcl) (revision 9a578692ecf2d05eb4da0de37c7e0bdca3819570) +++ library/lib/make.tcl (.../make.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -159,7 +159,7 @@ if {$argv eq "-n"} {set argv "-n -all"} Class create Script { - :public class-object method create args { + :public class method create args { lappend args {*}$::argv set s [next] set method [list] Index: library/lib/pp.tcl =================================================================== diff -u -r80f8424525f6c3d14ab4755be446758559f810a3 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/lib/pp.tcl (.../pp.tcl) (revision 80f8424525f6c3d14ab4755be446758559f810a3) +++ library/lib/pp.tcl (.../pp.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -95,11 +95,11 @@ scan seek set socket source split stdin stderr stdout string subst switch tell trace unset uplevel update upvar variable vwait while package - public protected class-object + public protected method alias attribute forward my next new self current create init new destroy alloc dealloc - class superclass mixin filter + class superclass mixin filter guard methods lookup ::nx::Class nx::Class ::xotcl::Class xotcl::Class Class ::nx::Object nx::Object ::xotcl::Object xotcl::Object Object Index: library/lib/test.tcl =================================================================== diff -u -r1da9ce4144ca62bd435da5c165fc40983611ecc4 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/lib/test.tcl (.../test.tcl) (revision 1da9ce4144ca62bd435da5c165fc40983611ecc4) +++ library/lib/test.tcl (.../test.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -34,7 +34,7 @@ set :count 0 - :public class-object method case {name arg:optional} { + :public class method case {name arg:optional} { # # Experimental version of Test case, which (1) accepts test case as argument # and (2) destroys all created objects on exit (auto cleanup) @@ -58,7 +58,7 @@ } } - :public class-object method parameter {name value:optional} { + :public class method parameter {name value:optional} { if {[info exists value]} { #[[current] slot $name] default $value #:slot $name default $value @@ -69,7 +69,7 @@ } } - :public class-object method new args { + :public class method new args { set testfile [file rootname [file tail [info script]]] if {[info exists :case]} { if {![info exists :ccount(${:case})]} {set :ccount(${:case}) 0} @@ -80,7 +80,7 @@ :create ${:name} -name ${:name} {*}$args } - :public class-object method run {} { + :public class method run {} { set startTime [clock clicks -milliseconds] foreach example [lsort [:info instances -closure]] { $example run Index: library/nx/nx.tcl =================================================================== diff -u -r3b7a544e17d23c11227445e2949b94b953fc312c -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/nx/nx.tcl (.../nx.tcl) (revision 3b7a544e17d23c11227445e2949b94b953fc312c) +++ library/nx/nx.tcl (.../nx.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -201,12 +201,12 @@ } # - # define method modifiers "class-object", and class level "unknown" + # define method modifiers "class", and class level "unknown" # Class eval { # method-modifier for object specific methos - :method class-object {what args} { + :method class {what args} { if {$what in [list "alias" "attribute" "forward" "method"]} { return [::nsf::dispatch [::nsf::self] ::nsf::classes::nx::Object::$what {*}$args] } @@ -236,7 +236,7 @@ if {$what in [list "filterguard" "mixinguard"]} { return [::nsf::dispatch [::nsf::self] ::nsf::methods::object::$what {*}$args] } - error "'$what' not allowed to be modified by 'class-object'" + error "'$what' not allowed to be modified by 'class'" } # define unknown handler for class :method unknown {m args} { @@ -247,8 +247,8 @@ ::nsf::method::property [::nsf::self] unknown call-protected true } - # Well, class-object is not a method defining method either, but a modifier - array set ::nsf::methodDefiningMethod {method 1 alias 1 attribute 1 forward 1 class-object 1} + # Well, class is not a method defining method either, but a modifier + array set ::nsf::methodDefiningMethod {method 1 alias 1 attribute 1 forward 1 class 1} Object eval { @@ -335,7 +335,7 @@ # the ::ttrace mechanism for partial loading by Zoran. # - Class protected class-object method __unknown {name} {} + Class protected class method __unknown {name} {} # Add alias methods. cmdName for a method can be added via # [... info method handle ] @@ -367,7 +367,7 @@ # Object method require {what args} { switch -- $what { - class-object { + class { set what [lindex $args 0] if {$what eq "method"} { ::nsf::method::require [::nsf::self] [lindex $args 1] 1 @@ -571,7 +571,7 @@ # Definition of "abstract method foo ...." # # Deactivated for now. If we like to revive this method, it should - # be integrated with the method modifiers and the method "class-object" + # be integrated with the method modifiers and the method "class" # # Object method abstract {methtype -per-object:switch methname arglist} { # if {$methtype ne "method"} { @@ -603,7 +603,7 @@ Class create ::nx::MetaSlot ::nsf::relation MetaSlot superclass Class - MetaSlot class-object method requireClass {required:class old:class,0..1} { + MetaSlot class method requireClass {required:class old:class,0..1} { # # Combine two classes and return the more specialized one # @@ -619,7 +619,7 @@ } } - MetaSlot public class-object method createFromParameterSpec { + MetaSlot public class method createFromParameterSpec { target -per-object:switch {-class ""} @@ -1104,11 +1104,11 @@ $obj info filter guard $filter } } - ${os}::Object::slot::mixin method guard {obj prop filter guard:optional} { + ${os}::Object::slot::mixin method guard {obj prop mixin guard:optional} { if {[info exists guard]} { - ::nsf::dispatch $obj ::nsf::methods::object::mixinguard $filter $guard + ::nsf::dispatch $obj ::nsf::methods::object::mixinguard $mixin $guard } else { - $obj info mixin guard $filter + $obj info mixin guard $mixin } } ${os}::Class::slot::mixin method guard {obj prop filter guard:optional} { Index: library/serialize/serializer.tcl =================================================================== diff -u -rc15b56a1490c74cfca4ffd2bf54034526dcf8ef2 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/serialize/serializer.tcl (.../serializer.tcl) (revision c15b56a1490c74cfca4ffd2bf54034526dcf8ef2) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -302,7 +302,7 @@ # class object specfic methods ############################### - :public class-object method allChildren o { + :public class method allChildren o { # return o and all its children fully qualified set set [::nsf::dispatch $o -frame method ::nsf::current] foreach c [$o info children] { @@ -311,21 +311,21 @@ return $set } - :public class-object method exportMethods list { + :public class method exportMethods list { foreach {o p m} $list {set :exportMethods([list $o $p $m]) 1} } - :public class-object method exportObjects list { + :public class method exportObjects list { foreach o $list {set :exportObjects($o) 1} } - :public class-object method exportedMethods {} {array names :exportMethods} - :public class-object method exportedObjects {} {array names :exportObjects} + :public class method exportedMethods {} {array names :exportMethods} + :public class method exportedObjects {} {array names :exportObjects} - :public class-object method resetPattern {} {array unset :ignorePattern} - :public class-object method addPattern {p} {set :ignorePattern($p) 1} + :public class method resetPattern {} {array unset :ignorePattern} + :public class method addPattern {p} {set :ignorePattern($p) 1} - :class-object method checkExportedMethods {} { + :class method checkExportedMethods {} { foreach k [array names :exportMethods] { foreach {o p m} $k break set ok 0 @@ -341,7 +341,7 @@ } } - :class-object method checkExportedObject {} { + :class method checkExportedObject {} { foreach o [array names :exportObjects] { if {![::nsf::isobject $o]} { :warn "Serializer exportObject: ignore non-existing object $o" @@ -355,7 +355,7 @@ } } - :public class-object method all {-ignoreVarsRE -ignore} { + :public class method all {-ignoreVarsRE -ignore} { # # Remove objects which should not be included in the # blueprint. TODO: this is not the best place to do this, since @@ -416,19 +416,19 @@ return $r } - :class-object method add_child_namespaces {ns} { + :class method add_child_namespaces {ns} { if {$ns eq "::nsf"} return lappend :namespaces $ns foreach n [namespace children $ns] { :add_child_namespaces $n } } - :public class-object method application_namespaces {ns} { + :public class method application_namespaces {ns} { set :namespaces "" :add_child_namespaces $ns return ${:namespaces} } - :public class-object method export_nsfprocs {ns} { + :public class method export_nsfprocs {ns} { set result "" foreach n [:application_namespaces $ns] { foreach p [:info methods -methodtype nsfproc ${n}::*] { @@ -438,7 +438,7 @@ return $result } - :public class-object method methodSerialize {object method prefix} { + :public class method methodSerialize {object method prefix} { set s [:new -childof [::nsf::current object] -volatile] foreach oss [ObjectSystemSerializer info instances] { if {[$oss responsibleSerializer $object]} { @@ -450,7 +450,7 @@ return $result } - :public class-object method deepSerialize {-ignoreVarsRE -ignore -map args} { + :public class method deepSerialize {-ignoreVarsRE -ignore -map args} { :resetPattern set s [:new -childof [::nsf::current object] -volatile] #$s volatile @@ -783,7 +783,7 @@ } else { append cmd [list [$o info class] create $objectName -noinit]\n foreach i [lsort [$o ::nsf::methods::object::info::methods -callprotection all -path]] { - append cmd [:method-serialize $o $i "class-object"] "\n" + append cmd [:method-serialize $o $i "class"] "\n" } } Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -red6c291a4217ee648c4fb8264ce45c757a51578f -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision ed6c291a4217ee648c4fb8264ce45c757a51578f) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -62,7 +62,7 @@ } # provide minimal compatibility :public forward instproc %self public method - :public forward proc %self public class-object method + :public forward proc %self public class method } # @@ -967,18 +967,18 @@ {export {}} } { - :public class-object method create {name args} { + :public class method create {name args} { set nq [namespace qualifiers $name] if {$nq ne "" && ![namespace exists $nq]} {Object create $nq} next } - :public class-object method extend {name args} { + :public class method extend {name args} { :require $name $name configure {*}$args } - :public class-object method contains script { + :public class method contains script { if {[info exists :provide]} { package provide [set :provide] [set :version] } else { @@ -1002,16 +1002,16 @@ } } - :public class-object method unknown args { + :public class method unknown args { #puts stderr "unknown: package $args" [set :packagecmd] {*}$args } - :public class-object method verbose value { + :public class method verbose value { set :verbose $value } - :public class-object method present args { + :public class method present args { if {$::tcl_version<8.3} { switch -exact -- [lindex $args 0] { -exact {set pkg [lindex $args 1]} @@ -1027,7 +1027,7 @@ } } - :public class-object method import {{-into ::} pkg} { + :public class method import {{-into ::} pkg} { :require $pkg namespace eval $into [subst -nocommands { #puts stderr "*** package import ${pkg}::* into [namespace current]" @@ -1042,7 +1042,7 @@ } } - :public class-object method require args { + :public class method require args { #puts "XOTCL package require $args, current=[namespace current]" set prevComponent ${:component} if {[catch {set v [package present {*}$args]} msg]} { Index: tests/alias.test =================================================================== diff -u -r65f8883a4596ea98365b7de1652700e3ac7394cc -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/alias.test (.../alias.test) (revision 65f8883a4596ea98365b7de1652700e3ac7394cc) +++ tests/alias.test (.../alias.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -135,75 +135,75 @@ ? {T info methods} {FOO} T public method foo args { return [current class]->[current method] } - T public class-object method bar args { return [current class]->[current method] } + T public class method bar args { return [current class]->[current method] } ::nsf::method::alias T -per-object FOO ::nsf::classes::T::foo ::nsf::method::alias T -per-object BAR ::T::FOO ::nsf::method::alias T -per-object ZAP ::T::BAR #WITH_IMPORT_REFS #? {T info methods} {foo} ? {T info methods} {foo FOO} - ? {lsort [T class-object info methods -methodtype alias]} {BAR FOO ZAP} - ? {lsort [T class-object info methods]} {BAR FOO ZAP bar} + ? {lsort [T class info methods -methodtype alias]} {BAR FOO ZAP} + ? {lsort [T class info methods]} {BAR FOO ZAP bar} ? {t foo} ::T->foo - ? {T class-object info method definition ZAP} {::T public class-object alias ZAP ::T::BAR} + ? {T class info method definition ZAP} {::T public class alias ZAP ::T::BAR} ? {T FOO} ->foo ? {T BAR} ->foo ? {T ZAP} ->foo ? {T bar} ->bar - T class-object method FOO {} {} + T class method FOO {} {} #WITH_IMPORT_REFS #? {T info methods} {foo} ? {T info methods} {foo FOO} - ? {lsort [T class-object info methods]} {BAR ZAP bar} + ? {lsort [T class info methods]} {BAR ZAP bar} ? {T BAR} ->foo ? {T ZAP} ->foo rename ::T::BAR "" #WITH_IMPORT_REFS #? {T info methods} {foo} ? {T info methods} {foo FOO} - ? {lsort [T class-object info methods]} {ZAP bar} + ? {lsort [T class info methods]} {ZAP bar} ? {T ZAP} ->foo; # is ok, still pointing to 'foo' #WITH_IMPORT_REFS #? {T info methods} {foo} ? {T info methods} {foo FOO} - ? {lsort [T class-object info methods]} {ZAP bar} + ? {lsort [T class info methods]} {ZAP bar} ? {T ZAP} ->foo T public method foo {} {} #WITH_IMPORT_REFS #? {T info methods} {} ? {T info methods} {FOO} #WITH_IMPORT_REFS - #? {lsort [T class-object info methods]} {bar} - ? {lsort [T class-object info methods]} {ZAP bar} + #? {lsort [T class info methods]} {bar} + ? {lsort [T class info methods]} {ZAP bar} } Test case alias-per-object { Class create T { - :public class-object method bar args { return [current class]->[current method] } + :public class method bar args { return [current class]->[current method] } :create t } proc ::foo args { return [current class]->[current method] } # # per-object methods as per-object aliases # - T public class-object method m1 args { return [current class]->[current method] } + T public class method m1 args { return [current class]->[current method] } ::nsf::method::alias T -per-object M1 ::T::m1 ::nsf::method::alias T -per-object M11 ::T::M1 - ? {lsort [T class-object info methods]} {M1 M11 bar m1} + ? {lsort [T class info methods]} {M1 M11 bar m1} ? {T m1} ->m1 ? {T M1} ->m1 ? {T M11} ->m1 - T class-object method M1 {} {} - ? {lsort [T class-object info methods]} {M11 bar m1} + T class method M1 {} {} + ? {lsort [T class info methods]} {M11 bar m1} ? {T m1} ->m1 ? {T M11} ->m1 - T class-object method m1 {} {} + T class method m1 {} {} #WITH_IMPORT_REFS - #? {lsort [T class-object info methods]} {bar} - ? {lsort [T class-object info methods]} {M11 bar} + #? {lsort [T class info methods]} {bar} + ? {lsort [T class info methods]} {M11 bar} # # a proc as alias @@ -217,8 +217,8 @@ # ::nsf::method::alias T BAR ::T::FOO2 #WITH_IMPORT_REFS - #? {lsort [T class-object info methods]} {FOO2 bar} - ? {lsort [T class-object info methods]} {FOO2 M11 bar} + #? {lsort [T class info methods]} {FOO2 bar} + ? {lsort [T class info methods]} {FOO2 M11 bar} ? {lsort [T info methods]} {BAR FOO1} ? {T FOO2} ->foo ? {t FOO1} ::T->foo @@ -228,8 +228,8 @@ # rename ::foo "" #WITH_IMPORT_REFS - #? {lsort [T class-object info methods]} {bar} - ? {lsort [T class-object info methods]} {FOO2 M11 bar} + #? {lsort [T class info methods]} {bar} + ? {lsort [T class info methods]} {FOO2 M11 bar} #WITH_IMPORT_REFS #? {lsort [T info methods]} {} ? {lsort [T info methods]} {BAR FOO1} @@ -239,7 +239,7 @@ # namespaced procs + namespace deletion Test case alias-namespaced { Class create T { - :public class-object method bar args { return [current class]->[current method] } + :public class method bar args { return [current class]->[current method] } :create t } @@ -268,19 +268,19 @@ Class create U U create u ? {namespace exists ::U} 0 - U public class-object method zap args { return [current class]->[current method] } + U public class method zap args { return [current class]->[current method] } ::nsf::method::alias ::U -per-object ZAP ::U::zap U require namespace ? {namespace exists ::U} 1 - U public class-object method bar args { return [current class]->[current method] } + U public class method bar args { return [current class]->[current method] } ::nsf::method::alias U -per-object BAR ::U::bar - ? {lsort [U class-object info methods]} {BAR ZAP bar zap} + ? {lsort [U class info methods]} {BAR ZAP bar zap} ? {U BAR} ->bar ? {U ZAP} ->zap namespace delete ::U ? {namespace exists ::U} 0 - ? {lsort [U class-object info methods]} {} + ? {lsort [U class info methods]} {} ? {U info lookup methods BAR} "" ? {U info lookup methods ZAP} "" @@ -294,7 +294,7 @@ Class create V { set :z 1 :public method bar {z} { return $z } - :public class-object method bar {z} { return $z } + :public class method bar {z} { return $z } :create v { set :z 2 } @@ -309,7 +309,7 @@ ::nsf::method::alias V FOO1 ::foo ::nsf::method::alias V -per-object FOO2 ::foo - ? {lsort [V class-object info methods]} {FOO2 bar} + ? {lsort [V class info methods]} {FOO2 bar} ? {lsort [V info methods]} {FOO1 bar} ? {V FOO2} 1-1-1 @@ -318,8 +318,8 @@ ? {lsort [V info methods]} {bar} rename ::foo "" #WITH_IMPORT_REFS - #? {lsort [V class-object info methods]} {bar} - ? {lsort [V class-object info methods]} {FOO2 bar} + #? {lsort [V class info methods]} {bar} + ? {lsort [V class info methods]} {FOO2 bar} } # Index: tests/contains.test =================================================================== diff -u -rbc85b3848186ff8269496f53c45255a11c556f53 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/contains.test (.../contains.test) (revision bc85b3848186ff8269496f53c45255a11c556f53) +++ tests/contains.test (.../contains.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -85,7 +85,7 @@ #puts stderr =====1 set c [Class create C -superclass Class { - :class-object method foo {} {;} + :class method foo {} {;} }] ? {set c} ::C Index: tests/doc.test =================================================================== diff -u -rbd2a503a21c276231612c9aa19a0868316ecf5fc -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/doc.test (.../doc.test) (revision bd2a503a21c276231612c9aa19a0868316ecf5fc) +++ tests/doc.test (.../doc.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -472,7 +472,7 @@ } - :public class-object method foo {a b c} { + :public class method foo {a b c} { # This describes the per-object foo method in the method body # # @parameter b Provides a second value (refined) @@ -645,7 +645,7 @@ } # @.class-object-attribute attr2 Carries a short desc only - :class-object attribute attr2 + :class attribute attr2 # @.method foo # @@ -661,7 +661,7 @@ # # This extended form allows to describe a method parameter with all # its structural features! - set barHandle [:public class-object method bar {p1} { + set barHandle [:public class method bar {p1} { return [current method]-$p1-[current] }] @@ -702,7 +702,7 @@ :attribute p1 # @..class-object-attribute p2 - :class-object attribute p2 + :class attribute p2 } @@ -716,7 +716,7 @@ # forwarder in the context of an owning @method object!) # # @parameter p1 Some words on p1 - :class-object alias "sub foo" $fooHandle + :class alias "sub foo" $fooHandle # @.method sub # @@ -745,7 +745,7 @@ # @parameter p1 Some words on p1 # @see anotherentity # @author ss@thinkersfoot.net - :class-object alias "sub foo2" $fooHandle + :class alias "sub foo2" $fooHandle } } @@ -780,13 +780,13 @@ set entity [@object id ::C::foo] ? [list ::nsf::isobject $entity] 0 - set entity [@attribute id $entity class-object p1] + set entity [@attribute id $entity class p1] ? [list ::nsf::isobject $entity] 0 # ? [list $entity info has type ::nx::doc::@attribute] 1 # ? [list $entity as_text] ".. is overruled by a long one ..." # --testing-- @class-object-attribute attr2 (its non-existance) - set entity [@attribute id [@class id ::C] class-object attr2] + set entity [@attribute id [@class id ::C] class attr2] ? [list ::nsf::isobject $entity] 0 # --testing-- @child-class Foo (its non-existance) set entity [@class id ::C::Foo] @@ -795,14 +795,14 @@ set entity [@method id ::C class foo] ? [list ::nsf::isobject $entity] 0 # --testing-- @class-object-method.parameter {bar p1} (its non-existance) - set entity [@parameter id [@method id ::C class-object bar] "" p1] + set entity [@parameter id [@method id ::C class bar] "" p1] ? [list ::nsf::isobject $entity] 0 # --testing-- @child-object.attribute {foo p1} (its non-existance) set cl [@class id ::C::Foo] ? [list ::nsf::isobject $entity] 0 set entity [@attribute id $cl class p1] ? [list ::nsf::isobject $entity] 0 - set entity [@attribute id $cl class-object p2] + set entity [@attribute id $cl class p2] ? [list ::nsf::isobject $entity] 0 # @@ -837,15 +837,15 @@ ? [list ::nsf::isobject $entity] 1 ? [list $entity info has type ::nx::doc::@object] 1 ? [list $entity as_text] "'foo' needs to be defined before referencing any of its parts!"; # still empty! - set entity [@attribute id $entity class-object p1] + set entity [@attribute id $entity class p1] ? [list ::nsf::isobject $entity] 1 ? [list $entity info has type ::nx::doc::@attribute] 1 ? [list $entity as_text] "The first element in the name list is resolved into a fully qualified (absolute) entity, based on the object owning the initcmd!" # b) newly added ... # --testing-- @class-object-attribute attr2 - set entity [@attribute id [@class id ::C] class-object attr2] + set entity [@attribute id [@class id ::C] class attr2] ? [list ::nsf::isobject $entity] 1 ? [list $entity info has type ::nx::doc::@attribute] 1 ? [list $entity as_text] "Carries a short desc only"; @@ -865,9 +865,9 @@ ? [list ::nsf::isobject $entity] 1 ? [list $entity as_text] "" # --testing-- @class-object-method.parameter {bar p1} (its non-existance) It - # still cannot exist as a documented entity, as the class-object method + # still cannot exist as a documented entity, as the class method # has not been initialised before! - set entity [@parameter id [@method id ::C class-object bar] "" p1] + set entity [@parameter id [@method id ::C class bar] "" p1] ? [list ::nsf::isobject $entity] 0 # --testing-- @child-class.attribute {foo p1} (its non-existance) # --testing-- @child-class.object-attribute {foo p2} (its non-existance) @@ -876,7 +876,7 @@ set entity [@attribute id $cl class p1] ? [list ::nsf::isobject $entity] 1 ? [list $entity as_text] {This is equivalent to stating "@child-class.class-attribute {Foo p1}"} - set entity [@attribute id $cl class-object p2] + set entity [@attribute id $cl class p2] ? [list ::nsf::isobject $entity] 1 ? [list $entity as_text] "Y" @@ -944,7 +944,7 @@ ? [list ::nsf::isobject $entity] 1 ? [list $entity info has type ::nx::doc::@object] 1 ? [list $entity as_text] "Adding a line for the first time (not processed in the initcmd phase!)"; # still empty! - set entity [@attribute id $entity class-object p1] + set entity [@attribute id $entity class p1] ? [list ::nsf::isobject $entity] 1 ? [list $entity info has type ::nx::doc::@attribute] 1 ? [list $entity as_text] {This is equivalent to stating "@class-object-attribute p1"} @@ -962,7 +962,7 @@ set entity [@attribute id $cl class p1] ? [list ::nsf::isobject $entity] 1 ? [list $entity as_text] {This is equivalent to stating "@class-attribute p1"; or '@class.object.attribute {::C Foo p1}' from the top-level.} - set entity [@attribute id $cl class-object p2] + set entity [@attribute id $cl class p2] ? [list ::nsf::isobject $entity] 1 ? [list $entity as_text] "" Index: tests/forward.test =================================================================== diff -u -r939c4689d75f1ab087d28336e108bfb97b7b64c4 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/forward.test (.../forward.test) (revision 939c4689d75f1ab087d28336e108bfb97b7b64c4) +++ tests/forward.test (.../forward.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -286,8 +286,8 @@ Class create NS Class create NS::Main { - :public class-object method m1 {} { :m2 } - :public class-object method m2 {} { + :public class method m1 {} { :m2 } + :public class method m2 {} { ? {namespace eval :: {Object create toplevelObj1}} ::toplevelObj1 ? [list set _ [namespace current]] ::NS @@ -366,7 +366,7 @@ Class create C { :method xx {} {current} - :public class-object method t {o expr} { + :public class method t {o expr} { return [$o expr $expr] } } Index: tests/info-method.test =================================================================== diff -u -r3b7a544e17d23c11227445e2949b94b953fc312c -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/info-method.test (.../info-method.test) (revision 3b7a544e17d23c11227445e2949b94b953fc312c) +++ tests/info-method.test (.../info-method.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -10,18 +10,18 @@ nx::Class create C { :method m {x} {return proc-[self proc]} - :class-object method mpo {} {return instproc-[self proc]} + :class method mpo {} {return instproc-[self proc]} :method m-with-assertions {} {return proc-[self proc]} -precondition 1 -postcondition 2 :forward addOne expr 1 + - :class-object forward add1 expr 1 + - :class-object forward fpo ::o + :class forward add1 expr 1 + + :class forward fpo ::o :attribute s - :class-object attribute spo + :class attribute spo :alias a ::set - :class-object alias apo ::puts + :class alias apo ::puts } C create c1 @@ -40,11 +40,11 @@ ? {c1 info lookup method foo} "::c1::foo" ? {C info method handle m} "::nsf::classes::C::m" - ? {C class-object info method handle mpo} "::C::mpo" + ? {C class info method handle mpo} "::C::mpo" ? {C info method definition m} {::C public method m x {return proc-[self proc]}} ? {C info method def m} {::C public method m x {return proc-[self proc]}} - ? {C class-object info method definition mpo} {::C public class-object method mpo {} {return instproc-[self proc]}} + ? {C class info method definition mpo} {::C public class method mpo {} {return instproc-[self proc]}} ? {C info method definition m-with-assertions} \ {::C public method m-with-assertions {} {return proc-[self proc]} -precondition 1 -postcondition 2} ? {C info method parameter m} {x} @@ -56,20 +56,20 @@ ? {catch {C info method parameter a}} 1 ? {C info method definition addOne} "::C public forward addOne expr 1 +" - ? {C class-object info method definition add1} "::C public class-object forward add1 expr 1 +" - ? {C class-object info method definition fpo} "::C public class-object forward fpo ::o" + ? {C class info method definition add1} "::C public class forward add1 expr 1 +" + ? {C class info method definition fpo} "::C public class forward fpo ::o" ? {C info method definition s} "::C public setter s" - ? {C class-object info method definition spo} "::C public class-object setter spo" + ? {C class info method definition spo} "::C public class setter spo" ? {C info method definition a} "::C public alias a ::set" - ? {C class-object info method definition apo} "::C public class-object alias apo ::puts" + ? {C class info method definition apo} "::C public class alias apo ::puts" ? {::nx::Object info lookup methods -source application} "" ? {::nx::Class info lookup methods -source application} "" set object_methods "alias attribute configure contains copy destroy eval filter forward info method mixin move protected public require volatile" - set class_methods "alias attribute attributes class-object configure contains copy create destroy eval filter forward info method mixin move new protected public require volatile" + set class_methods "alias attribute attributes class configure contains copy create destroy eval filter forward info method mixin move new protected public require volatile" ? {lsort [::nx::Object info lookup methods -source baseclasses]} $class_methods ? {lsort [::nx::Class info lookup methods -source baseclasses]} $class_methods @@ -92,7 +92,7 @@ :protected method bar1 args {;} :method bar2 args {;} :public method foo args {;} - :public class-object method foo args {;} + :public class method foo args {;} } ? {lsort [MC info methods -methodtype scripted -callprotection public]} "foo" @@ -170,16 +170,16 @@ ? {Foo info filter methods -guards} "{f -guard {2 == 2}} f2" ? {Foo filter {}} "" - ? {Foo class-object method f args ::nx::next} "::Foo::f" - ? {Foo class-object method f2 args ::nx::next} "::Foo::f2" - ? {Foo class-object filter {f f2}} "" - ? {Foo class-object info filter methods} "f f2" - ? {Foo class-object filter guard f {2 == 2}} "" - ? {Foo class-object info filter guard f} "2 == 2" - ? {Foo class-object info filter methods -guards f} "{f -guard {2 == 2}}" - ? {Foo class-object info filter methods -guards f2} "f2" - ? {Foo class-object info filter methods -guards} "{f -guard {2 == 2}} f2" - ? {Foo class-object filter {}} "" + ? {Foo class method f args ::nx::next} "::Foo::f" + ? {Foo class method f2 args ::nx::next} "::Foo::f2" + ? {Foo class filter {f f2}} "" + ? {Foo class info filter methods} "f f2" + ? {Foo class filter guard f {2 == 2}} "" + ? {Foo class info filter guard f} "2 == 2" + ? {Foo class info filter methods -guards f} "{f -guard {2 == 2}}" + ? {Foo class info filter methods -guards f2} "f2" + ? {Foo class info filter methods -guards} "{f -guard {2 == 2}} f2" + ? {Foo class filter {}} "" Foo destroy nx::Class create Fly @@ -201,14 +201,14 @@ Foo mixin delete ::Fly ? {Foo info mixin classes} "::nx::Class" - Foo class-object mixin add ::nx::Class - Foo class-object mixin add Fly - ? {Foo class-object info mixin classes} "::Fly ::nx::Class" - ? {Foo class-object mixin guard ::Fly {1}} "" - ? {Foo class-object info mixin classes -guards} "{::Fly -guard 1} ::nx::Class" - ? {Foo class-object info mixin classes -guards Fly} "{::Fly -guard 1}" - Foo class-object mixin delete ::Fly - ? {Foo class-object info mixin classes} "::nx::Class" + Foo class mixin add ::nx::Class + Foo class mixin add Fly + ? {Foo class info mixin classes} "::Fly ::nx::Class" + ? {Foo class mixin guard ::Fly {1}} "" + ? {Foo class info mixin classes -guards} "{::Fly -guard 1} ::nx::Class" + ? {Foo class info mixin classes -guards Fly} "{::Fly -guard 1}" + Foo class mixin delete ::Fly + ? {Foo class info mixin classes} "::nx::Class" ? {Foo info lookup methods create} "create" ? {Foo info lookup method create} "::nsf::classes::nx::Class::create" @@ -229,7 +229,7 @@ nx::Class create D -superclass C { :attribute {b 2} :attribute c - :class-object attribute a2 + :class attribute a2 :method "sub foo" args {;} } @@ -255,8 +255,8 @@ :method "bar b" {x:int y:upper} {return b} :method "bar baz x" {x:int y:upper} {return x} :method "bar baz y" {x:int y:upper} {return y} - :class-object method "foo x" {z:int} {return z} - :class-object method "foo y" {z:int} {return z} + :class method "foo x" {z:int} {return z} + :class method "foo y" {z:int} {return z} } # query definition on submethod @@ -301,8 +301,8 @@ ? {lsort [C info method submethods "bar baz"]} "x y" ? {lsort [C info method submethods "bar baz y"]} "" - ? {lsort [C class-object info method submethods "foo"]} "x y" - ? {lsort [C class-object info method submethods "foo x"]} "" + ? {lsort [C class info method submethods "foo"]} "x y" + ? {lsort [C class info method submethods "foo x"]} "" ? {C info method handle "bar"} {::nsf::classes::C::bar} ? {C info method handle "bar a"} {::nsf::classes::C::bar a} @@ -312,12 +312,12 @@ ? {C info method definition "::nsf::classes::C::bar b"} {::C public method {bar b} {x:int y:upper} {return b}} ? {o2 info method definition "::nsf::classes::C::bar b"} {::C public method {bar b} {x:int y:upper} {return b}} - ? {C class-object info method handle "foo"} {::C::foo} - ? {C class-object info method handle "foo x"} {::C::foo x} + ? {C class info method handle "foo"} {::C::foo} + ? {C class info method handle "foo x"} {::C::foo x} - ? {C class-object info method definition "::C::foo x"} {::C public class-object method {foo x} z:int {return z}} - ? {C info method definition "::C::foo x"} {::C public class-object method {foo x} z:int {return z}} - ? {o2 info method definition "::C::foo x"} {::C public class-object method {foo x} z:int {return z}} + ? {C class info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} + ? {C info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} + ? {o2 info method definition "::C::foo x"} {::C public class method {foo x} z:int {return z}} ? {C info method definition "bar baz y"} \ {::C public method {bar baz y} {x:int y:upper} {return y}} Index: tests/interceptor-slot.test =================================================================== diff -u -red6c291a4217ee648c4fb8264ce45c757a51578f -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/interceptor-slot.test (.../interceptor-slot.test) (revision ed6c291a4217ee648c4fb8264ce45c757a51578f) +++ tests/interceptor-slot.test (.../interceptor-slot.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -60,7 +60,7 @@ # ::nsf::relation C object-mixin M ? {C info precedence} "::M ::nx::Class ::nx::Object" -? {C class-object info mixin classes} "::M" +? {C class info mixin classes} "::M" ::nsf::relation C object-mixin "" ? {C info precedence} "::nx::Class ::nx::Object" @@ -70,48 +70,48 @@ # # C object-mixin M # ? {C info precedence} "::M ::nx::Class ::nx::Object" -# ? {C class-object info mixin classes} "::M" +# ? {C class info mixin classes} "::M" # C object-mixin "" # ? {C info precedence} "::nx::Class ::nx::Object" # -# add and remove class-object mixin for classes via modifier "object" and +# add and remove class mixin for classes via modifier "object" and # "mixin" # -C class-object mixin M +C class mixin M ? {C info precedence} "::M ::nx::Class ::nx::Object" -? {C class-object info mixin classes} "::M" -C class-object mixin "" +? {C class info mixin classes} "::M" +C class mixin "" ? {C info precedence} "::nx::Class ::nx::Object" # -# add and remove class-object mixin for classes via class-object mixin add +# add and remove class mixin for classes via class mixin add # -C class-object mixin add M +C class mixin add M ? {C info precedence} "::M ::nx::Class ::nx::Object" -? {C class-object info mixin classes} "::M" -C class-object mixin "" +? {C class info mixin classes} "::M" +C class mixin "" ? {C info precedence} "::nx::Class ::nx::Object" # # adding per-object mixins for classes via "object mixin add M" # -C class-object mixin add M +C class mixin add M ? {C info precedence} "::M ::nx::Class ::nx::Object" ? {::nsf::relation C object-mixin} ::M -? {catch {C class-object mixin add UNKNOWN}} 1 +? {catch {C class mixin add UNKNOWN}} 1 ? {::nsf::relation C object-mixin} "::M" -C class-object mixin "" +C class mixin "" ? {C info precedence} "::nx::Class ::nx::Object" # # adding per-object mixins for classes via "object mixin M" # -C class-object mixin M +C class mixin M ? {C info precedence} "::M ::nx::Class ::nx::Object" # forwarder with 0 arguments + flag -? {C class-object mixin} "::M" +? {C class mixin} "::M" Test case mixin-add { @@ -123,17 +123,17 @@ Class create C1 ? {C1 info lookup method mixin} "::nsf::classes::nx::Class::mixin" - C1 class-object mixin M1 + C1 class mixin M1 ? {C1 info precedence} "::M1 ::nx::Class ::nx::Object" C1 create c11 ? {c11 info precedence} "::C1 ::nx::Object" - C1 class-object mixin add M11 + C1 class mixin add M11 ? {C1 info precedence} "::M11 ::M1 ::nx::Class ::nx::Object" Object create o -mixin M1 ? {o info precedence} "::M1 ::nx::Object" Class create O - O class-object mixin M1 + O class mixin M1 ? {O info precedence} "::M1 ::nx::Class ::nx::Object" Class create O -object-mixin M1 ? {O info precedence} "::M1 ::nx::Class ::nx::Object" Index: tests/method-modifiers.test =================================================================== diff -u -rf0d274241d978847f40deb439e17172d7d8716d9 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/method-modifiers.test (.../method-modifiers.test) (revision f0d274241d978847f40deb439e17172d7d8716d9) +++ tests/method-modifiers.test (.../method-modifiers.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -27,18 +27,18 @@ :protected alias protected_alias [C info method handle protected_method] # class-object - :class-object method plain_object_method {} {return [current method]} - :public class-object method public_object_method {} {return [current method]} - :protected class-object method protected_object_method {} {return [current method]} - :class-object forward plain_object_forward %self plain_object_method - :public class-object forward public_object_forward %self public_object_method - :protected class-object forward protected_object_forward %self protected_object_method - :class-object attribute plain_object_setter - :public class-object attribute public_object_setter - :protected class-object attribute protected_object_setter - :class-object alias plain_object_alias [:class-object info method handle plain_object_method] - :public class-object alias public_object_alias [:class-object info method handle public_object_method] - :protected class-object alias protected_object_alias [:class-object info method handle protected_object_method] + :class method plain_object_method {} {return [current method]} + :public class method public_object_method {} {return [current method]} + :protected class method protected_object_method {} {return [current method]} + :class forward plain_object_forward %self plain_object_method + :public class forward public_object_forward %self public_object_method + :protected class forward protected_object_forward %self protected_object_method + :class attribute plain_object_setter + :public class attribute public_object_setter + :protected class attribute protected_object_setter + :class alias plain_object_alias [:class info method handle plain_object_method] + :public class alias public_object_alias [:class info method handle public_object_method] + :protected class alias protected_object_alias [:class info method handle protected_object_method] } C create c1 { # methods @@ -65,7 +65,7 @@ C protected attribute s1 ? {c1 s0 0} 0 ? {::nsf::dispatch c1 s1 1} 1 -C class-object attribute s3 +C class attribute s3 ? {C s3 3} 3 # create a fresh object (different from c1) @@ -104,31 +104,31 @@ ########### -# scripted class-object level methods +# scripted class level methods Test case scripted-class-object-level { ? {C plain_object_method} "plain_object_method" ? {C public_object_method} "public_object_method" ? {catch {C protected_object_method}} 1 ? {::nsf::dispatch C protected_object_method} "protected_object_method" } -# class-object level forwards +# class level forwards Test case class-object-level-forwards { ? {C plain_object_forward} "plain_object_method" ? {C public_object_forward} "public_object_method" ? {catch {C protected_object_forward}} 1 ? {::nsf::dispatch C protected_object_forward} "protected_object_method" } -# class-object level setter +# class level setter Test case class-object-level-setter { ? {C plain_object_setter 1} "1" ? {C public_object_setter 2} "2" ? {catch {C protected_object_setter 3}} 1 ? {::nsf::dispatch C protected_object_setter 4} "4" } -# class-object level alias ....TODO: wanted behavior of [current method]? not "plain_alias"? +# class level alias ....TODO: wanted behavior of [current method]? not "plain_alias"? Test case class-object-level-alias { ? {C plain_object_alias} "plain_object_method" ? {C public_object_alias} "public_object_method" @@ -171,7 +171,7 @@ ? {lsort [c1 info methods]} \ "plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter" - ? {lsort [C class-object info methods]} \ + ? {lsort [C class info methods]} \ "plain_object_alias plain_object_forward plain_object_method plain_object_setter public_object_alias public_object_forward public_object_method public_object_setter s3" } @@ -200,24 +200,24 @@ C mixin guard M {} ? {C info mixin guard M} "" - # now the same as class-object mixin and class-object mixin guard - C class-object mixin M - C class-object mixin guard M {1 == 1} - ? {C class-object info mixin guard M} "1 == 1" - C class-object mixin guard M {} - ? {C class-object info mixin guard M} "" + # now the same as class mixin and class mixin guard + C class mixin M + C class mixin guard M {1 == 1} + ? {C class info mixin guard M} "1 == 1" + C class mixin guard M {} + ? {C class info mixin guard M} "" } Test case mixin-via-objectparam { # add an object and class mixin via object-parameter and via slots Class create M1; Class create M2; Class create M3; Class create M4 Class create C -mixin M1 -object-mixin M2 { :mixin add M3 - :class-object mixin add M4 + :class mixin add M4 } - ? {lsort [C class-object info mixin classes]} "::M2 ::M4" - #? {lsort [C class-object info mixin classes]} "::M2" + ? {lsort [C class info mixin classes]} "::M2 ::M4" + #? {lsort [C class info mixin classes]} "::M2" ? {lsort [C info mixin classes]} "::M1 ::M3" #? {lsort [C info mixin classes]} "::M1" @@ -261,13 +261,13 @@ :public attribute {c c1} :protected attribute {d d1} - set X [:class-object attribute A] + set X [:class attribute A] ? [list set _ $X] "::C::A" - # class-object attribute with default - :class-object attribute {B B2} - :public class-object attribute {C C2} - :protected class-object attribute {D D2} + # class attribute with default + :class attribute {B B2} + :public class attribute {C C2} + :protected class attribute {D D2} } C create c1 -a 1 @@ -306,8 +306,8 @@ :method "Info args" {} {return [current object]-[current method]} :method "Info foo" {} {return [current object]-[current method]} - :class-object method "INFO filter guard" {a b} {return [current object]-[current method]} - :class-object method "INFO filter methods" {-guards pattern:optional} {return [current object]-[current method]} + :class method "INFO filter guard" {a b} {return [current object]-[current method]} + :class method "INFO filter methods" {-guards pattern:optional} {return [current object]-[current method]} } ? {Foo INFO filter guard 1 2} ::Foo-guard @@ -330,14 +330,14 @@ package req nx::serializer Test case class-object-attribute { Class create C { - :class-object attribute x + :class attribute x :attribute a:int :create c1 } ? {C x 1} 1 ? {C x} 1 ? {C info methods} "a" - ? {C class-object info methods} x + ? {C class info methods} x ? {c1 a b} {expected integer but got "b" for parameter "a"} set s(C) [C serialize] @@ -357,7 +357,7 @@ # tests should work as again ? {C x} 1 ? {C info methods} "a" - ? {C class-object info methods} x + ? {C class info methods} x ? {c1 a b} {expected integer but got "b" for parameter "a"} } @@ -369,7 +369,7 @@ Test case methoddelete { nx::Class create C { :public method foo {x} {return $x} - :public class-object method bar {x} {return $x} + :public class method bar {x} {return $x} :create c1 } @@ -396,6 +396,6 @@ "'object' is not a method defining method" ? {C object method bar {x} {return $x}} \ {Method 'object' unknown for ::C. Consider '::C create object method bar x {return $x}' instead of '::C object method bar x {return $x}'} - ? {C public class-object object method bar {x} {return $x}} \ - "'object' not allowed to be modified by 'class-object'" + ? {C public class object method bar {x} {return $x}} \ + "'object' not allowed to be modified by 'class'" } Index: tests/method-require.test =================================================================== diff -u -r4536c2540977c43aaf422800dab048e5d9063b3f -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/method-require.test (.../method-require.test) (revision 4536c2540977c43aaf422800dab048e5d9063b3f) +++ tests/method-require.test (.../method-require.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -37,12 +37,12 @@ :require method tcl::set # object methods: - :require class-object method lappend + :require class method lappend # a scripted method - :require class-object method foo + :require class method foo - :require class-object method x + :require class method x # looks as well ok: :require namespace @@ -57,7 +57,7 @@ } Test case parent-require { - ::nx::Class public class-object method __unknown {name} { + ::nx::Class public class method __unknown {name} { #puts stderr "***** __unknown called with <$name>" ::nx::Object create $name } Index: tests/returns.test =================================================================== diff -u -re3a84e351aaf79c02a63cc0741dde7b9bd550849 -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/returns.test (.../returns.test) (revision e3a84e351aaf79c02a63cc0741dde7b9bd550849) +++ tests/returns.test (.../returns.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -305,7 +305,7 @@ :alias lappend -returns integer -frame object ::lappend :forward ++ -returns integer ::expr 1 + :forward | -returns integer ::append _ - :public class-object method instances {} -returns object,1..n {:info instances} + :public class method instances {} -returns object,1..n {:info instances} :create c1 } Index: tests/varresolution.test =================================================================== diff -u -r65f8883a4596ea98365b7de1652700e3ac7394cc -rb3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b --- tests/varresolution.test (.../varresolution.test) (revision 65f8883a4596ea98365b7de1652700e3ac7394cc) +++ tests/varresolution.test (.../varresolution.test) (revision b3018d3be0f1524a3f1709edc0e2ddb5d8bc4c0b) @@ -743,7 +743,7 @@ set :Z 1 set ZZZ 1 :method bar {z} { return $z } - :class-object method bar {z} { return $z } + :class method bar {z} { return $z } :create v { set zzz 2 set :z 2 @@ -760,7 +760,7 @@ set :Z 1 set ZZZ 1 :method bar {z} { return $z } - :class-object method bar {z} { return $z } + :class method bar {z} { return $z } :create v { set :z 2 set zzz 2