From: Masatsugu Nagata (nagata@kurims.kyoto-u.ac.jp)
Date: 10 Mar 01, 10:42 EST
From: Masatsugu Nagata <nagata@kurims.kyoto-u.ac.jp>
Subject: Feature-Request: chooseWindowStatus
Hi,
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'.
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