Re: macOS: No WM_DELETE_WINDOW protocol when using "Quit app"?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: macOS: No WM_DELETE_WINDOW protocol when using "Quit app"?
De : heller (at) *nospam* deepsoft.com (Robert Heller)
Groupes : comp.lang.tcl
Date : 22. Feb 2025, 20:02:24
Autres entêtes
Organisation : Deepwoods Software
Message-ID : <vpd700$3a83$1@dont-email.me>
References : 1
User-Agent : TkNews 3.0 (1.2.19)
MacOSX (Finder?) adds an "extra" menu, the Apple Menu (I am assuming that is
what you are talking about).  Read the section titled "SPECIAL MENUS IN
MENUBARS" in the man page for menu
(https://www.tcl-lang.org/man/tcl8.3/TkCmd/menu.htm#M19), specificly this paragraph:


       When  Tk  sees  a .menubar.apple menu as the first menu in a menubar on
       the Macintosh, that menu's contents make up the first items of the  Ap-
       plication  menu whenever the window containing the menubar is in front.
       After all of the Tk-defined items, the menu will have a separator, fol-
       lowed  by all standard Application menu items.  Such a .apple menu must
       be present in a menu when that menu is first configured as a toplevel's
       menubar,  otherwise a default application menu (hidden from Tk) will be
       inserted into the menubar at that time and  subsequent  addition  of  a
       .apple menu will no longer result in it becoming the Application menu.
                                                              
Note that there also a "System" menu available on MS-Windows, that can also be
accessed from Tk, This is described in the same section.

At Sat, 22 Feb 2025 17:52:39 +0100 Torsten <Torsten@example.com> wrote:

 
The close icon triggers a WM_DELETE_WINDOW protocol, but not the menu entry "Quit app".
I use this to register my own exit handler for my app.
How can I call my own exit handler when the user closes the app via "Quit app"?
 
Torsten
 
                                                              
 

--
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller@deepsoft.com       -- Webhosting Services

Date Sujet#  Auteur
22 Feb 25 * macOS: No WM_DELETE_WINDOW protocol when using "Quit app"?3Torsten
22 Feb 25 +- Re: macOS: No WM_DELETE_WINDOW protocol when using "Quit app"?1nab
22 Feb 25 `- Re: macOS: No WM_DELETE_WINDOW protocol when using "Quit app"?1Robert Heller

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal