Index: doc/migration1-2.html =================================================================== diff -u -r1ddb61a407f327672ce64aa1c1610e7043c10ec7 -rff41e1a0cb88c3aa7b96ca3b67b27043794991b0 --- doc/migration1-2.html (.../migration1-2.html) (revision 1ddb61a407f327672ce64aa1c1610e7043c10ec7) +++ doc/migration1-2.html (.../migration1-2.html) (revision ff41e1a0cb88c3aa7b96ca3b67b27043794991b0) @@ -8,28 +8,40 @@ background-color : white; color: black; } -code em { - /*font-family: cursive;*/ - color: #888888; +table i { + font-size: 80%; } -code tt { - font-family: helvetica; - font-weight: 900; +table td code i { + font-style: italic; + color: green; } -code i { - font-style: italic; - color: green; -} -tt em { -font-family: cursive; - color: #888888; -} + th {color: #888888;} -td hr {color: #FFFFFF; margin: 10 10 10 10;} +td hr { + color: #FFFFFF; + border-bottom-style: none; + border-left-style: none; + border-right-style: none; + border-top-style: dashed; + border-color: #AAAAAA; + margin: 10 10 10 10; +} /*table {font-size: 80%;}*/ -table {width: 700;} +table { + width: 900; + border-collapse:collapse; +} +table th { + width: 400; + border:1px solid black; +} +table td { + width: 400; + border:1px solid #AAAAAA; +} + @@ -52,7 +64,7 @@

XOTcl 1 Idioms in XOTcl 2

Defining Objects and Classes

- +
@@ -164,82 +176,191 @@
XOTcl 1XOTcl 2
Class ClassName
- - + + - - + - - - - + +
XOTcl 1XOTcl 2
someObject set varname valuesomeObject eval [list set .varname value]obj set varname valueobj eval [list set .varname value]
set newVar [someObject set otherVar]set newVar [someObject eval {set .otherVar}]
+
set newVar [obj set otherVar]set newVar [obj eval {set .otherVar}]
someObject instvar newVar
+
obj instvar newVar
set newVar value
::xotcl::importvar someObject newVar
+
::xotcl::importvar obj newVar
set newVar value
someObject exists varnamesomeObject eval {info exists .varname}obj exists varnameobj eval {info exists .varname}

Object Parameters

Method Parameters

Introspection

+ +

List methods defined by objects

- - - + + + - - + + + + + + + + + + + + + + + + + + + + + +
XOTcl 1XOTcl 2
someObject info methods ?pattern?someObject info callable ?pattern?
obj info commands ?pattern?obj info methods ?pattern?
someObject procsearch methodNamesomeObject info callable -which methodNameobj info parametercmd ?pattern?obj info methods -methodtype setter ?pattern?
obj info procs ?pattern?obj info methods -methodtype scripted ?pattern?
n.a.obj info methods -methodtype alias ?pattern?
n.a.obj info methods -methodtype forwarder ?pattern?
n.a.obj info methods -methodtype object ?pattern?
n.a.obj info methods -callprotection public|protected ...
- +

List methods defined by classes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cls info instcommands ?pattern?cls info methods ?pattern?
cls info instparametercmd ?pattern?cls info methods -methodtype setter ?pattern?
cls info instprocs ?pattern?cls info methods -methodtype scripted ?pattern?
n.a.cls info methods -methodtype alias ?pattern?
n.a.cls info methods -methodtype forwarder ?pattern?
n.a.cls info methods -methodtype object ?pattern?
n.a.cls info methods -callprotection public|protected ...
+ +

List class object specific methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cls info commands ?pattern?cls object info methods ?pattern?
cls info parametercmd ?pattern?cls object info methods -methodtype setter ?pattern?
cls info procs ?pattern?cls object info methods -methodtype scripted ?pattern?
n.a.cls object info methods -methodtype alias ?pattern?
n.a.cls object info methods -methodtype forwarder ?pattern?
n.a.cls object info methods -methodtype object ?pattern?
n.a.cls object info methods -callprotection public|protected ...
+ +

List callable methods

+ + + + + + + + + + +
XOTcl 1XOTcl 2
obj info methods ?pattern?obj info callable ?pattern?
n.a.# list only application specific methods
+ obj info callable -application
+ +

List object/class where some method is defined

+ + + + + + + +
XOTcl 1XOTcl 2
obj procsearch methodNameobj info callable -which methodName
+

Predefined Methods

Dispatch, Aliases, etc.

Assertions

- - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -248,5 +369,5 @@
- Last modified: Mon Jan 4 21:25:17 CET 2010 + Last modified: Tue Jan 5 18:26:03 CET 2010
XOTcl 1XOTcl 2
objectName check checkptions::xotcl::assertion objectName check checkptionsobj check checkptions::xotcl::assertion obj check checkptions
objectName info check::xotcl::assertion objectName checkobj info check::xotcl::assertion obj check
objectName invar conditions::xotcl::assertion objectName object-invar conditionsobj invar conditions::xotcl::assertion obj object-invar conditions
objectName info invar::xotcl::assertion objectName object-invarobj info invar::xotcl::assertion obj object-invar
className instinvar conditions::xotcl::assertion className class-invar conditionscls instinvar conditions::xotcl::assertion cls class-invar conditions
className info instinvar::xotcl::assertion className class-invarcls info instinvar::xotcl::assertion cls class-invar
className invar conditions::xotcl::assertion className object-invar conditionscls invar conditions::xotcl::assertion cls object-invar conditions
className info invar::xotcl::assertion className object-invarcls info invar::xotcl::assertion cls object-invar