in reply to Using mark in Tk::Text

This should fix it. You need to tell the mark where it is to be set. Here is the changed part.
$text->insert('0.0', "First\n"); $text->insert('end', "Second\n"); # $text->markSet('Foo', '3.0'); #make mark at start of line 3 $text->markSet('Foo', 'end-1 chars'); #make mark after last inserted t +ext $text->markGravity('Foo','left'); $text->insert('end', "Third\n"); $text->insert('Foo', "-inserted-\n"); MainLoop;
HTH, --traveler

Replies are listed 'Best First'.
Re: Re: Using mark in Tk::Text
by Anonymous Monk on Apr 14, 2003 at 17:34 UTC
    Thanks traveler!
    Now if I understand "marks", I can now refer back to the word 'Foo', and insert text below 'second' at any time correct?
      Correct.

      --traveler