tk_getOpenFile -multiple doesn't allow selecting multiple fi
Closed / Invalid1177368fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-04-05 21:00:13
Here's a fix that patches the problem.
To test, just do
tk_getOpenFile -multiple
73a74
>
84a86
>
87a90
>
100a104
>
106a111
> incr ind +1
109c114
< for {} {$ind >= 0} {incr ind -1} {
---
> while {$ind >= 0} {
112c117
< set last $ind
---
> set last $ind
114a120
> incr ind -1
116d121
<
119a125
>
120a127
>
121a129
>
122a131
>
202c211543,544c552,566
< IconList_Selection $w clear 0 end
< IconList_Selection $w set $i
---
>
> set noset 0
>
> if { !$data(-multiple) } {
> IconList_Selection $w clear 0 end
> } else {
> if { [IconList_Selection $w includes $i] } {
> IconList_Selection $w clear $i $i
> set noset 1
> }
> }
>
> if { !$noset } {
> IconList_Selection $w set $i
> }
550d571
<
568c589
<
---
>
579d599
< IconList_Selection $w clear 0 end
586a607
>
595c616,620
< IconList_Selection $w clear 0 end
---
>
> if { !$data(-multiple) } {
> IconList_Selection $w clear 0 end
> }
>
596a622
>
< {-multiple "" "" "0"}
---
> {-multiple "" "" "1"}
The version is -
#
# RCS: @(#) $Id: tkfbox.tcl,v 1.38.2.7 2004/09/10
22:28:30 dkf Exp $
#
I don't know how this ever worked anywhere. Oh well.....
Thanks.
JCC
chillhuman (at) excite (dot) com
dkf Closed ticket [1177368fff].
[History diff]2005-04-06 17:04:02
dkfplain2005-04-06 17:04:03
Logged In: YES user_id=79902 Not a Tcl fault in any case. (Perhaps a Tk problem, but that's a different tracker in a different project and I can't transfer it). Also, it works for me with that exact version of the file; I can select and return multiple files by holding down Control and clicking on the filenames (the usual idiom for multiple-selection). For future reference, patches are better done as uploaded attachments to bug reports, and are also far better done as either context diffs or unified diffs. (I prefer unidiffs; they're much more readable when you want to see what's changed without having to apply the patch to a codebase first.)
Log in (anonymous is fine) to add a comment.