Fixing Leo and Idle OS shutdown bug?

David LeBlanc whisper at oz.net
Thu Aug 8 20:04:30 EDT 2002


I'm having no trouble using the described api to intercept WM_DELETE_WINDOW
events with Leo. I confirmed this by opening a tkMessageBox in the callback
routine. Worked each and every time on a variety of "new" and "open"ed
windows (i.e: file menu invoked windows), as well as the main startup
window.

This is on windows 2000 with python 2.2.1 and leo 3.4 beta 3 (or 4?)

Sometimes the wingnut between the keyboard and the chair gets loose - have
you checked for that? ;-)

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Edward K. Ream
> Sent: Wednesday, August 07, 2002 7:31
> To: python-list at python.org
> Subject: Fixing Leo and Idle OS shutdown bug?
>
>
> Leo does not prompt the user to save unsaved files when Windows
> 2K or XP is
> shutting down.  Neither does IDLE.
>
> Is there any way to interrupt the shutdown process in TK?  I have tried
> binding to Destroy or WM_DELETE_WINDOW for the top level window,
> like this,
> with no effect:
>
> root.bind("<Destroy>", onKillLeoEvent)
> root.protocol("WM_DELETE_WINDOW", onKillLeoEvent)
> root.mainloop()
>
> Heck, this code doesn't even fire when I close Leo the regular way.
>
> Does anyone know of a way to get the job done?  Thanks.
>
> Edward
> --------------------------------------------------------------------
> Edward K. Ream   email:  edream at tds.net
> Leo: Literate Editor with Outlines
> Leo: http://personalpages.tds.net/~edream/front.html
> --------------------------------------------------------------------
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list