_ >   736 736 </div></div>
  737 737 <div class="paragraph"><p>The Next Scripting Language (NX) is a successor of XOTcl 1 and is
  738 738 based on 10 years of experience with XOTcl in projects containing
< >   739   several hundert thousand lines of code.  While XOTcl was the first
    739 several hundert thousand lines of code. While XOTcl was the first
740 740 language designed to provide language support for design patterns, the
  741 741 focus of the Next Scripting Framework and NX are on combining this
  742 742 with Language Oriented Programming. In many respects, NX was designed
 
751 751 programming. The Next Scripting Frameworks provides C-level support
  752 752 for defining and hosting multiple object systems in a single Tcl
  753 753 interpreter. The whole definition of NX is fully scripted
< >   754   (e.g. defined in <tt>nx.tcl</tt>).  The Next Scripting Framework is shipped
    754 (e.g. defined in <tt>nx.tcl</tt>). The Next Scripting Framework is shipped
755 755 with three language definitions, containing NX and XOTcl 2.  Most of
  756 756 the existing XOTcl 1 programs can be used without modification in the
  757 757 Next Scripting Framework by using XOTcl 2. The Next Scripting
 
817 817 <div class="olist loweralpha"><ol class="loweralpha">
  818 818 <li>
  819 819 <p>
< >   820   It is possible to use  NX <tt>alias</tt> to register methods
    820 It is possible to use NX <tt>alias</tt> to register methods
821 821      under arbitrary names for arbitrary objects or classes.
  822 822 </p>
  823 823 </li>
 
831 831 </li>
  832 832 <li>
  833 833 <p>
< >   834   One can  invoke in NX fully qualified methods to invoke
    834 One can invoke in NX fully qualified methods to invoke
835 835      methods outside the precedence path.
  836 836 </p>
  837 837 </li>
 
846 846 <li>
  847 847 <p>
  848 848 One can use in NX the same interface to query (introspect)
< >   849       C-implemented and  scripted methods/commands.
    849     C-implemented and scripted methods/commands.
850 850 </p>
  851 851 </li>
  852 852 </ol></div>
 
1862 1862 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
  1863 1863 </style>
  1864 1864 <pre class='nx'><span class='nx-comment'># XOTcl provides only method deletion with
< >   1865   </span><span class='nx-comment'># the equivalent of  Tcl's "proc foo {} {}"
    1865 </span><span class='nx-comment'># the equivalent of Tcl's "proc foo {} {}"
1866 1866 </span><span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>proc</span> foo {} {}
  1867 1867 <span class='nx-placeholder'>/cls/</span> instproc foo {} {}
  1868 1868
 
1987 1987 </li>
  1988 1988 <li>
  1989 1989 <p>
< >   1990   Set or get instance  variables via <tt>my set varName ?value?</tt> or other
    1990 Set or get instance variables via <tt>my set varName ?value?</tt> or other
1991 1991    variable accessing methods registered on <tt>xotcl::Object</tt> such as
  1992 1992    <tt>append</tt>, <tt>lappend</tt>, <tt>incr</tt>, etc.
  1993 1993 </p>
  1994 1994 </li>
  1995 1995 <li>
  1996 1996 <p>
  1997 1997 Register same-named accessor functions and set/get values
< >   1998      of instance variables via  <tt>my varName ?value?</tt>
    1998    of instance variables via <tt>my varName ?value?</tt>
1999 1999 </p>
  2000 2000 </li>
  2001 2001 </ul></div>
 
2896 2896 </style>
  2897 2897 <pre class='nx'><span class='nx-comment'># Predefined value constraints:
  2898 2898 </span><span class='nx-comment'>#    object, class, alnum, alpha, ascii, boolean,
< >   2899   </span><span class='nx-comment'>#    control,  digit, double, false, graph, integer,
  2900   </span><span class='nx-comment'>#    lower, parameter, print, punct,  space, true,
    2899 </span><span class='nx-comment'>#    control, digit, double, false, graph, integer,
    2900 </span><span class='nx-comment'>#    lower, parameter, print, punct, space, true,
2901 2901 </span><span class='nx-comment'>#    upper, wordchar, xdigit
  2902 2902 </span><span class='nx-comment'>#
  2903 2903 </span><span class='nx-comment'># User defined value constraints are possible.
 
2906 2906 </span><span class='nx-comment'>#
  2907 2907 </span><span class='nx-comment'># Define a boolean property and an integer
  2908 2908 </span><span class='nx-comment'># property with a default firstly via "properties",
< >   2909   </span><span class='nx-comment'># then with multiple "property"  statements.
    2909 </span><span class='nx-comment'># then with multiple "property" statements.
2910 2910 </span>
  2911 2911 <span class='nx-keyword'>Class</span> <span class='nx-keyword'>create</span> Foo -properties {
  2912 2912    a:boolean
 
4391 4391 </span><span class='nx-comment'># -source might be all|application|baseclasses
  4392 4392 </span><span class='nx-comment'># -type is the class of the slot object
  4393 4393 </span>
< >   4394   <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> <span class='nx-keyword'>lookup</span> slots ?-type ...? ?-<span class='nx-keyword'>source</span> ... <span class='nx-placeholder'>?pattern?</span>
    4394 <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> <span class='nx-keyword'>lookup</span> slots <span class='nx-placeholder'>?-type ...?</span> ?-<span class='nx-keyword'>source</span> ... <span class='nx-placeholder'>?pattern?</span>
4395 4395
  4396 4396 <span class='nx-comment'># Returns list of slot objects</span></pre></div></div></div></td>
  4397 4397 </tr>
 
4952 4952 <tt>class</tt> as shown in examples above.</p></div>
  4953 4953 </div>
  4954 4954 <div class="sect3">
< >   4955   <h4 id="_list_slots">2.6.9. List Slots</h4>
    4955 <h4 id="_list_slots_and_their_definitions">2.6.9. List Slots and their definitions</h4>
4956 4956 <div class="tableblock">
  4957 4957 <table rules="all"
  4958 4958 width="100%"
 
4991 4991 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
  4992 4992 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
  4993 4993 </style>
< >   4994   <pre class='nx'><span class='nx-comment'># Return  list of slots objects defined on the
    4994 <pre class='nx'><span class='nx-comment'># Return list of slots objects defined on the
4995 4995 </span><span class='nx-comment'># object or class
  4996 4996 </span><span class='nx-comment'>#
  4997 4997 </span><span class='nx-comment'># -source might be all|application|baseclasses
  4998 4998 </span><span class='nx-comment'># -type is the class of the slot object
  4999 4999 </span><span class='nx-comment'># -closure includes slots of superclasses
  5000 5000 </span>
< >   5001   <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> slots ?-type ...? <span class='nx-placeholder'>?pattern?</span>
  5002   <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>class</span> <span class='nx-keyword'>info</span> slots ?-type ...? <span class='nx-placeholder'>?pattern?</span>
  5003   <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> slots ?-type ...? ?-<span class='nx-keyword'>source</span> ...? <span class='nx-placeholder'>?-closure?</span> <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
    5001 <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> slot objects <span class='nx-placeholder'>?-type ...?</span> <span class='nx-placeholder'>?pattern?</span>
    5002 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>class</span> <span class='nx-keyword'>info</span> slot objects <span class='nx-placeholder'>?-type ...?</span> <span class='nx-placeholder'>?pattern?</span>
    5003 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> slot objects \
    5004    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
5004 5005 </tr>
< >     5006 <tr>
    5007 <td align="left" valign="middle"><div><div class="listingblock">
    5008 <div class="content"><style type='text/css'>
    5009 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5010 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5011 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5012 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5013 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5014 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5015 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5016 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5017 </style>
    5018 <pre class='nx'><span class='nx-comment'># n.a.</span></pre></div></div></div></td>
    5019 <td align="left" valign="middle"><div><div class="listingblock">
    5020 <div class="content"><style type='text/css'>
    5021 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5022 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5023 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5024 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5025 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5026 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5027 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5028 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5029 </style>
    5030 <pre class='nx'><span class='nx-comment'># List definition of slots
    5031 </span>
    5032 <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> slot definition \
    5033    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span>
    5034 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>class</span> <span class='nx-keyword'>info</span> slot definition \
    5035    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span>
    5036 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> slot definition \
    5037    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
    5038 </tr>
    5039 <tr>
    5040 <td align="left" valign="middle"><div><div class="listingblock">
    5041 <div class="content"><style type='text/css'>
    5042 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5043 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5044 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5045 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5046 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5047 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5048 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5049 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5050 </style>
    5051 <pre class='nx'><span class='nx-comment'># n.a.</span></pre></div></div></div></td>
    5052 <td align="left" valign="middle"><div><div class="listingblock">
    5053 <div class="content"><style type='text/css'>
    5054 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5055 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5056 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5057 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5058 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5059 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5060 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5061 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5062 </style>
    5063 <pre class='nx'><span class='nx-comment'># List names of slots
    5064 </span>
    5065 <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> slot names \
    5066    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span>
    5067 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>class</span> <span class='nx-keyword'>info</span> slot names \
    5068    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span>
    5069 <span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> slot names \
    5070    <span class='nx-placeholder'>?-type value?</span> <span class='nx-placeholder'>?-closure?</span> ?-<span class='nx-keyword'>source</span> value? <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
    5071 </tr>
    5072 <tr>
    5073 <td align="left" valign="middle"><div><div class="listingblock">
    5074 <div class="content"><style type='text/css'>
    5075 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5076 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5077 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5078 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5079 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5080 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5081 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5082 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5083 </style>
    5084 <pre class='nx'><span class='nx-comment'># n.a.</span></pre></div></div></div></td>
    5085 <td align="left" valign="middle"><div><div class="listingblock">
    5086 <div class="content"><style type='text/css'>
    5087 .nx             {color: #000000; font-weight: normal; font-style: normal; padding-left: 10px}
    5088 table.nx        {border-collapse: collapse; border-spacing: 3px;}
    5089 .nx-linenr      {border-right: 1px solid #DDDDDD;padding-right: 5px; color: #2B547D;font-style: italic;}
    5090 .nx-string      {color: #779977; font-weight: normal; font-style: italic;}
    5091 .nx-comment     {color: #717ab3; font-weight: normal; font-style: italic;}
    5092 .nx-keyword     {color: #7f0055; font-weight: normal; font-style: normal;}
    5093 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
    5094 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
    5095 </style>
    5096 <pre class='nx'><span class='nx-comment'># List reachable slot objects defined for obj
    5097 </span><span class='nx-comment'># -source might be all|application|baseclasses
    5098 </span><span class='nx-comment'># -type is the class of the slot object
    5099 </span>
    5100 <span class='nx-placeholder'>/obj/</span> <span class='nx-keyword'>info</span> <span class='nx-keyword'>lookup</span> slots \
    5101    <span class='nx-placeholder'>?-type ...?</span> ?-<span class='nx-keyword'>source</span> ... <span class='nx-placeholder'>?pattern?</span>
    5102
    5103 <span class='nx-comment'># Returns list of slot objects</span></pre></div></div></div></td>
    5104 </tr>
5005 5105 </tbody>
  5006 5106 </table>
  5007 5107 </div>
 
5046 5146 .nx-placeholder {color: #AF663F; font-weight: normal; font-style: italic;}
  5047 5147 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
  5048 5148 </style>
< >   5049   <pre class='nx'><span class='nx-comment'># Return  parameter(s) provided by class for
    5149 <pre class='nx'><span class='nx-comment'># Return parameter(s) provided by class for
5050 5150 </span><span class='nx-comment'># its instances; defines, how objects of this
  5051 5151 </span><span class='nx-comment'># class can be configured. If name is provided
  5052 5152 </span><span class='nx-comment'># only the named object parameter is returned
 
5059 5159 </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter <span class='nx-keyword'>list</span> <span class='nx-placeholder'>?name?</span>
  5060 5160
  5061 5161 <span class='nx-comment'># Return just the names of the parameters
< >   5062   </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter name <span class='nx-placeholder'>?name?</span>
    5162 </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter names <span class='nx-placeholder'>?name?</span>
5063 5163
  5064 5164 <span class='nx-comment'># Return the full parameter specs
< >   5065   </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter spec <span class='nx-placeholder'>?name?</span>
    5165 </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter definition <span class='nx-placeholder'>?name?</span>
5066 5166
  5067 5167 <span class='nx-comment'># Return the slot object(s)
  5068 5168 </span><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> parameter slot <span class='nx-placeholder'>?name?</span>
 
5390 5490 .nx-variable    {color: #AF663F; font-weight: normal; font-style: normal;}
  5391 5491 </style>
  5392 5492 <pre class='nx'><span class='nx-placeholder'>/cls/</span> <span class='nx-keyword'>info</span> <span class='nx-keyword'>mixin</span> classes \
< >   5393      <span class='nx-placeholder'>?-closure?</span>  <span class='nx-placeholder'>?-guards?</span> <span class='nx-placeholder'>?-heritage?</span> <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
    5493    <span class='nx-placeholder'>?-closure?</span> <span class='nx-placeholder'>?-guards?</span> <span class='nx-placeholder'>?-heritage?</span> <span class='nx-placeholder'>?pattern?</span></pre></div></div></div></td>
5394 5494 </tr>
  5395 5495 <tr>
  5396 5496 <td align="left" valign="middle"><div><div class="listingblock">
 
5473 5573 </div>
  5474 5574 <div class="sect3">
  5475 5575 <h4 id="_list_method_handles">2.6.13. List Method-Handles</h4>
< >   5476   <div class="paragraph"><p>NX supports  <em>method-handles</em> to provide means to obtain further
    5576 <div class="paragraph"><p>NX supports <em>method-handles</em> to provide means to obtain further
5477 5577 information about a method or to change maybe some properties of a
  5478 5578 method. When a method is created, the method creating method returns
  5479 5579 the method handle to the created method.</p></div>
 
6756 6856 <div id="footer">
  6757 6857 <div id="footer-text">
  6758 6858 Version 2.1<br />
< >   6759   Last updated 2011-09-05 10:10:31 CEST
    6859 Last updated 2011-09-05 13:18:52 CEST
< _   6760 6860 </div>
  6761 6861 </div>
  6762 6862 </body>