On Sun, 16 Mar 1997, Lex Luthor wrote:

>  Hi,
>  
>    I'd like to know what those two button (PreCMD and PosCMD) on geometry
>   editor do. I hope we can put commands there to run before the windows is
>  launch and after respectively, but they do nothing !

Well, I haven't used them yet, but looking at the Window procedure, I had
figured that they are for the exact reason that you say.

proc Window {args} {
global vTcl
    set cmd [lindex $args 0]
    set name [lindex $args 1]
    set rest [lrange $args 2 end]
    if {$name == "" || $cmd == ""} {return}
    set exists [winfo exists $name]
    switch $cmd {
        show {
            if {[info procs vTclWindow(pre)$name] != ""} {
                vTclWindow(pre)$name $rest
            }
            if {[info procs vTclWindow$name] != ""} {
                vTclWindow$name
            }
            if {[info procs vTclWindow(post)$name] != ""} {
                vTclWindow(post)$name $rest
            }
        }
        hide    { if $exists {wm withdraw $name; return} }
        iconify { if $exists {wm iconify $name; return} }
        destroy { if $exists {destroy $name; return} }
    }
}

...RickM...

Reply via email to