<br><font size=2><tt>xotcl-bounces@alice.wu-wien.ac.at wrote on 09/15/2006
12:28:50 PM:<br>
<br>
> I have some classes that are defined in C using the xotcl (cersion
<br>
> 1.4) C API. Things seem to work (I can create objects and invoke
<br>
> methods), but I can't get chaining to function. I can invoke
the <br>
> "next" command (using Tcl_Eval( interp, "xotcl::next")),
but that <br>
> fails with "next: can't find self" <br>
</tt></font>
<br><font size=2><tt>Just a followup for anybody searching the mailing
list archives. </tt></font>
<br>
<br><font size=2><tt>XOTcl requires the Tcl stack to contain information
about the executing object in order to resolve the net method. By
default, and prior to 1.5.1, C methods do not annotate the Tcl stack with
the approriate information to allow method chaining to work.</tt></font>
<br>
<br><font size=2><tt>As of 1.5.1, C methods can be registered with an additional
flag, XOTCL_NONLEAF_METHOD. When a method with this flag is invoked
the Tcl stack will include the information needed to allow "next"
to function properly.</tt></font>
<br>
<br><font size=2><tt>In addition to the new flag, 1.5.1 exports a couple
of additional C functions to improve the performance of the XOTcl at the
C-interface. </tt></font>
<br>
<br><font size=2><tt>XOTclNextObjCmd() - invoke "xotcl::next"
at the C-level without an additional interpreter evaluation</tt></font>
<br><font size=2><tt>XOTclCallMethodWithArgs() - invoke a method without
an additional interpreter evaluation</tt></font>