This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: askstring => grab fail
Type: Stage:
Components: Tkinter Versions: Python 2.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, wweston
Priority: normal Keywords: patch

Created on 2004-05-01 23:59 by wweston, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg45903 - (view) Author: wes (wweston) Date: 2004-05-01 23:59
Calling askstring results in a "grab fail" exception
about 2/3rds of the time on redhat 9/Python 2.3.3.

By inserting one line in:

/usr/local/Python/lib/python2.3/lib-tk/Tkinter.py
//line 521

the problem seems to go away.

def grab_set(self):
        """Set grab for this widget.
        A grab directs all events to this and descendant
        widgets in the application."""
       
self.wait_visibility()############added#####################
        self.tk.call('grab', 'set', self._w)

wes
msg45904 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-03 14:57
Logged In: YES 
user_id=21627

The patch is wrong: the grab_set function should really just
invoke Tcl "grab set"; this should not change.

Adding a wait_visibility() immediately before grab_set() in
tkSimpleDialog has a negative effect on my system: the
dialog does not appear anymore, but is minimized. Therefore,
I'm rejecting this patch. Please submit a bug report that
demonstrates your problem instead.
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40207
2004-05-01 23:59:41wwestoncreate