<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Migration Guide from XOTcl to the Next Scripting Language</title> <style> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; background-color : white; color: black; } table i { font-size: 80%; } table td code i { font-style: italic; color: green; } table td i.comment { font-style: italic; color: #888888; } pre i { font-style: italic; color: green; } th {color: #888888;} 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: 900; border-collapse:collapse; } table th { width: 400; border:1px solid black; } table td { width: 400; padding: 10px; border:1px solid #AAAAAA; } </style> </head> <body> <h1>Introduction</h1> ... general text, maybe partly from slides/paper .... TODO: Maybe we should not refer to ::nx::core here and import instead the "needed" commands into ::nx namespace. <h2>Using XOTcl 2.0 and the Next Scripting Language in the Next Scripting Framework</h2> <p> In general, the Next Scripting Framework supports multiple object systems concurrently. Effectively, every object system has different base classes for creating objects and classes. Therefore, these object systems can have different different interfaces and names of builtin methods. Currently, the Next Scripting Framework supports primarily XOTcl 2.0 (highly compatible with XOTcl 1.*) and the Next Scripting Language (XOTcl provides about twice as many predefined builtin methods compared to the Next Scripting Language). </p> <p> A single Tcl interpreter can host both, XOTcl and the Next Scripting Language at the same time. This makes migration from XOTcl to Next easier. The following example script shows to use in a single script XOTcl and Next: <p> <pre> namespace eval mypackage { package require XOTcl 2.0 <i># Import XOTcl into the current namespace</i> namespace import -force ::xotcl::* <i># Define a class using XOTcl</i> Class C1 C1 instproc foo {} {puts "hello world"} <i># Import Next into the current namespace</i> namespace import -force ::nx::* <i># Define a class using Next</i> Class create C2 { :method foo {} {puts "hello world"} } } </pre> <p> "Switching" between XOTcl and Next effectively means the load some packages (if needed) and to import either the base classes (<code>Object</code> and <code>Class</code>) of XOTcl or Next into the current namespace. </p> <h1>XOTcl Idioms in the Next Scripting Language</h1> <h2>Defining Objects and Classes</h2> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code>Class <i>ClassName</i></code></td> <td><code>Class create <i>ClassName</i></code></td> </tr> <tr> <td><code>Object <i>ObjectName</i></code></td> <td><code>Object create <i>ObjectName</i></code></td> </tr> <tr> <td><code>::xotcl::Class <i>ClassName</i></code></td> <td><code>::nx::Class create <i>ClassName</i></code></td> </tr> <tr> <td><code>::xotcl::Object <i>ObjectName</i></code></td> <td><code>::nx::Object create <i>ObjectName</i></code></td> </tr> </table> <h2>Defining Methods</h2> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code>Class <i>C</i><br> <i>C</i> instproc <i>foo args</i> {...}<br> <i>C</i> proc <i>bar args</i> {...}<br> </code></td> <td> <i class='comment'># Define method and object method in the init-block of a class</i></br><br> <code>Class create <i>C</i> {<br> :method <i>foo args</i> {...}<br> :object method <i>bar args</i> {...}<br> }<br></code><hr> <i class='comment'># Define method and object method with separate calls</i></br><br> <code>Class create <i>C</i><br> <i>C</i> method <i>foo args</i> {...}<br> <i>C</i> object method <i>bar args</i> {...}<br> </code></td> </tr> <tr> <td><code>Object <i>o</i><br> <i>o</i> set <i>x 1</i><br> <i>o</i> proc <i>foo args</i> {...}<br> </code></td> <td> <i class='comment'># Define object method and set instance variable<br> # in the init-block of an object</i></br><br> <code>Object create <i>o</i> {<br> set :<i>x 1</i><br> :method <i>foo args</i> {...}<br> }<br></code><hr> <i class='comment'># Define object method and set instance variable<br> # with separate commands</i></br><br> <code>Object create <i>o</i><br> <i>o</i> eval {set <i>:x 1</i>}</i><br> <i>o</i> method <i>foo args</i> {...}<br> </code></td> </tr> <tr> <td><i class='comment'># method modifiers "object", "public" and "protected"<br># are not available.</i><br><br> <code>Class <i>C</i><br> <i>C</i> instproc <i>foo args</i> {...}<br> <i>C</i> proc <i>bar args</i> {...}<br> </code> </td> <td> <i class='comment'># Define scripted methods with various method modifiers</i></br><br> <code>Class create <i>C</i> {<br> :method <i>foo1 args</i> {...}<br> :public method <i>foo2 args</i> {...}<br> :protected method <i>foo3 args</i> {...}<br> :object method <i>bar1 args</i> {...}<br> :protected object method <i>bar2 args</i> {...}<br> :public object method <i>bar3 args</i> {...}<br> }<br> </code></td> </tr> <tr> <td><i class='comment'># method modifiers "object", "public" and "protected"<br># are not available.</i><br><br> <code>Class <i>C</i><br> <i>C</i> instforward <i>f1 ...</i> <br> <i>C</i> proc <i>of1 ...</i><br> </code> </td> <td> <i class='comment'># Define forwarder with various method modifiers</i></br><br> <code>Class create <i>C</i> {<br> :forward <i>f1 ...</i><br> :public forward <i>f2 ...</i><br> :protected forward <i>f3 ...</i><br> :object forward <i>of1 ...</i> <br> :public object forward <i>of2 ...</i><br> :protected object forward <i>of3 ...</i><br> }<br> </code></td> </tr> <tr> <td><i class='comment'># method modifiers "object", "public" and "protected"<br># are not available.</i><br><br> <code>Class <i>C</i><br> <i>C</i> instparametercmd <i>s1 ...</i> <br> <i>C</i> parametercmd <i>os1 ...</i><br> </code> </td> <td> <i class='comment'># Define setters with various method modifiers</i></br><br> <code>Class create <i>C</i> {<br> :setter <i>s1 ...</i> {...}<br> :public setter <i>s2 ...</i><br> :protected setter <i>s3 ...</i><br> :object setter <i>os1 ...</i> {...}<br> :public object setter <i>os2 ...</i><br> :protected object setter <i>os3 ...</i><br> }<br> </code> <i class='comment'># TODO: same for "alias" und "attribute" -- mybe more generic, with placeholder for "method", "forward", "setter", "alias" and "attribute"</i> </td> </tr> </table> <h2>Resolvers</h2> The Next Scripting Framework defines Tcl resolvers for method and variable names to refer to object specific behavior. Withing method bodies these resolver treat variable and function names starting with a colon ":" specially. In short, a colon-prefixed variable name refers to an instance variable, and a colon-prefixed function name refers to a method. The sub-sections below provide detailed examples. <p>Note that the Next resolvers are used in the XOTcl 2.* environment as well. <h3>Invoking Methods</h3> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code>Class <i>C</i><br> <i>C</i> instproc <i>foo args</i> {...}<br> <i>C</i> instproc <i>bar args</i> {<br> my <i>foo 1 2 3</i> <i class='comment'> ;# invoke own method</i><br> <i>o baz</i> <i class='comment'>;# invoke other objects method</i><br> }<br> Object <i>o</i><br> <i>o</i> proc <i>baz</i> {} {...}<br> </code></td> <td><code>Class create <i>C</i> {<br> :method <i>foo args</i> {...}<br> :method <i>bar args</i> {<br> :<i>foo 1 2 3</i> <i class='comment'>;# invoke own method</i><br> <i>o baz</i> <i class='comment'>;# invoke other objects method</i><br> }<br> }</br> Object create <i>o</i> {<br> :method <i>baz</i> {} {...}<br> }</br> </code></td> </tr> </table> <h3>Accessing Own Instance Variables from Method Bodies</h3> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code>Class <i>C</i><br> <i>C</i> instproc <i>foo args</i> {<br> <i class='comment'># method scoped variable a</i><br> set <i>a 1</i> <br> <i class='comment'># instance variable b</i><br> my instvar b<br> set<i> b 2</i><br> <i class='comment'># global variable/namespaced variable c</i><br> set <i>::c 3</i><br> }<br> </code></td> <td><code>Class create <i>C</i> {<br> :method <i>foo args</i> {...}<br> <i class='comment'># method scoped variable a</i><br> set <i>a 1</i> <br> <i class='comment'># instance variable b</i><br> set <i>:b 2</i><br> <i class='comment'># global variable/namespaced variable c</i><br> set <i>::c 3</i><br> }<br> }<br> </code></td> </tr> <tr> <td><code>my set <i>varname value</i></code></td> <td> <i class='comment'># set own instance variable to a value via resolver <br># (prefered and fastest way)</i></br><br> <code>set <i>:newVar value</i></code> </td> </tr> <tr> <td><code>my instvar <i>newVar</i><br> set <i>newVar value</i> </code></td> <td> <i class='comment'># set own instance variable via variable import</i><br><br> <code>::nx::var import [self] <i>varname</i><br> set <i>varname value</i> </td> </tr> <tr> <td> <code>set <i>newVar</i> [my set <i>otherVar</i>]</code></td> <td> <i class='comment'># read own instance variable</i><br><br> <code>set <i>newVar</i> [set <i>:otherVar</i>]</code><br><hr> <code>set <i>newVar</i> ${:otherVar}</i></code><br> </td> </tr> <tr> <td><code>my exists <i>varname</i></code></td> <td> <i class='comment'># Test existence of own instance variable</i><br><br> <code>info :<i>varname</i></code> <hr> <code>::nx::var exists [self] <i>varname</i></code> </td> </tr> </table> <h3>Accessing Instance Variables of other Objects</h3> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> set <i>varname value</i></code></td> <td> <i class='comment'># set instance variable of object obj to a value via namespace <br># resolver (prefered way: define setter method on obj)</i></br><br> <code><i>obj</i> eval [list set <i>:varname value</i>]</code></td> </tr> <tr> <td><code>set <i>newVar</i> [<i>obj</i> set <i>otherVar</i>]</code></td> <td> <i class='comment'># read instance variable of object obj via resolver</i></br><br> <code>set <i>newVar</i> [<i>obj</i> eval {set <i>:otherVar</i>}]</code><br> </td> </tr> <tr> <td><code><i>obj</i> instvar <i>newVar</i><br> set <i>newVar value</i> </code> </td> <td> <i class='comment'># read instance variable of object obj via import</i></br><br> <code>::nx::var import <i>obj newVar</i><br> set <i>newVar value</i></td> </tr> <tr> <td><code><i>obj</i> exists <i>varname</i></code></td> <td> <i class='comment'># Test existence of instance variable of object obj</i><br><br> <code><i>obj</i> eval {info exists <i>:varname</i>}</code> <hr> <code>::nx::var exists <i>obj varname</i></code> </td> </tr> </table> <h2>Object Parameters</h2> <h2>Method Parameters</h2> <h2>Introspection</h2> <h4>List methods defined by objects</h4> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> info commands <i>?pattern?</i></code></td> <td><code><i>obj</i> info methods <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>obj</i> info parametercmd <i>?pattern?</i></code></td> <td><code><i>obj</i> info methods -methodtype setter <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>obj</i> info procs <i>?pattern?</i></code></td> <td><code><i>obj</i> info methods -methodtype scripted <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info methods -methodtype alias <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info methods -methodtype forwarder <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info methods -methodtype object <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info methods -callprotection <i>public|protected ...</i></code></td> </tr> </table> <h4>List methods defined by classes</h4> <table> <tr> <td><code><i>cls</i> info instcommands <i>?pattern?</i></code></td> <td><code><i>cls</i> info methods <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info instparametercmd <i>?pattern?</i></code></td> <td><code><i>cls</i> info methods -methodtype setter <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info instprocs <i>?pattern?</i></code></td> <td><code><i>cls</i> info methods -methodtype scripted <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info methods -methodtype alias <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info methods -methodtype forwarder <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info methods -methodtype object <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info methods -callprotection <i>public|protected ...</i></code></td> </tr> </table> <h4>List class object specific methods</h4> <table> <tr> <td><code><i>cls</i> info commands <i>?pattern?</i></code></td> <td><code><i>cls</i> object info methods <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info parametercmd <i>?pattern?</i></code></td> <td><code><i>cls</i> object info methods -methodtype setter <i>?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info procs <i>?pattern?</i></code></td> <td><code><i>cls</i> object info methods -methodtype scripted <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> object info methods -methodtype alias <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> object info methods -methodtype forwarder <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> object info methods -methodtype object <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> object info methods -callprotection <i>public|protected ...</i></code></td> </tr> </table> <h4>List callable methods</h4> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> info methods <i>?pattern?</i></code></td> <td><code><i>obj</i> info callable <i>?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i># list only application specific methods</i></code><br> <code><i>obj</i> info callable -application</code></td> </tr> </table> <h4>List object/class where some method is defined</h4> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> procsearch <i>methodName</i></code></td> <td><code><i>obj</i> info callable -which <i>methodName</i></code></td> </tr> </table> <h4>List definition of scripted methods defined by classes</h4> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>cls</i> info instbody <i>methodName</i></code></td> <td><code><i>cls</i> info method body <i>methodName</i></code></td> </tr> <tr> <td><code><i>cls</i> info instargs <i>methodName</i></code></td> <td><code><i>cls</i> info method args <i>methodName</i></code></td> </tr> <tr> <td><code><i>cls</i> info instnonposargs <i>methodName</i></code></td> <td><code><i>cls</i> info method parameter <i>methodName</i></code></td> </tr> <tr> <td><code><i>cls</i> info instdefault <i>methodName</i></code></td> <td><code><i>cls</i> info method parameter <i>methodName</i></code></td> </tr> <tr> <td><code><i>cls</i> info instpre <i>methodName</i></code></td> <td><code><i>cls</i> info method precondition <i>methodName</i></code></td> </tr> <tr> <td><code><i>cls</i> info instpost <i>methodName</i></code></td> <td><code><i>cls</i> info method postcondition <i>methodName</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info method definition <i>methodName</i></code></td> </tr> </table> <h4>List definition of scripted object specific methods</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> info body <i>methodName</i></code></td> <td><code><i>obj</i> info method body <i>methodName</i></code></td> </tr> <tr> <td><code><i>obj</i> info args <i>methodName</i></code></td> <td><code><i>obj</i> info method args <i>methodName</i></code></td> </tr> <tr> <td><code><i>obj</i> info nonposargs <i>methodName</i></code></td> <td><code><i>obj</i> info method parameter <i>methodName</i></code></td> </tr> <tr> <td><code><i>obj</i> info default <i>methodName</i></code></td> <td><code><i>obj</i> info method parameter <i>methodName</i></code></td> </tr> <tr> <td><code><i>obj</i> info pre <i>methodName</i></code></td> <td><code><i>obj</i> info method precondition <i>methodName</i></code></td> </tr> <tr> <td><code><i>obj</i> info post <i>methodName</i></code></td> <td><code><i>obj</i> info method postcondition <i>methodName</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info method definition <i>methodName</i></code></td> </tr> </table> <p>For definition of class object specific methods, use modifier <code>object</code> as shown in examples above. </p> <h4>List filter or mixins</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> info filter <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>obj</i> info filter <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info filter <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>cls</i> object info filter <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info instfilter <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>cls</i> info filter <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> <tr> <td><code><i>obj</i> info mixin <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>obj</i> info mixin <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info mixin <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>cls</i> object info mixin <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info instmixin <i>?-order? ?-guards? ?pattern?</i></code></td> <td><code><i>cls</i> info mixin <i>?-order? ?-guards? ?pattern?</i></code></td> </tr> </table> <h4>List definition of methods defined by aliases, setters or forwarders</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info method definition <i>methodName</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls ?object?</i> info method definition <i>methodName</i></code></td> </tr> </table> <h4>List fully qualified name of method</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info method name <i>methodName</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls ?object?</i> info method name <i>methodName</i></code></td> </tr> </table> <h4>List type of a method</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><i>n.a.</i></td> <td><code><i>obj</i> info method type <i>methodName</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls ?object?</i> info method type <i>methodName</i></code></td> </tr> </table> <h4>List the scope of mixin classes</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>cls</i> info mixinof <i>?-closure? ?pattern?</i></code></td> <td><code><i>cls</i> info mixinof -scope object <i>?-closure? ?pattern?</i></code></td> </tr> <tr> <td><code><i>cls</i> info instmixinof <i>?-closure? ?pattern?</i></code></td> <td><code><i>cls</i> info mixinof -scope class <i>?-closure? ?pattern?</i></code></td> </tr> <tr> <td><i>n.a.</i></td> <td><code><i>cls</i> info mixinof -scope all <i>?-closure? ?pattern?</i></code></td> </tr> </table> <h4>Check properties of object and classes</h4> <table> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> istype <i>sometype</i></code></td> <td> TODO: ::nx::core::objectproperty and/or ::nx::objectproperty and/or nx::is?<p> <code>::nx::core::objectproperty <i>obj</i> type <i>sometype</i></code><br> <hr> <code><i>obj</i> info is type <i>sometype</i></code> </td> </tr> <tr> <td><code><i>obj</i> ismixin <i>cls</i></code></td> <td> <code>::nx::core::objectproperty <i>obj</i> mixin <i>cls</i></code><br> <hr> <code><i>obj</i> info is mixin <i>cls</i></code> </td> </tr> <tr> <td><code><i>obj</i> isclass <i>?cls?</i></code></td> <td> <code>::nx::core::objectproperty <i>obj|cls</i> class</code><br> <hr> <code><i>obj</i> info is class</code> </td> </tr> <tr> <td><code><i>obj</i> ismetaclass <i>cls</i></code></td> <td><code>::nx::core::objectproperty <i>obj|cls</i> metaclass</code> <hr> <code><i>obj</i> info is metaclass</code> </td> </tr> <tr> <td><i>n.a.</i></td> <td><code>::nx::core::objectproperty <i>cls</i> baseclass</code> <hr> <code><i>cls</i> info is baseclass</code> </td> </tr> <tr> <td><code><i>obj</i> isobject <i>obj2</i></code></td> <td><code>::nx::core::objectproperty <i>obj|obj2</i> object</code> <hr> <code><i>obj</i> info is object</code> </td> </tr> </table> <h2>Predefined Methods</h2> <h2>Dispatch, Aliases, etc.</h2> <h2>Assertions</h2> <table border=1> <tr><th>XOTcl</th><th>Next Scripting Language</th></tr> <tr> <td><code><i>obj</i> check <i>checkoptions</i></code></td> <td><code>::nx::core::assertion <i>obj</i> check <i>checkptions</i></code></td> </tr> <tr> <td><code><i>obj</i> info check</code></td> <td><code>::nx::core::assertion <i>obj</i> check</code></td> </tr> <tr> <td><code><i>obj</i> invar <i>conditions</i></code></td> <td><code>::nx::core::assertion <i>obj</i> object-invar <i>conditions</i></code></td> </tr> <tr> <td><code><i>obj</i> info invar</code></td> <td><code>::nx::core::assertion <i>obj</i> object-invar</code></td> </tr> <tr> <td><code><i>cls</i> instinvar <i>conditions</i></code></td> <td><code>::nx::core::assertion <i>cls</i> class-invar <i>conditions</i></code></td> </tr> <tr> <td><code><i>cls</i> info instinvar</code></td> <td><code>::nx::core::assertion <i>cls</i> class-invar</code></td> </tr> <tr> <td><code><i>cls</i> invar <i>conditions</i></code></td> <td><code>::nx::core::assertion <i>cls</i> object-invar <i>conditions</i></code></td> </tr> <tr> <td><code><i>cls</i> info invar</code></td> <td><code>::nx::core::assertion <i>cls</i> object-invar</code></td> </tr> </table> <h2>Method Protection</h2> <h2>Incompatibilities between Next Scripting/XOTcl 2.0 and XOTcl 1.*</h2> <h3>Resolvers</h3> <p>The tesolvers of the Next Scripting Framework are used as well within XOTcl 2.0. When names starting with single colons are used in XOTcl 1.* scripts, conflicts will arise. </p> <h3>Stronger Checking</h3> <p>The Next Scripting Framework performs stronger checking than XOTcl 1.*. For example, the requiredness of slots in XOTcl was just a comment, while Next enforces it. </p> <h3>Different results</h3> <ul> <li><code>[self next]</code> returns <br> instead of "proc" and "instproc" => "method"<br> instead of "parametercmd" and "instparametercmd" => "setter"<br> instead of "instforward" => "forward"<br> instead of "instcmd" => "cmd".<br> The modifier "object" is added when needed. </li> <li><code>[self filterreg]</code> returns <br> instead of "instforward" => "forward"<br> The modifier "object" is added when needed. </li> </ul> <h3>Exit handlers</h3> <p> The exit hander interface changed from a method of <code>::xotcl::Object</code> into three Tcl procs in the <code>::nx::core</code> namespace. Next provides now: <pre> ::nx::core::setExitHandler script ::nx::core::getExitHandler ::nx::core::unsetExitHandler </pre> <hr> <address></address> <!-- hhmts start --> Last modified: Fri Jul 30 13:56:13 CEST 2010 <!-- hhmts end --> </body> </html>