From: Jeff Hobbs Date: Tue, 19 Jun 2001 02:51:09 +0000 (+0000) Subject: (InitMenus) added version check around Attach to Socket menu, as X-Git-Tag: tkcon-2-2~7 X-Git-Url: http://privyetmir.co.uk/gitweb?a=commitdiff_plain;h=5bc29d49c938a81645942da7ffbcfd6186d5f596;p=tkcon (InitMenus) added version check around Attach to Socket menu, as 8.3 is need for the file channels call. --- 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 ##