From: Vince Darley (vince@santafe.edu)
Date: 11 Mar 01, 07:32 EST
From: Vince Darley <vince@santafe.edu>
Subject: Re: Feature-Request: chooseWindowStatus
On Sat, 10 Mar 2001, Masatsugu Nagata wrote:
> I have just discovered that, in Alpha 7.4.1, the proc 'chooseWindowStatus'
> is defined in 'BackCompatibility.tcl' as follows:
>
> proc chooseWindowStatus {} { chooseAWindow }
>
> Aaargh! 'chooseWindowStatus' and 'chooseAWindow' are completely different
> things! 'chooseAWindow' (correctly defined in 'win.tcl') lets me select
> window name to switch to, via a listpick dialog (which is slow). I almost
> never use 'chooseAWindow'.
You haven't looked very carefully at chooseAWindow. Its behaviour depends
on the value of the 'use status bar' preference.
I think this makes the rest of your message moot.
Vince.
>
> On the other hand, the real 'chooseWindowStatus' is VERY fast - lets me
> select window name to switch to, by letting me type the first few
> characters of the window name into the StatusWin. In my 6.52 setup (that
> I use everyday), I bind 'chooseWindowStatus' to the 'help' key on my
> extended keyboard, and use it VERY often. It's a highly useful proc.
>
> I am surprised (and shocked) to notice that 'chooseWindowStatus' is
> defined as the above (that is, is actually "not defined") in 7.4.1.
> (I was late to notice this because I have installed 7.4.1 only on my
> PowerBook, whose keyboard does not have the 'help' key.)
>
> So, here is my request: Please replace the (unreal) definition:
>
> proc chooseWindowStatus {} { chooseAWindow }
>
> in the 'BackCompatibility.tcl' file, with the following (real) definition:
>
> ###
> proc chooseWindowStatus {} {
> if {[llength [winNames]] < 2} {message "no other window."; return}
> set next [nextWin]
> set res [statusPrompt "Window: ($next): " winComp]
> if {[string length $res]} {
> if {[catch {bringToFront $res}]} {beep}
> } else {
> if {[catch {bringToFront $next}]} {beep}
> }
> }
> proc winComp {curr c} {
> if {$c != "\t"} {return $c}
>
> set matches {}
> foreach w [winNames] {
> if {[string match "$curr*" $w]} {
> lappend matches $w
> }
> }
> if {[llength $matches] == 0} {
> beep
> } else {
> return [string range [largestPrefix $matches] [string length $curr] end]
> }
> return ""
> }
> ###
>
> please? 'chooseWindowStatus' is a really fast way to switch windows,
> especially when a large number of windows (with mutually different names)
> are open. For example, if I hit 'help', then 'w', 'tab', 'return',
> then the window named "win.tcl" instantly comes to the foreground, no
> matter where it was open under many other windows.
>
> Mark
> --
> Mark Nagata
> mailto:nagata@kurims.kyoto-u.ac.jp
>
> _______________________________________________
> AlphaTcl-developers mailing list
> AlphaTcl-developers@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/alphatcl-developers
>
_______________________________________________
AlphaTcl-developers mailing list
AlphaTcl-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/alphatcl-developers