Bug in docs or in Tk text widget?



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
.



Relevant Pages

  • Re: Automatically delete a line if nothing on it??
    ... And Word can't use XML data sources for mailmerges "out of the box". ... The thing is that Word does empty line elimination as standard when it performs a mail merge /and/ the empty line results from a line that has nothing but empty fields, but it doesn't have an automatic facility to eliminate any old empty line, even during a merge. ... characters and then delete that line if no characters are found on it ... Technical Production Assistant ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Pb w/ text i/p to ssh-keygen on openSUSE
    ... for saving the key - but hits a pb after the "Enter passphrase (empty ... even knowing the number of characters compromises security too much. ... Knowing the number of characters is a security hole, indeed, and knowing ...
    (uk.comp.os.linux)
  • Re: Text to Columns
    ... Most likely you have trailing spaces or something (could be invisible html ... characters if you get this info from the web) and the last invisible ... I have already inserted an empty column for the last names. ... Cell A3 has a first and last name. ...
    (microsoft.public.excel.misc)
  • ifstream::get() surprise
    ... and a file, test.txt, starting with an empty line, ie. a lone EOL ... "successful read of zero characters" rather than "read error". ... How then can I distinguish a successfull reading of an empty ...
    (comp.lang.cpp)
  • Newbie - need a small push on recursion / higher order procedures
    ... I'm starting out with a string "This is a sentence". ... characters of this string into a list. ... (if (empty? ... (define (create-word sentence) ...
    (comp.lang.scheme)