From Newsgroup: comp.lang.tcl
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
--- Synchronet 3.20c-Linux NewsLink 1.2