Index: TODO
===================================================================
diff -u -rc4997e0189bb712287aa53d12bb3e332acfb781d -rf25391601dc81bb54fe227aa5e9341d17de30ae9
--- TODO (.../TODO) (revision c4997e0189bb712287aa53d12bb3e332acfb781d)
+++ TODO (.../TODO) (revision f25391601dc81bb54fe227aa5e9341d17de30ae9)
@@ -3710,21 +3710,20 @@
"info method registrationhandle /methodName/"
- rename "info method origin /methodName/" into
"info method definitionhandle /methodName/"
+
+- added "info method handle" as short form of "info method definitionhandle"
- added "info method origin" to return the target of an alias (or empty)
+- update migration guide and tutorial
+========================================================================
TODO:
- warnings for "numeric" names for args and nonpos-args?
- special handling of values looking like nonpos-flags,
but wich are not ones (-1, "- a b c", ....) in detection
when to throw unknow.
- - private:
- * document private in tutorial
-
- - add "property" and "attribute" and "info property" and "info slot ..." to migration guide
-
- naming of slot classes
* should we switch from "-class" to "-slotclass"?
Index: doc/next-migration.html
===================================================================
diff -u -rf41ae7e802868efee95b5d5682edfdbbe9ba2f64 -rf25391601dc81bb54fe227aa5e9341d17de30ae9
--- doc/next-migration.html (.../next-migration.html) (revision f41ae7e802868efee95b5d5682edfdbbe9ba2f64)
+++ doc/next-migration.html (.../next-migration.html) (revision f25391601dc81bb54fe227aa5e9341d17de30ae9)
@@ -1079,14 +1079,14 @@
- :variable things ""
+ :variable things ""
- :public method push {thing} {
+ :public method push {thing} {
set :things [linsert ${:things} 0 $thing]
return $thing
}
- :public method pop {} {
+ :public method pop {} {
set top [lindex ${:things} 0]
set :things [lrange ${:things} 1 end]
return $top
@@ -1176,17 +1176,17 @@
namespace eval mypackage {
- package require XOTcl 2.0
+ package require XOTcl 2.0
xotcl::Class C1
C1 instproc foo {} {puts "hello world"}
- package require nx
+ package require nx
nx::Class create C2 {
- :public method foo {} {puts "hello world"}
+ :public method foo {} {puts "hello world"}
}
}
One could certainly create object or classes from the different object
@@ -1361,8 +1361,8 @@
Class create C {
- :method foo args {...}
- :class method bar args {...}
+ :method foo args {...}
+ :class method bar args {...}
}
Class create C {
- :method foo args {...}
- :method bar args {
+ :method foo args {...}
+ :method bar args {
:foo 1 2 3 ; o baz ; }
}
Object create o {
- :public method baz {} {...}
+ :public method baz {} {...}
}
@@ -2053,7 +2053,7 @@
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
Class create C {
- :method foo args {...}
+ :method foo args {...}
set a 1
Class create Foo {
- :variable x 1
- :variable y 2
+ :variable x 1
+ :variable y 2
}
Class create Foo {
- :class variable V 100
- :variable x 1
+ :class variable V 100
+ :variable x 1
}
@@ -2731,8 +2731,8 @@
Class create Foo {
- :property a
- :property {b 1}
+ :property a
+ :property {b 1}
}
Class create C {
- :property x
- :property {y 1}
- :class property cp
+ :property x
+ :property {y 1}
+ :class property cp
}
Object create o {
- :property op
+ :property op
}
@@ -2803,7 +2803,7 @@
Class Person -slots {
Attribute create sex -type "sex" {
my proc type=sex {name value} {
- switch -glob $value {
+ switch -glob $value {
m* {return m}
f* {return f}
default {
@@ -2829,10 +2829,10 @@
Class create Person {
- :property sex {
+ :property sex {
:type "sex"
- :method type=sex {name value} {
- switch -glob $value {
+ :method type=sex {name value} {
+ switch -glob $value {
m* {return m}
f* {return f}
default {
@@ -2924,8 +2924,8 @@
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
Class create Foo {
- :property a:boolean
- :property {b:integer 1}
+ :property a:boolean
+ :property {b:integer 1}
}
@@ -2997,8 +2997,8 @@
Class create Foo {
- :property a:required
- :property b:boolean,required
+ :property a:required
+ :property b:boolean,required
}
@@ -3069,9 +3069,9 @@
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
Class create Foo {
- :property {ints:integer,0..n ""}
- :property objs:object,1..n
- :property obj:object,0..1
+ :property {ints:integer,0..n ""}
+ :property objs:object,1..n
+ :property obj:object,0..1
}
@@ -3145,10 +3145,10 @@
Class create C {
- :public method foo {-x:integer -y:required -z a b} {
+ :public method foo {-x:integer -y:required -z a b} {
}
- :create c1
+ :create c1
}
c1 foo -x 1 -y a 2 3
@@ -3186,22 +3186,22 @@
Class create C {
:public method m1 {a b -x:integer -y} {
+ :public method m1 {a b -x:integer -y} {
}
:public method m2 {a:integer b:boolean} {
+ :public method m2 {a:integer b:boolean} {
}
:public method set {varName value:optional} {
+ :public method set {varName value:optional} {
}
:public method m3 {-objs:object,1..n c:class,0..1} {
+ :public method m3 {-objs:object,1..n c:class,0..1} {
}
@@ -3272,24 +3272,24 @@
:method foo -returns integer {-x:integer} {
+ :method foo -returns integer {-x:integer} {
}
:alias incr -returns integer ::incr
+ :alias incr -returns integer ::incr
:forward ++ -returns integer ::expr 1 +
+ :forward ++ -returns integer ::expr 1 +
:public class method instances {} \
+ :public class method instances {} \
-returns object,1..n {
- return [:info instances]
+ return [:info instances]
}
}
@@ -4325,7 +4325,7 @@
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
/obj/ info lookup methods -source application ... ?pattern?
+/obj/ info lookup methods -source application ... ?pattern?
@@ -4391,7 +4391,7 @@
-/obj/ info lookup slots ?-type ...? ?-source ... ?pattern?
+/obj/ info lookup slots ?-type ...? ?-source ... ?pattern?
@@ -5001,7 +5001,7 @@
/obj/ info slot objects ?-type ...? ?pattern?
/cls/ class info slot objects ?-type ...? ?pattern?
/cls/ info slot objects \
- ?-type value? ?-closure? ?-source value? ?pattern?
+ ?-type value? ?-closure? ?-source value? ?pattern?
@@ -5030,11 +5030,11 @@
/obj/ info slot definition \
- ?-type value? ?-closure? ?-source value? ?pattern?
+ ?-type value? ?-closure? ?-source value? ?pattern?
/cls/ class info slot definition \
- ?-type value? ?-closure? ?-source value? ?pattern?
+ ?-type value? ?-closure? ?-source value? ?pattern?
/cls/ info slot definition \
- ?-type value? ?-closure? ?-source value? ?pattern? |
+ ?-type value? ?-closure? ?-source value? ?pattern?
@@ -5048,6 +5048,35 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
+ /cls/ info parameter |
+
+
+
+/cls/ info properties \
+ ?-type value? ?-closure? ?-source value? ?pattern? |
+
+
+ |
- /obj/ info method handle /methodName/
-/cls/ ?class? info method handle /methodName/ |
+/obj/ info method handle /methodName/
+/cls/ ?class? info method handle /methodName/
+/obj/ info method registrationhandle /methodName/
+/cls/ ?class? info method registrationhandle /methodName/
+/obj/ info method origin /methodName/
+/cls/ ?class? info method origin /methodName/
@@ -5936,7 +5985,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
-/obj/ info is metaclass
+/obj/ info is metaclass
@@ -6411,7 +6460,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- /obj/ require namespace |
+/obj/ require namespace
@@ -6437,7 +6486,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- /obj/ require method |
+/obj/ require method
@@ -6490,7 +6539,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
-::nsf::method::assertion /obj/ check /checkptions/
+::nsf::method::assertion /obj/ check /checkptions/
@@ -6516,7 +6565,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /obj/ check |
+::nsf::method::assertion /obj/ check
@@ -6542,7 +6591,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /obj/ object-invar /conditions/ |
+::nsf::method::assertion /obj/ object-invar /conditions/
@@ -6568,7 +6617,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /obj/ object-invar |
+::nsf::method::assertion /obj/ object-invar
@@ -6594,7 +6643,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /cls/ class-invar /conditions/ |
+::nsf::method::assertion /cls/ class-invar /conditions/
@@ -6620,7 +6669,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /cls/ class-invar |
+::nsf::method::assertion /cls/ class-invar
@@ -6646,7 +6695,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /cls/ object-invar /conditions/ |
+::nsf::method::assertion /cls/ object-invar /conditions/
@@ -6672,7 +6721,7 @@
.nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
.nx-variable {color: #AF663F; font-weight: normal; font-style: normal;}
- ::nsf::method::assertion /cls/ object-invar |
+::nsf::method::assertion /cls/ object-invar
@@ -6747,7 +6796,7 @@
Class Foo -parameter {{x 1}}
-Class Bar -superclass Foo -parameter x
+Class Bar -superclass Foo -parameter x
Bar b1
@@ -6771,10 +6820,10 @@
nx::Class create Foo
Foo create f1
f1 configure -class nx::Object
+f1 configure -class nx::Object
::nsf::relation f1 class ::nx::Object
+::nsf::relation f1 class ::nx::Object
3.2.4. Info heritage
@@ -6856,7 +6905,7 @@