in reply to Tk text delete invalid index

Aye, I believe it should be

$text->delete('1.0','1.0 end');
if you look up how tk handles these indexes I believe (can't find link..going from memory) that the words such as end and lineend are modifiers of the given index. so 1.0 end modifies 1.0 to the index at the end..assuming end is a proper index (i have only used linend myself).


Grygonos

Replies are listed 'Best First'.
Re^2: Tk text delete invalid index
by Ven'Tatsu (Deacon) on Oct 01, 2004 at 18:02 UTC
    end is it's own index, so it can be used alone, lineend and friends are modifiers on another index. So you can say 'end linestart' or '1.0 lineend' for the start of the last line or the end of the first line respectively.