Bugs item #1581476, was opened at 2006-10-20 19:26 Message generated for change (Comment added) made by mkiever You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581476&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tkinter Group: Python 2.4 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Russell Owen (reowen) Assigned to: Martin v. Löwis (loewis) Summary: Text search gives bad count if called from variable trace Initial Comment: If Text search is called from a variable trace then the count variable is not be updated. I see this with Python 2.4.3 and Aqua Tcl/Tk 8.4.11 on MacOS X 10.4.7. I have not tested it elsewhere. Note that this works fine in tcl/tk so this appears to be a Tkinter issue. To see the problem run the attached python script. (The script also includes the equivalent tcl/tk code in its comments, so you can easily test the issue directly in tcl/tk if desired.) ---------------------------------------------------------------------- Comment By: Matthias Kievernagel (mkiever) Date: 2007-01-19 20:50 Message: Logged In: YES user_id=1477880 Originator: NO Same behaviour on Linux and current Python trunk. In addition I get an IndexError, if I delete the last character of the search string. Does Tk allow calling search with an empty pattern? Tkinter could handle this (with a correct result) with the following change in Tkinter.py / Text.search(): if pattern[0] == '-': args.append('--') -> if pattern and pattern[0] == '-': args.append('--') Greetings, Matthias Kievernagel ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581476&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com