본문으로 바로가기

AtExit 1.0

category Tcl & Tk/확장 패키지 (Extension Package) 2025. 8. 26. 09:57

출처 : http://mini.net/tcl/3958

This package allows the programmer to define exit-handlers or finalizers.

The exit handlers have a priority and are executed using the following rule:

  1. The higher the priority, the early the exit handler is executed
  2. The later an exit handler is added, the earlier it is executed

In addition to this base functionality, this package allows to register an or
all exit handlers as protocol event handler for the event WM_DELETE_WINDOW
via the command: wm protocol $widget WM_DELETE_WINDOW.
If an exit handler is registered as event handler for the WM_DELETE_WINDOW,
than it is disabled as common exit handler.

Every callback, that is executed as exit handler could contain following
substitutions:

  • %t token of the exit handler
  • %p priority of the exit handler
  • %l stack/scope level of the exit handler execution
  • %c name of the procedure calling exit
  • %a args of the procedure calling exit
  • %n namespace of the procedure calling exit

AtExit.zip
0.00MB

'Tcl & Tk > 확장 패키지 (Extension Package)' 카테고리의 다른 글

!include 1.0  (0) 2025.08.26
BigFloat for Tcl 1.1b1  (0) 2025.08.26
e4Graph 1.0a11  (0) 2025.08.26
memchan 2.3  (0) 2025.08.26
VecTcl 0.3  (0) 2025.08.19