Index: doc/next-migration.html =================================================================== diff -u -reb4730787c0719f44e1498bc18a1991dfd779095 -r06f89c385bcc658773eb4dcda50e56abba2eb656 --- doc/next-migration.html (.../next-migration.html) (revision eb4730787c0719f44e1498bc18a1991dfd779095) +++ doc/next-migration.html (.../next-migration.html) (revision 06f89c385bcc658773eb4dcda50e56abba2eb656) @@ -610,9 +610,7 @@ - - # Define two attributes, second with default value

- + Class create Foo -parameter {a {b 1}}

# Create instance of the class Foo
Foo create f1 -a 0

@@ -628,43 +626,103 @@
- -Next example + + + Class Person -slots {
+    Attribute create sex -type "sex" {
+      my proc type=sex {name value} {
+        switch -glob $value {
+          m* {return m}
+          f* {return f}
+          default {error "expected sex but got $value"}
+        }
+      }
+    }
+ }
+
+ + + Class create Person {
+    :attribute sex {
+      :type "sex"
+      :method type=sex {name value} {
+        switch -glob $value {
+          m* {return m}
+          f* {return f}
+          default {error "expected sex but got $value"}
+        }
+      }
+    }
+ }
+
+ + -Person slots { - Attribute create sex -type "sex" { - :method type=sex {name value} { - #puts stderr "[self] slot specific converter" - switch -glob $value { - m* {return m} - f* {return f} - default {error "expected sex but got $value"} - } - } - } -} -vs. + + # Predefined value constraints for parameter not available + + + # Predefined value constraints: object, class, + alnum, alpha,
+ # ascii, boolean, control, digit, double, false, graph,
+ # integer, lower, print, punct, space, true, upper,
+ # wordchar, xdigit


+ Class create Foo -parameter {
+    a:boolean
+    {b:integer 1}
+ }
+
+ Class create Foo {
+    :attribute a:boolean
+    :attribute {b:integer 1}
+ }
+
+ + - Class create Person { - :attribute sex { - :type "sex" - :method type=sex {name value} { - #puts stderr "[self] slot specific converter" - switch -glob $value { - m* {return m} - f* {return f} - default {error "expected sex but got $value"} - } - } - } -} + + # Required parameter not available + + + # Required parameter
+ Class create Foo -parameter {
+    a:boolean,required
+    {b:integer 1}
+ }
+
+ Class create Foo {
+    :attribute a:boolean,required
+    :attribute {b:integer 1}
+ }
+
+ + -Next :types + + # Multivalued parameter not available + + + # Required parameter
+ Class create Foo -parameter {
+    ...
+    ints:integer,multivalued
+    {objs:object,multivalued ""}
+ }
+
+ Class create Foo {
+    ...
+    :attribute ints:integer,multivalued
+    :attribute {objs:object,multivalued ""}
+ }
+
+ + + -Next :required +## allowempty

Method Parameters

@@ -1251,6 +1309,6 @@
- Last modified: Fri Aug 13 13:32:04 CEST 2010 + Last modified: Sun Aug 15 14:04:59 CEST 2010