[Idle-dev] Submitted Guilherme Polo's enhancement

Ned Deily nad at acm.org
Fri Oct 15 07:14:24 CEST 2010


In article 
<AANLkTin10Qq3VZiJ=oxXbAyNfGH4eT_vg4AR_Ddc73zt at mail.gmail.com>,
 Bruce Sherwood <basherwo at ncsu.edu> wrote:

> I'm trying to find out why when you quit on the Mac unsaved changes
> don't trigger an invitation to save the file. Instead, IDLE quits and
> you lose your edits.
> 
> There is code to bind cmd-q to the edit window and, on the Mac, to the
> Tk root, through macosxSupport.setupApp which calls macosxSupport
> overrideRootMenu. I've tried printing something in the callback
> routine (FileList.close_all_callback), and I don't see the print. I've
> tried commenting out one or both of these bindings, and I can still
> quit with cmd-q. I've looked a bit at the tkinter code. I'm beginning
> to have the sinking feeling that there's something in the library
> _tkinter.so itself that is swallowing cmd-q and not sending it to
> tkinter, so it doesn't get to IDLE. I have the vague notion that there
> have been some problems with tkinter on the Mac, but I don't know any
> details....?

Working on it.  The problem is due to the fact that the standard Aqua Tk 
on OS X is itself an official OS X app and creates the menu bar with 
default menu options including a standard application Quit.   I think I 
see how to intercept that.

I suggest we move the discussion to the bug tracker 
(http://bugs.python.org/issue10107).

-- 
 Ned Deily,
 nad at acm.org



More information about the IDLE-dev mailing list