Artifacts Associated With Ticket 218312ffffffffff
Ticket change [1f325b2ba6] (rid 91102) by nobody on 2000-10-26 00:56:00:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 3738 Bug Version: 8.0p2 SubmitDate: '1999-12-01' LastModified: '1999-12-03' Severity: SER Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Solaris OSVersion: 2.6 Machine: Sun Sparc 1000, Windows 95 running the X-Windows emulator Xoftwa FixedDate: '2000-10-25' ClosedDate: '1999-12-03' Name: Mark A. Wege Comments: This also happens using Tcl 7.4/Tk 4.0 on Unix, as well as Tcl 8.0.3 on Windows 95. While writing the test script above, I also noticed that Tcl failed to inform me of an error when I defined the checkvalue procedure without providing the 3 arguments required by the trace command. ReproducibleScript: The following script is part of some code we use to validate data that the user types into entry widgets; this is done by placing traces on the entry widget's textvariable. To test this, either execute wish interactively and paste this code into the session, or place the code into a file and then execute wish with the file as a parameter: proc checkvalue {args} { global e if {[string length $e] == 5} { after 500 {set e ""} puts "\nAbout to generate the error (undefined variable \"test\")" puts "test = $test" puts "after undefined variable" } else { puts "e = $e" } } label .l -text "Enter 5 characters to generate an error" entry .e -textvariable e -width 10 button .b -width 10 -text "Enter Char" -command {append e c} button .c -width 10 -text "Close" -command exit pack .l .e pack .b .c -side left -expand yes focus .e trace variable e w checkvalue ObservedBehavior: The trace procedure (checkvalue) is written such that the code attempts to display the current value for an undefined variable when the entry widget contains 5 characters. This should generate an error, but doesn't always. If you enter 5 characters manually, my first debug statement is displayed and the trace procedure aborts, but no error is displayed, either in my xterm window or in a popup window. If you enter 5 characters by clicking on the "Enter Char" button 5 times, a popup window containing the error is displayed. DesiredBehavior: Tcl should provide some visual indication that an error has occurred, either by writing the error to stdout (when running interactively), or by displaying the error in a popup window (using tkerror/bgerror). This is by design. The latter fails as expected, because it occurs via the 'append' command. However, the former is triggered through the textvar tracing proc in the entry widget, which ignores errors. The user can specifically do 'error' if they want. -- 12/03/1999 hobbs - foundin initialized to: "obsolete: 8.0p2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Tcl fails to generate visible errors under certain condition
- type initialized to: "Bug"
Ticket change [475bcab812] (rid 99692) by welch on 2000-10-26 08:19:00:
- closedate changed to: "2000-10-26T01:19:00"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [70595cbd73] (rid 100466) by dgp on 2001-04-16 20:42:28:
- closedate changed to: "2001-04-16T13:42:28"
- closer changed to: "dgp"
- subsystem changed to: "07. Variables"