Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-11-11
22:56 • Closed ticket [d365d2a3e3]: tk_getOpenFile crashes when passed a bad -typevariab... artifact: fa40f2c1d3 user: dkf
21:20 • New ticket [d365d2a3e3]. artifact: f85251dd6e user: anonymous

tk_getOpenFile crashes when passed a bad -typevariable

Closed / Invalidd365d2a3e3f77b150ea823639250fa9ad07aeb76Created 12 years agoUpdated 12 years ago
Descriptionplain2014-11-11 21:20:11
On Windows only, this script will crash the second time that tk_getOpenFile is executed.  This has happened on windows 32bit, 64bit, XP, 8.6.0-8.6.2.

Select a file to open each time the dialog is displayed.  Both double-clicking and selecting open cause the failure.

#!/usr/bin/tclsh

package require Tk

set types [list [list Sequence {.seq}]]
puts "types:$types"
set dir [pwd]
set fh [open xyzzy.seq w];close $fh
set fh [open plugh.seq w];close $fh

for { set i 0 } { $i < 10 } { incr i } {
      set fn [tk_getOpenFile \
          -initialfile standardrounds \
          -initialdir $dir \
          -defaultextension .seq \
          -parent . \
          -typevariable $types \
          -filetypes $types \
          -title {Select Sequence} ]
}
exit
dkfhtml2014-11-11 22:56:49

This would appear to be an issue with Tk, not with Tcl.

Log in (anonymous is fine) to add a comment.