[Xotcl] Device chaining from Objects/Classes defined in C

Scott Gargash scottg at atc.creative.com
Fri Sep 15 20:28:50 CEST 2006


I have some classes that are defined in C using the xotcl (cersion 1.4) C 
API.  Things seem to work (I can create objects and invoke methods), but I 
can't get chaining to function.  I can invoke the "next" command (using 
Tcl_Eval( interp, "xotcl::next")), but that fails with "next: can't find 
self" 

I've stepped into the XOTcl code and it looks like it's searching the the 
interpreter's call stack to determine the active object but as near as I 
can tell, my C-defined methods don't correctly annotate Tcl's call stack. 

I'm not aware of any documentation for the C API, so I used the library 
code (xotclsdbm.c) as an example.  Is there anything I need to do beyond 
XOTclAddIMethod to get "next" to function? I'm using a locally built 
version of XOTcl (the binary versions don't include header/libs).  Is it 
possible I've built something incorrectly? I see two defintions for the 
RUNTIME_STATE macro which looks like it plays a role in this.  I don't 
know which version I'm using or if it even matters, but I assume I'm using 
the default version. 

        Scott

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060915/e447aed5/attachment.html


More information about the Xotcl mailing list