Sujet : Re: support for built-in -opt style options for proc
De : mark (at) *nospam* qtrac.eu (Mark Summerfield)
Groupes : comp.lang.tclDate : 26. Jun 2024, 08:36:19
Autres entêtes
Message-ID : <eYecnddfv-BuWeb7nZ2dnZfqnPWdnZ2d@brightview.co.uk>
References : 1 2 3 4 5
User-Agent : Pan/0.154 (Izium; 517acf4)
In the end I used teapam. For example:
package require tepam
namespace eval dialog {}
tepam::procedure {dialog prepare} {
-named_arguments_first 0
-args {
{-modeless -type none}
{-parent -default .}
{window}
}
} {
wm withdraw $window
wm attributes $window -type dialog
if {!$modeless} { wm transient $window $parent }
}
I also used it for show and hide functions so that 'dialog' is an ensemble
command.
It is a pity the docs lack egs but in the end I found it fairly easy to
use.