This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: problem Tktable_Init
- To: Kaoru Fukui <k_fukui at highway dot ne dot jp>
- Subject: Re: problem Tktable_Init
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Fri, 24 Aug 2001 06:44:46 -0700 (PDT)
- cc: <insight at sources dot redhat dot com>
On Fri, 24 Aug 2001, Kaoru Fukui wrote:
> [root@g4mpKFUKUI Packages]# gdb
> Tktable_Init failed: bad option "equal": must be compare, first, index, last,
> length, match, range, tolower, toupper, trim, trimleft, trimright, wordend,
> or wordstart
> [root@g4mpKFUKUI Packages]#
Wow, odd that this did not bite me... Nonetheless, here is a patch which
I think fixes the problem. (Someone tell me why "string equal" was
introduced to Tcl8.1??? Is it really that much easier to use [string equal
$foo $bar] than [string compare $foo $bar] = 0?)
Let me know how it goes.
Keith
2001-08-24 Keith Seitz <keiths@redhat.com>
* src/tkTable.tcl: Use "string compare" instead of "string
equal". The latter is only available in newer versions of
tcl.
Index: src/tkTable.tcl
===================================================================
RCS file: /cvs/src/src/libgui/src/tkTable.tcl,v
retrieving revision 1.2
diff -u -p -r1.2 tkTable.tcl
--- tkTable.tcl 2001/08/13 17:53:52 1.2
+++ tkTable.tcl 2001/08/24 13:44:36
@@ -189,7 +189,7 @@ if {[string match "macintosh" $tcl_platf
# Results:
# Returns the selection, or an error if none could be found
#
-if {[string equal $tcl_platform(platform) "unix"]} {
+if {[string compare $tcl_platform(platform) "unix"] == 0} {
proc ::tk::table::GetSelection {w {sel PRIMARY}} {
if {[catch {selection get -displayof $w -selection $sel \
-type UTF8_STRING} txt] \