I need to write an [incr TCL] class in C for performance reasons, but would
like the end result to be extensible using [incr TCL] inheritance. I want to
do all the brute-forcish stuff in C and give my users control over the
intelligent stuff.
Andrew Ginter and...@calgary.hp.com 403-299-4755
>Andrew Ginter and...@calgary.hp.com 403-299-4755
It's not easy, but it's doable. Most of the support is in the guts of itcl,
but there aren't any readily available public functions. I did this a
few weeks ago. You need to make some of the static functions public.
I needed to split up a few of the functions into smaller pieces to get my
classes inserted into the class creation process at the correct time.
The code is pretty well written. It only took a few hours to get my basic
classes up and running.
I've meant to write to Michael about creating a public interface to the
class creation mechanisms, but I've moved onto other things and haven't
gotten to it....
As I was munging through the code I came accross this comment, I got
a real kick out of it. Michael, if your listening, I have the same
feelings about itcl!!
/*
* ========================================================================
* VARIABLE-HANDLING PROCEDURES
* ========================================================================
* The following procedures are copied directly from tclVar.c in the
* standard TCL distribution, and must be updated whenever TCL is
* updated. These procedures must be coped here since they are static
* (private) in the original distribution and cannot be accessed in
* any other way. It seems to me that a clean interface to low-level
* Tcl routines would be a useful thing.
* ========================================================================
*/
...alan
-------------------------------------------------------------------------------
Alan Commike __o Landmark Graphics, Houston Tx.
com...@lgc.com _'\<,_ (713) 560 - 1249
________________________( )/_( )____________________________________________