delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/03/29/13:26:30

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: TCL/TK and GNU B19
29 Mar 1998 13:26:30 -0800 :
Message-ID: <9803251833.AA02029.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <199803201641 DOT RAA24781 AT hermes4 DOT cst DOT cnes DOT fr>
To: genesis AT hermes9 DOT cst DOT cnes DOT fr (Utilisateur genesis)
Cc: gnu-win32 AT cygnus DOT com

genesis AT hermes9 DOT cst DOT cnes DOT fr (Utilisateur genesis) writes:
> 
> Hi there,
> 
> I have some problems with TCL/TK 8.0 and GNU B19.
> 
> I have a C application that call TCL interpreteur to execute TCL and TK comma
> nd. For that I've insert in my application a copy of tkMain.c source, to crea
> te and initialize TCL shell.

The problem is the way you've created the initial interpreter and handle
the events, and if you follow tcl/tk 8.0 guidelines (I believe Tcl group
has something called example.tar.gz that illustrates this), this code will
work just fine.

Tk's event handling takes a while to get used, especially since you can't
assume everything is Unix. BTW, your program will have *exactly* the same
problem even if it's built with MSVC or BC compiled 8.0/8.0p1/8.0p2 Tcl/Tk 
libs on Win32. Trust me.

To understand what is going on, do the following:
  
  c:\> gcc -c testinterp.c -I/path/to/tcl/includes
  c:\> gcc -o testinterp testinterp.o -L/path/to/tcl/libs -ltk80 -ltcl80

  [ DO NOT use -mwindows for this example ]

Now run:
  
  c:\> testinterp
  % update
  % vwait foo

Tcl 7.6/Tk 4.2 used a different event model, so it just happened to work.

Mumit

Cc: gnu-win32 mailing list
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019