[ python-Bugs-961805 ] Text.edit_modified() fails
SourceForge.net
noreply at sourceforge.net
Wed Feb 14 21:18:21 CET 2007
Bugs item #961805, was opened at 2004-05-27 21:59
Message generated for change (Comment added) made by doko
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=961805&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.3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Eric P. (ericpett)
Assigned to: Martin v. Löwis (loewis)
Summary: Text.edit_modified() fails
Initial Comment:
Text.edit_modified() fails because it calls _getints() on the
result of the underlying tk.call(). The tk.call() is returning a
boolean, not a string, and the _getints() fails.
Here's the last part of an example traceback:
File "/usr/local/src/staff/pett/chimera/devel/Ilabel/
__init__.py", line 53, in textCB
if not text.edit_modified():
File "/usr/local/src/staff/chimera-build/IRIX-X11/foreign/
Python-2.3.2/lib/python2.3/lib-tk/Tkinter.py", line 2831, in
edit_modified
return self.edit("modified", arg)
File "/usr/local/src/staff/chimera-build/IRIX-X11/foreign/
Python-2.3.2/lib/python2.3/lib-tk/Tkinter.py", line 2819, in
edit
return self._getints(
File "/usr/local/src/staff/chimera-build/IRIX-X11/foreign/
Python-2.3.2/lib/python2.3/lib-tk/Tkinter.py", line 972, in
_getints
return tuple(map(getint, self.tk.splitlist(string)))
TypeError: coercing to Unicode: need string or buffer, bool
found
----------------------------------------------------------------------
>Comment By: Matthias Klose (doko)
Date: 2007-02-14 21:18
Message:
Logged In: YES
user_id=60903
Originator: NO
followup from https://bugs.launchpad.net/bugs/84720
As a workaround you can get the status by calling:
print root.tk.call('eval','%s edit modified'%self.textwidget)
where self.textwidget is the variable where the text widget was assigned
to.
----------------------------------------------------------------------
Comment By: Eric P. (ericpett)
Date: 2004-05-27 22:52
Message:
Logged In: YES
user_id=1051353
I should mention that it's the argless form of edit_modified() that
fails (querying the flag state) -- setting the flag works.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=961805&group_id=5470
More information about the Python-bugs-list
mailing list