Using tclX/tkX with ET (Embedded Tk) 
Author Message
 Using tclX/tkX with ET (Embedded Tk)

Can someone shed some light on embedding tcl/tk code which uses tclX/tkX
extensions (like getclock, loop, ...) using Richard Hipp's Embedded Tk? I can
build an executable for example:

--- mytest.tcl ---
#! /usr/local/bin/wishx
set counter 0
set current_clock_time "now"
after 100 count_up
button .x -text "Hello, World!" -command exit
label .l -width 10 -textvariable counter
label .clock -width 10 -relief groove -textvariable current_clock_time
pack .x .l .clock
after 2000 ticker

proc count_up {} {
        global counter
        incr counter;
        after 100 count_up;


proc ticker {} {
        global current_clock_time
        set current_clock_time [fmtclock [getclock] "%T"]
        after 500 ticker

--- et_wrapper.c ---
#include <stdio.h>
main(int argc, char **argv){
   ET_INCLUDE( mytest.tcl )



et2c et_wrapper.c > mytest.c
gcc -o mytest mytest.c et.o -L/usr/local/lib -ltkX -ltk -ltclX -ltcl -lX11 -lm -O

and get mytest. But on execution, I get

     "Error in Tcl Script"
Error: invalid command name "getclock"

when the ticker procedure is invoked after 2 seconds. Any help/comments appreciated.

Larry G. Byars

P O Box 6292                                    phone:  615.966.0072.x402
Oak Ridge, TN 37931                             fax:    615.966.8955

Mon, 29 Dec 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Feedback on change to tkXshell.c (TclX), tkMain.c (Tk), et al

2. Tix and TclX/TkX

3. Compilation error in installing TCLX/TKX

4. ANNOUNCE: DiET (Dp in ET) Embedded Tcl with Tcl-Dp now supports ET 1.1c

5. Embedded Tk (ET) question

6. Help: Embedded Tk (ET) and C!!

7. Variables passing in Embedded Tk (ET)

8. Embedded Tk (ET)

9. HELP: Embedded Tk (ET) and C

10. Where to find ET (embedded TK)

11. ANNOUNCING: Embedded Tk (ET) version 1.3

12. : Where is ET (Embedded TK)?


Powered by phpBB® Forum Software