Larry W. Virden, x2487 wrote:
> 
> When I close the main Visual Tcl menu with my window manager, I surely wish
> that all of the sub windows associated with that particular invocation of vtcl
> would close along with it (and open again when I reopen the application).

It does!

vTcl executes the function below when you execute [Menu]:File/Quit.

If you close vTcl with the window manager, this doesn't get executed.
Perhaps vTcl could intercept that close event, but can't you just use
the File/Quit? The file menu is only a 1/4 inch away from the wm
button!  :-)
 
proc vTcl:save_prefs {} {
    global vTcl
    set output ""
    set showlist ""
    foreach i ".vTcl .vTcl.toolbar .vTcl.mgr .vTcl.ae .vTcl.wstat
               .vTcl.proclist .vTcl.varlist .vTcl.toplist" {
        if {[winfo exists $i]} {
            if {[wm state $i] == "normal"} {
                append output "set vTcl(geometry,${i}) [wm geometry
$i]\n"
                lappend showlist $i
            }
        } else {
            catch {
                append output "set vTcl(geometry,${i})
$vTcl(geometry,${i})\n"
            }
        }
    }
    append output "set vTcl(gui,showlist) \"$showlist\"\n"
    foreach i [array names vTcl pr,*] {
        append output "set vTcl($i) $vTcl($i)\n"
    }
    catch {
        set file [open $vTcl(CONF_FILE) w]
        puts $file $output
        close $file
    }
}

-- 
...RickM...

Reply via email to