in reply to Re: text delete hangs in Perl/Tk
in thread text delete hangs in Perl/Tk

Unfortunately, the call is buried within a couple thousand lines of widget code and it would be difficult to provide a block that would provide enough context.

My main clue is that if I don't Add the tags to the text, the delete seems to work fine. Is it possible that if I've associated an invalid tag location with the text that it would cause delete to stall? Or perhaps I should be Removing all the tags before I try to delete the text lines with which they are associated? I have been operating under the assumption that the tags just "magically disappear" when you delete the text out from under them...

Replies are listed 'Best First'.
Re^3: text delete hangs in Perl/Tk
by remling (Novice) on Apr 26, 2017 at 16:49 UTC
    Really old post but I had the exact same problem today... delete of large amount of data from Text box with loads of tags and it hangs forever. My solution was to first delete the tags, then delete the text - fixed the issue. Thanks for the clues guys! # delete contents $codevw->tagDelete('errs', 'lnums'); $codevw->delete('0.0', 'end');
Re^3: text delete hangs in Perl/Tk
by eserte (Deacon) on Jul 02, 2004 at 11:40 UTC
    It is possible that there is some non-optimized code in the Tk core in some special situations. Can you check if it is faster if you delete the tags (either with tagDelete or tagRemove) before deleting the contents?