From 5bc29d49c938a81645942da7ffbcfd6186d5f596 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Tue, 19 Jun 2001 02:51:09 +0000 Subject: [PATCH] (InitMenus) added version check around Attach to Socket menu, as 8.3 is need for the file channels call. --- ChangeLog | 2 ++ tkcon.tcl | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43ea93d..3c5f9ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ be displayed when input is expected. (GetSelection) new command to handle getting selection, this supports the new UTF8_STRING type. + (InitMenus) added version check around Attach to Socket menu, as + 8.3 is need for the file channels call. 2001-05-28 Jeff Hobbs diff --git a/tkcon.tcl b/tkcon.tcl index 35a2072..7af1d3e 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -1106,10 +1106,15 @@ proc ::tkcon::InitMenus {w title} { menu $sub.name -disabledforeground $COLOR(disabled) -tearoff 0 \ -postcommand [list ::tkcon::NamespaceMenu $sub.name] - ## Attach Socket Menu - ## - menu $sub.sock -disabledforeground $COLOR(disabled) -tearoff 0 \ - -postcommand [list ::tkcon::SocketMenu $sub.sock] + if {$::tcl_version >= 8.3} { + # This uses [file channels] to create the menu, so we only + # want it for newer versions of Tcl. + + ## Attach Socket Menu + ## + menu $sub.sock -disabledforeground $COLOR(disabled) -tearoff 0 \ + -postcommand [list ::tkcon::SocketMenu $sub.sock] + } ## Attach Display Menu ## -- 2.23.0