Index: doc/next-migration.html =================================================================== diff -u -r137f717b92ca826ee943e8c4e74d3151859c378a -rfbf70aa67bec4deec1078074787aafb8b66b2dde --- doc/next-migration.html (.../next-migration.html) (revision 137f717b92ca826ee943e8c4e74d3151859c378a) +++ doc/next-migration.html (.../next-migration.html) (revision fbf70aa67bec4deec1078074787aafb8b66b2dde) @@ -69,8 +69,6 @@ respects:
+ to define and reuse scripted and C-implemented methods.
+
+ nx: +
+ XOTcl 2.0: +
+
Below is a small, introductory example showing an implementation of +a stack in nx and XOTcl. +
Class create Stack { @@ -386,15 +407,15 @@ :attribute {y 1}
:class-object attribute oa1
}
-Object create o {
+ Object create o {
:attribute oa2
- }
+ }
- Class create C \
-attributes {
+Class create C \
+ @@ -423,8 +444,8 @@ :public method-definiton-method ...
-attributes {
x
{y 1}
}
-
:protected method-definiton-method ...
:class-object method-definiton-method ...
- :protected object method-definiton-method ...
- :public object method-definiton-method ...
+ :protected class-object method-definiton-method ...
+ :public class-object method-definiton-method ...
}
@@ -657,26 +678,25 @@Class Foo -parameter {a {b 1}}
# Create instance of the class Foo
Foo f1 -a 0
- # Object f1 has a == 0 and b == 1
+ # Object f1 has a == 0 and b == 1
- Class Foo -slots {
+Class Foo -slots {
Attribute a
Attribute b -default 1
}
# Create instance of the class Foo
Foo f1 -a 0
# Object f1 has a == 0 and b == 1
-Class create Foo -attributes {a {b 1}}
# Create instance of the class Foo
Foo create f1 -a 0
- # Object f1 has a == 0 and b == 1
+ # Object f1 has a == 0 and b == 1
- Class create Foo {
+Class create Foo {
:attribute a
:attribute {b 1}
}
@@ -732,9 +752,9 @@ Class create Foo -attributes {
a:boolean
{b:integer 1}
- }
+ }
- Class create Foo {
+Class create Foo {
:attribute a:boolean
:attribute {b:integer 1}
} @@ -750,9 +770,9 @@ Class create Foo -attributes {
a:boolean,required
{b:integer 1}
- }
+ }
- Class create Foo {
+Class create Foo {
:attribute a:boolean,required
:attribute {b:integer 1}
} @@ -769,9 +789,9 @@ ...
ints:integer,multivalued
{objs:object,multivalued ""}
- }
+ }
- Class create Foo {
+Class create Foo {
...
:attribute ints:integer,multivalued
:attribute {objs:object,multivalued ""}
@@ -1401,7 +1421,7 @@Method Protection
-Incompatibilities between XOTcl 2.0 and XOTcl 1.*
+Incompatibilities between XOTcl 1.* and XOTcl 2.0
Resolvers
@@ -1410,20 +1430,22 @@ starting with single colons are used in XOTcl 1.* scripts, conflicts will arise. -Calling objects like methods
+Calling objects via method interface
-Since the next framework uses a different handling of objects -registered as methods (so called ensemble objects), sub-objects can't -be called in the same way as before. In XOTcl 1.*, it was possible to -call e.g. a method
foo
of the slot object -Foo::slot::ints
via -
Foo::slot::ints foo ...
or via +Since the next framework supports the so-called ensemble objects, +which eas the definition of submethods substantially, objects +registered as methods have different semantics. In XOTcl 1.*, it was +possible to call e.g. a method
foo
of the slot object +Foo::slot::ints
via the following two interfaces the same way: ++
-Now, only the first form -has the same semantic as before. In the second form (call of objects -via method) has now the ensemble object semantics,Foo::slot::ints foo ...
Foo slot ints foo ...
self
-offoo
is now the calling objectFoo
. +Now, only the first form has the same semantic as before. In the second +form (invocation of objects via method interface) has now the ensemble object +semantics. This means that in the second case thecurrent +obect
of methodfoo
is nowFoo
+instead ofints
.Slots
@@ -1457,6 +1479,6 @@
- Last modified: Tue Oct 5 20:03:10 CEST 2010 + Last modified: Tue Oct 12 11:41:40 CEST 2010