From 3fe2cfe5a97a03a12bb290db81cfde1d7f5e0061 Mon Sep 17 00:00:00 2001 From: wolfsuit Date: Wed, 17 Oct 2001 07:04:22 +0000 Subject: Remember to register the Console Interpreter's stdin, stdout & stderr channels with the main interpreter as well. --- macosx/tkMacOSXAppInit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macosx/tkMacOSXAppInit.c b/macosx/tkMacOSXAppInit.c index 661be90..52d17c4 100644 --- a/macosx/tkMacOSXAppInit.c +++ b/macosx/tkMacOSXAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.1.2.1 2001/10/15 09:22:00 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXAppInit.c,v 1.1.2.2 2001/10/17 07:04:22 wolfsuit Exp $ */ #include #include "tk.h" @@ -269,11 +269,15 @@ Tcl_AppInit(interp) #endif /* TK_TEST */ /* - * This doesn't work yet, still this is roughly what we want to do... + * If we don't have a TTY, then use the Tk based console + * interpreter instead. */ if (ttyname(0) == NULL) { Tk_InitConsoleChannels(interp); + Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDIN)); + Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDOUT)); + Tcl_RegisterChannel(interp, Tcl_GetStdChannel(TCL_STDERR)); if (Tk_CreateConsoleWindow(interp) == TCL_ERROR) { goto error; } -- cgit v0.12