[Idle-dev] Submitted Guilherme Polo's enhancement

Bruce Sherwood basherwo at ncsu.edu
Fri Oct 15 15:34:46 CEST 2010


The following statement is executed in macosxSupport.py, which I
assume was an attempt to override, but it's unsuccessful:

root.bind('<<close-all-windows>>', flist.close_all_callback)

Bruce Sherwood

On Fri, Oct 15, 2010 at 6:17 AM, Kevin Walzer <kw at codebykevin.com> wrote:
>
> Tk on the Mac has a built in command called ::tk::mac::Quit, which
> corresponds to the "quit" Apple event. If this command is not defined, then
> I believe the default behavior for Tk on the Mac is to quit (when accessed
> from the menu--not sure about Command-Q). I think the right way to manage
> this in IDLE would be to do something like this:
>
> root.createcommand('::tk::mac::Quit', <insert IDLE's shutdown function
> here>)
>
> This will map whatever function IDLE calls to prompt the user to save data
> before closing, to the Apple quit event.
>
> (Sorry I don't have time to submit a patch, but hopefully this can point
> someone in the right direction.)
>
> --Kevin
>
> --
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com
> _______________________________________________
> IDLE-dev mailing list
> IDLE-dev at python.org
> http://mail.python.org/mailman/listinfo/idle-dev
>


More information about the IDLE-dev mailing list