| Ticket UUID: | 528441 | |||
| Title: | Tk builds incorrectly under VC++5.2 (focus, click bugs) | |||
| Type: | Bug | Version: | obsolete: 8.4a4 | |
| Submitter: | vincentdarley | Created on: | 2002-03-11 10:58:54 | |
| Subsystem: | 85. Win Build | Assigned To: | davygrvy | |
| Priority: | 9 Immediate | Severity: | ||
| Status: | Closed | Last Modified: | 2002-03-28 05:43:02 | |
| Resolution: | Fixed | Closed By: | davygrvy | |
| Closed on: | 2002-03-27 22:43:02 | |||
| Description: |
The changes introduced by hobbs on Feb 26th to tkText.c mean that the cursor doesn't blink at all when a text widget is first created, under some circumstances, and this then seems to break clicking in the widget and making a selection. See, for example, the 'basic editable text' Tk demo, and try out suggestion number '3'. The widget doesn't appear to take the focus (even thought it seems to already have it), until the focus is manually moved to a different window and back again. Vince. | |||
| User Comments: |
davygrvy added on 2002-03-28 05:43:02:
Logged In: YES user_id=7549 Just a last note. I don't understand why with the same compiler (vc5,sp3), you get a buggy wish and I don't. I'll leave -0ti as final, but someday I'd like to understand this mystery. davygrvy added on 2002-03-22 01:02:49: Logged In: YES user_id=7549 -O2 changed to -Oti and committed. nobody added on 2002-03-19 00:23:57: Logged In: NO I upgraded to the new service pack you mention, but that doesn't seem to have changed the compiler version, and the bug is still present. --Vince. nobody added on 2002-03-18 15:29:05: Logged In: NO The version I have is: C:\>cl 2>&1 | find "(R)" Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 11.00.7022 for 80x86 I'll have a look at the sp3 you pointed out. Vince. davygrvy added on 2002-03-18 11:54:38: Logged In: YES user_id=7549 Looks like there's an sp3: http://msdn.microsoft.com/visualc/downloads/vc5.asp davygrvy added on 2002-03-18 11:41:44: Logged In: YES user_id=7549 That was a bizzare bug. What's the actual compiler version you have? I'll put a check in the makefile for it. C:\>....\vc\bin\vcvars32.bat Setting environment .... C:\>cl 2>&1 | find "(R)" Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 That's what I get anyways. Only on NT can I use findstr and apply a minimal RE on it for doing comparisons. I wonder how I could split the version number out and do range tests from within an nmake makefile? :) vincentdarley added on 2002-03-18 07:10:16: Logged In: YES user_id=32170 That did the trick! I've tested both static and dynamic builds with '-Oti' and both work. I guess there are some bugs in my compiler.... Thanks very much for solving this (I much prefer the new makefiles...). If you need any further tests, feel free to ask. Vince. davygrvy added on 2002-03-18 06:52:57: Logged In: YES user_id=7549 The only difference I see is that -O2 is used inplace of - Oti for the optimization switch. -O2 means the whole thing, and -Oti is a smaller set of optimizations. But why am I not effected? Try editing the new makefile and replace -O2 with -Oti and see what that does. I sure would have suspected the install target dropping a script file with bindings in it. vincentdarley added on 2002-03-18 06:40:07: Logged In: YES user_id=32170 Static build of wish84s.exe also shows the same problem (I can send you the file if you like....) vincentdarley added on 2002-03-18 06:35:26: Logged In: YES
user_id=32170
During installation, the new makefile does indeed say '112
File(s) copied'. The old one uses a different installation
method with various questions about overwriting files.
Just starting up wish already shows up a problem: with old
makefile shows cursor blinking in the 'Console' window,
with new makefile, no cursor blinking (if I then make the
focus go away from the console, and then back to it, I can
get the cursor to start blinking).
This is running with the very latest tcl/tk pulls from cvs
(8.4a4/5).
The final link with new makefile (skipped that below) is
done with:
tkWindow.c
link -release -nologo -machine:IX86 -
entry:_DllMainCRTStartup@12 -dll -o
ut:.\Release\tk84.dll kernel32.lib advapi32.lib user32.lib
gdi32.lib comdlg32.li
b winspool.lib imm32.lib comctl32.lib ../../tcl8.4
\win\Release\tclstub84.lib @C:
\WINNT\Profiles\VinceD\LOCALS~1\Temp\nme01516.
Creating library .\Release\tk84.lib and
object .\Release\tk84.exp
link -release -nologo -machine:IX86 -
subsystem:windows -entry:WinMainCRT
Startup -out:.\Release\wish84.exe kernel32.lib advapi32.lib
user32.lib gdi32.lib
comdlg32.lib winspool.lib imm32.lib
comctl32.lib ../../tcl8.4\win\Release\tcl84
.lib .\Release\tk_Dynamic\winMain.obj .\Release\tk_Dynamic\w
ish.res .\Release\tk
84.lib
All testing has been done _after_ an installation (over my
default wish installation), so I'm definitely using the
correct combination of libraries. I'm trying a static
build now to see if that does anything!
I hope all this helps, somehow...
Vince.
vincentdarley added on 2002-03-18 06:24:15: Logged In: YES
user_id=32170
Here are some observations of differences during
compilation. I've now edited the old makefile so 'Release'
is 'Releaseold' to differentiate the two (and let me
compile with both on the same sources together).
Old:
Microsoft (R) Program Maintenance Utility Version
1.62.7022
Copyright (C) Microsoft Corp 1988-1997. All rights reserved.
Created directory .\Releaseold
"C:\Progra~1\devstudio\vc\bin\cl.exe" -Oti -Gs -GD -
c -W3 -nologo -Fp.\R
eleaseold\ -YX -MD -I"C:\Progra~1\devstudio\vc\include" -
I..\win -I..\generic -
I..\bitmaps -I..\xlib -I..\..\tcl8.4\generic -
Fo.\Releaseold\winMain.obj ..\w
in\winMain.c
winMain.c
"C:\Progra~1\devstudio\vc\bin\cl.exe" -DDLL_BUILD -
DBUILD_tk -Oti -Gs -G
D -c -W3 -nologo -Fp.\Releaseold\ -YX -MD -I"C:\Progra~1
\devstudio\vc\include"
-I..\win -I..\generic -I..\bitmaps -I..\xlib -I..\..\tcl8.4
\generic -DUSE_TCL
_STUBS -Fo.\Releaseold\ ..\generic\tkConsole.c
tkConsole.c
"C:\Progra~1\devstudio\vc\bin\cl.exe" -DDLL_BUILD -
DBUILD_tk -Oti -Gs -G
D -c -W3 -nologo -Fp.\Releaseold\ -YX -MD -I"C:\Progra~1
\devstudio\vc\include"
-I..\win -I..\generic -I..\bitmaps -I..\xlib -I..\..\tcl8.4
\generic -DUSE_TCL
_STUBS -Fo.\Releaseold\ ..\unix\tkUnixMenubu.c
tkUnixMenubu.c
...
(many lines removed)
...
"C:\Progra~1\devstudio\vc\bin\cl.exe" -DDLL_BUILD -
DBUILD_tk -Oti -Gs -G
D -c -W3 -nologo -Fp.\Releaseold\ -YX -MD -I"C:\Progra~1
\devstudio\vc\include"
-I..\win -I..\generic -I..\bitmaps -I..\xlib -I..\..\tcl8.4
\generic -DUSE_TCL
_STUBS -Fo.\Releaseold\ ..\generic\tkWindow.c
tkWindow.c
"C:\Progra~1\devstudio\sharedide\bin\rc.exe" -
fo .\Releaseold\tk.res -r
-i "..\generic" -i "C:\Progra~1\devstudio\vc\include" -
i "..\..\tcl8.4\generic"
..\win\rc\tk.rc
"C:\Progra~1
\devstudio\vc\bin\link.exe" /RELEASE /NODEFAULTLIB /RELEASE
/NOLOGO /MACHINE:IX86 /LIBPATH:"C:\Progra~1
\devstudio\vc\lib" -entry:_DllMainCRT
Startup@12 -dll -
out:.\Releaseold\tk84.dll .\Releaseold\tk.res ..\..\tcl8.4
\win
\Releaseold\tclstub84.lib msvcrt.lib oldnames.lib
kernel32.lib advapi32.lib us
er32.lib gdi32.lib comdlg32.lib winspool.lib imm32.lib
comctl32.lib @C:\WINNT\P
rofiles\VinceD\LOCALS~1\Temp\nma01636.
Creating library .\Releaseold\tk84.lib and
object .\Releaseold\tk84.exp
"C:\Progra~1\devstudio\vc\bin\cl.exe" -DDLL_BUILD -
DBUILD_tk -Oti -Gs -G
D -c -W3 -nologo -Fp.\Releaseold\ -YX -MD -I"C:\Progra~1
\devstudio\vc\include"
-I..\win -I..\generic -I..\bitmaps -I..\xlib -I..\..\tcl8.4
\generic -DUSE_TCL
_STUBS -Fo.\Releaseold\ ..\generic\tkStubImg.c
tkStubImg.c
"C:\Progra~1
\devstudio\vc\bin\lib.exe" /out:.\Releaseold\tkstub84.lib .\
Releaseold\tkStubLib.obj .\Releaseold\tkStubImg.obj
Microsoft (R) 32-Bit Library Manager Version 5.00.7022
Copyright (C) Microsoft Corp 1992-1997. All rights reserved.
"C:\Progra~1\devstudio\sharedide\bin\rc.exe" -
fo .\Releaseold\wish.res -
r -i "..\generic" -i "C:\Progra~1\devstudio\vc\include" -
i "..\..\tcl8.4\generi
c" ..\win\rc\wish.rc
"C:\Progra~1
\devstudio\vc\bin\link.exe" /RELEASE /NODEFAULTLIB /RELEASE
/NOLOGO /MACHINE:IX86 /LIBPATH:"C:\Progra~1
\devstudio\vc\lib" -subsystem:windows
-entry:WinMainCRTStartup .\Releaseold\wish.res -
out:.\Releaseold\wish84.exe ms
vcrt.lib oldnames.lib kernel32.lib advapi32.lib user32.lib
gdi32.lib comdlg32.l
ib winspool.lib imm32.lib comctl32.lib ..\..\tcl8.4
\win\Releaseold\tcl84.lib .\
Releaseold\tk84.lib .\Releaseold\winMain.obj
"C:\Progra~1\devstudio\vc\bin\cl.exe" -Oti -Gs -GD -
c -W3 -nologo -Fp.\R
eleaseold\ -YX -I"C:\Progra~1\devstudio\vc\include" -
DCONSOLE -Fo.\Releaseold\ .
.\..\tcl8.4\win\cat.c
cat.c
"C:\Progra~1
\devstudio\vc\bin\link.exe" /NODEFAULTLIB /RELEASE /NOLOGO /
MACHINE:IX86 /LIBPATH:"C:\Progra~1\devstudio\vc\lib" -
subsystem:console -entry:m
ainCRTStartup -out:.\Releaseold\cat32.exe -
stack:16384 .\Releaseold\cat.obj libc
.lib oldnames.lib kernel32.lib advapi32.lib
New:
Microsoft (R) Program Maintenance Utility Version
1.62.7022
Copyright (C) Microsoft Corp 1988-1997. All rights reserved.
*** Intermediate directory will be '.\Release\tk_Dynamic'
*** Output directory will be '.\Release'
*** Suffix for binaries will be ''
*** Optional defines are ''
cl -O2 -nologo -c -W3 -Fp.\Release\tk_Dynamic\ -YX -
I"..\win" -I"..\gene
ric" -I"..\bitmaps" -I"..\xlib" -I "../../tcl8.4\win" -
I "../../tcl8.4\generic"
-Zl -DSTATIC_BUILD -
Fo.\Release\tk_Dynamic\tkStubLib.obj ..\generic\tkStubLib.c
tkStubLib.c
cl -O2 -nologo -c -W3 -Fp.\Release\tk_Dynamic\ -YX -
I"..\win" -I"..\gene
ric" -I"..\bitmaps" -I"..\xlib" -I "../../tcl8.4\win" -
I "../../tcl8.4\generic"
-Zl -DSTATIC_BUILD -
Fo.\Release\tk_Dynamic\tkStubImg.obj ..\generic\tkStubImg.c
tkStubImg.c
lib -nologo -
out:.\Release\tkstub84.lib .\Release\tk_Dynamic\tkStubLib.o
bj .\Release\tk_Dynamic\tkStubImg.obj
cl -O2 -nologo -c -W3 -Fp.\Release\tk_Dynamic\ -YX -
MD -I"..\win" -I"..\
generic" -I"..\bitmaps" -I"..\xlib" -I "../../tcl8.4\win" -
I "../../tcl8.4\gene
ric" -Fo.\Release\tk_Dynamic\winMain.obj ..\win\winMain.c
winMain.c
rc -fo .\Release\tk_Dynamic\wish.res -r -
i "..\generic" -I "../../tcl8.4
\win" -I "../../tcl8.4\generic" ..\win\rc\wish.rc
rc -fo .\Release\tk_Dynamic\tk.res -r -
i "..\generic" -I "../../tcl8.4\w
in" -I "../../tcl8.4\generic" ..\win\rc\tk.rc
cl -DBUILD_tk -O2 -nologo -c -W3 -
Fp.\Release\tk_Dynamic\ -YX -MD -I"..\
win" -I"..\generic" -I"..\bitmaps" -I"..\xlib" -
I "../../tcl8.4\win" -I "../../
tcl8.4\generic" -DUSE_TCL_STUBS -Fo.\Release\tk_Dynamic\
@C:\WINNT\Profiles\Vin
ceD\LOCALS~1\Temp\nma01544.
tkConsole.c
tk3d.c
tkArgv.c
tkAtom.c
...
davygrvy added on 2002-03-17 09:21:02: Logged In: YES user_id=7549 The last part of the install target copies 112 files.. What's your's say? I could question that last line on Win98.. it might be using an NT extension option. davygrvy added on 2002-03-17 09:09:04: Logged In: YES user_id=7549 What Tcl dll is is it running with? Last week I had someone tell me tcl's makefile.vc was hosed because the sources threw errors. yeah, like that's a makefile problem. please, narrow it down. It's working for me with vc5. I'm poking at air, and the problem is happening on your end. nobody added on 2002-03-17 08:10:39: Logged In: NO I have the latest tk-cvs tree of sources. I compile it with VC++ 5.2, and I find dozens of problems (i.e. can't click on buttons, but have to use keyboard. text widgets don't get the focus and don't show a selection). Now I grab an old makefile.vc, make two trivial changes to it which are needed so it can work with the new sources (the changes mentioned below: comctl32.lib and tkPanedWindow.obj) and recompile. Now tk works like it always has. To me, this means there's a makefile problem. I'm happy to try anything you can suggest... davygrvy added on 2002-03-17 02:11:28: Logged In: YES user_id=7549 I just did an update, full rebuild, install and don't see anything obvious running the widget demo. I tromped around most everything, and it all looks fine except for the vertical sash demo where you need to pull down the whole dialog to see the components. behaviors of focus and cursors appears normal. could you narrow this down for me? Are there source files missing or a bad compiler switch? Is the install target missing files to be copied that lead to the issue? playing with the widget demo isn't pointing me back to the makefile. How is the behavior of the demo, leading to a makefile issue? I'm poking at all air here with this. davygrvy added on 2002-03-17 01:35:48: Logged In: YES user_id=7549 where the error? Is comctl32.lib missing? vincentdarley added on 2002-03-17 00:36:38: Logged In: YES user_id=32170 I retested this today. Basically: Old makefile.vc => Wish that works New makefile.vc => Wish that doesn't work (can't click on buttons, all sorts of focus problems, etc). Can this be fixed, please? vincentdarley added on 2002-03-11 18:38:55: Logged In: YES user_id=32170 I've now realised there are lots of broken things with the focus and clicking, so I reverted back to an old makefile.vc (from 3 months ago), adding in comctl32.lib and the tkPanedWindow.obj line and rebuilt. Now everything works fine. Therefore something in the last few months has made Tk build a bad executable under VC++ 5.2 (on Windows 2000sp2). | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki