Bug in docs or in Tk text widget?
- From: skuhagen@xxxxxx
- Date: Thu, 5 Jun 2008 01:29:10 -0700 (PDT)
Hello
I just stumbled over a problem with Tks text widget. The following
code returns 1, where I would expect 0, because the text widget is
empty and the man-page says it should return the empty string:
pack [text .t]
string length [.t get 1.0 end]
The text widget is empty, and the man-page says:
"pathName get index1 ?index2 ...?
Return a range of characters from the text. The return
value will be all the characters in the text starting
with the one whose index is index1 and ending just
before the one whose index is index2 (the character at
index2 will not be returned). If index2 is omitted then
the single character at index1 is returned. If there
are no characters in the specified range (e.g. index1
is past the end of the file or index2 is less than or
equal to index1) then an empty string is returned."
Do I misunderstand the docs or is it a bug? I tested this with 8.4.13
and 8.4.14.
TIA
Stephan
.
- Follow-Ups:
- Re: Bug in docs or in Tk text widget?
- From: Helmut Giese
- Re: Bug in docs or in Tk text widget?
- From: Bryan Oakley
- Re: Bug in docs or in Tk text widget?
- From: Uwe Klein
- Re: Bug in docs or in Tk text widget?
- From: Arjen Markus
- Re: Bug in docs or in Tk text widget?
- Prev by Date: Re: Array problem - Build tree/path
- Next by Date: Re: Bug in docs or in Tk text widget?
- Previous by thread: Array problem - Build tree/path
- Next by thread: Re: Bug in docs or in Tk text widget?
- Index(es):
Relevant Pages
|