Re: Weird focus problem (and mysterious invisible console) running wish on windows.
- From: mb <tircnf@xxxxxxxxx>
- Date: Mon, 6 Jul 2009 09:39:51 -0700 (PDT)
On Jul 6, 1:34 am, George Petasis <peta...@xxxxxxxxxxxxxxxxx> wrote:
O/H mb έγραψε:
On Jun 25, 6:05 am, Pat Thoyts <cnggub...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
MB <tir...@xxxxxxxxx> writes:
Take any simple Tk application, like --> pack [button .b1 -text "Exit"I do not see this problem on Vista using 8.4.1, 8.4.6, 8.5.7 or
-command exit]
run with
wish85.exe simple.tcl
When the application starts up, it does not have the system focus.
Before
manually focusing the app (with a mouse click), if I press Alt-Tab
(Windows
task switcher), I see 2 "Tk" tasks. One is my application, the other
is
labeled "Console". But I never asked for a console in my app. Also,
there
is no visible console window on the screen, nor is there a console on
my
task bar or in the Windows "Close Program" dialog.
- If I either Alt-Tab my way to the app (which focuses it), or if I
mouse
click on the app to focus it, the "Console" task goes away and the
application reacts normally. Basically, once the app *is* focused
once, all
is normal. It just doesn't receive focus by default for some reason
and has
this weird "Console" task hanging around until it is focused.
I have temporarily fixed the problem by placing a "focus -force ." in
my
application code, which does seem to work.
--- I have this problem and found this posted on a starkit newsgroup
from 6 years ago.
No one ever answered the original post and I'm curious if anyone on
this group knows about it.
it was posted as a starkit problem, but it's a problem with wish on
windows.
http://article.gmane.org/gmane.comp.lang.tcl.starkit/1098
8.6. What I get is a single Tk task (admittedly without focus)
You say in your original post this was Windows NT and 98. Is that
still the case? Are you using some wierd window manager or is this a
default windows setup?
--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
The weird console window shows up with
Windows XP SP2/SP3 - tcl 8.5/8.6 (running the wish command).
Running from tclsh instead of wishsh the focus works correctly.
I also don't see the extra Console when I use alt-tab in Vista (and
like you, the new window doesn't have focus).
All are regular windows installs. No funky window manager.
I also tested under XP SP3: the focus problem exists (the new tk window
does not have the focus), but I see only a single process in taks
manager. There is no process named console. I am using ActiveTcl 8.5.4.0.
This focus issue is perhaps a bug that must be reported to sourceforge
fot tk. Regarding the 2nd process, you are using some ActiveTcl
distribution?
George
It doesn't show up as a separate process in the windows process
table.
It shows up as an extra icon in the <alt-tab> window. I'm not sure
what it's called.
If I run the wish app, then hit alt-tab, (keep the alt key depressed
after hitting tab). a little window comes up with icons for each
running program.
the first box is the application that has focus.
At this point there is an extra icon named "console". It disappears
once focus is put into the tk app.
I am using an activestate tcl distribution. It also happens when
running tclkit.
.
- Follow-Ups:
- Re: Weird focus problem (and mysterious invisible console) running wish on windows.
- From: Georgios Petasis
- Re: Weird focus problem (and mysterious invisible console) running wish on windows.
- References:
- Prev by Date: Re: returns "" on Tcl 8.4.4 ... we're losing our sanity here
- Next by Date: Moving into Tcl substitution -> probably a very basic question
- Previous by thread: Re: Weird focus problem (and mysterious invisible console) running wish on windows.
- Next by thread: Re: Weird focus problem (and mysterious invisible console) running wish on windows.
- Index(es):