View · Search · Index
No registered users in community xowiki
in last 10 minutes

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

From: Scott Gargash <scottg_at_atc.creative.com>
Date: Fri, 15 Sep 2006 11:28:50 -0700

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