Author terry.reedy
Recipients eamartin, ned.deily, rhettinger, ronaldoussoren, serhiy.storchaka, taleinat, terry.reedy, vtudorache, walters, wordtech
Date 2018-08-01.21:41:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I wrote the following justification for adding grab_release while Tal was revising his PR to make the change.  I will look at the PR now and test on Windows.

Vlad, I was wondering about modality.  Properly de-modalizing a dialog requires more than just removing grab_set.  The parent of a modal dialog is a window with a menu, an instance of idlelib.  If a dialog were not modal, its parent could be deleted, which would also delete the dialog and any un-saved and un-acted-upon data.  This is true of Debugger, whose parent is Shell.  Duplicate dialogs would also be possible, as is true of IDLE Help, whose parent is root, unless explicitly prevented, as is true of Debugger (Shell knows if there is a Debugger instance).

Removing modality has been discussed in various places, such as in #24760, which focuses on Settings.  If it were de-modalized, its parent should be root and only one copy allowed.  Mark Roseman noted on the issue that "because modal doesn't fully work on the Mac, you can actually create multiple copies of the config dialog!".

So my preferred short-term fix, once confirmed, for 3.7.1, would be the addition of grab_release.

Merely removing grab would have to be Mac-specific, and I would expect new problems and complaints.  Properly de-modalizing on all platforms, where sensible, is a longer-term project.  Notepad++ on Windows, for instance, has a non-modal singleton Find dialog (with Replace and Find in Files on separate tabs), designed as such, that operates on the 'current' editor tab, unless one selects 'Find All in All Open Documents' to work on all of them.

PS: Tal Einat also get 'autorelease pool' errors when trying to run IDLE on locally built 3.7.0.
Date User Action Args
2018-08-01 21:41:47terry.reedysetrecipients: + terry.reedy, rhettinger, ronaldoussoren, taleinat, wordtech, ned.deily, serhiy.storchaka, walters, vtudorache, eamartin
2018-08-01 21:41:47terry.reedysetmessageid: <>
2018-08-01 21:41:47terry.reedylinkissue34120 messages
2018-08-01 21:41:47terry.reedycreate