Issue 1362475: Text.edit_modified() doesn't work (original) (raw)

Created on 2005-11-21 03:13 by ronpro@cox.net, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
edit_modified.diff gpolo,2008-05-17 00:02
Messages (5)
msg60838 - (view) Author: Ron Provost (ronpro@cox.net) Date: 2005-11-21 03:13
Tkinter's Text widget has a method edit_modified() which should return True if the modified flag of the widget has been set, False otherwise. It should also be possible to pass True or False into the method to set the flag to a desired state. The implementation retrieves the correct value, but then calls self._getints( result ). This causes an exception to be thrown. In my build, I found that changing the implementation to the following appears to fix the function. return self.tk.call( self._w, 'edit', 'modified', arg )
msg60839 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2007-01-24 15:53
Posted patch 1643641. The patch removes the offending _getints call. Greetings, Matthias Kievernagel
msg66974 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-17 00:01
This bug still exists, I'm attaching a patch against current python-trunk. This patch is based on the fact that documentation tk 8.4 (version which edit command was added) and tk 8.5 says only edit_modified is supposed to return something, which is either 0 or 1, so there was no reason to use _gettints on that tk.call, and returning an empty tuple is against the expected value, 0.
msg67001 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2008-05-17 15:54
Hi Guilherme, funny, I wasn't aware of this duplicate of this issue until I got the message of your comment :) The other duplicate is: http://bugs.python.org/issue1643641 which was closed by Georg Brandl upon my request. The oldest issue is: http://bugs.python.org/issue961805 Both these issues have my patch attached. (it's somewhat resembling yours and the proposition of Ron Provost - except that it is 1.5 years older) The latter issue also has demo code attached. Can someone close this one or the other open issue?? Cheers, Matthias Kievernagel
msg67002 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-17 15:58
Closed as this is yet another duplicate.
History
Date User Action Args
2022-04-11 14:56:14 admin set github: 42614
2008-05-17 15:58:04 gpolo set status: open -> closedresolution: duplicatesuperseder: Text.edit_modified() failsmessages: +
2008-05-17 15:54:19 mkiever set messages: +
2008-05-17 00:02:10 gpolo set files: + edit_modified.diffnosy: + gpolomessages: + keywords: + patch
2005-11-21 03:13:59 ronpro@cox.net create