| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#21
| |||
| |||
| Koen Danckaert wrote: > The code contains another small bug. Can you also apply the following > patch when committing your code? > @@ -614,7 +614,7 @@ > return > } > IconList_Selection $w clear 0 end > - IconList_Selection $w set anchor $i > + IconList_Selection $w anchor $i > } > About this last bug: it happens when you press and hold <Shift-Button1> in the dialog, and then move the mouse. But the patch above is probably not right either; the following would be better: @@ -581,12 +581,11 @@ if {$i eq ""} { return } - set a [IconList_Index $w anchor] - if {$a eq ""} { - set a $i + if {[IconList_Index $w anchor] eq ""} { + IconList_Selection $w anchor $i } IconList_Selection $w clear 0 end - IconList_Selection $w set $a $i + IconList_Selection $w set anchor $i } } Koen |
|
#22
| |||
| |||
| On Aug 25, 8:40*am, Koen Danckaert <k...@usenet.cnntp.org> wrote: > Koen Danckaert wrote: > > The code contains another small bug. Can you also apply the following > > patch when committing your code? > > @@ -614,7 +614,7 @@ > > * * * *return > > * * } > > * * IconList_Selection $w clear 0 end > > - * *IconList_Selection $w set anchor $i > > + * *IconList_Selection $w anchor $i > > } > > About this last bug: it happens when you press and hold <Shift-Button1> in the dialog, and then move the mouse. > But the patch above is probably not right either; the following would be better: > > @@ -581,12 +581,11 @@ > * * * * if {$i eq ""} { > * * * * * * return > * * * * } > - * * * set a [IconList_Index $w anchor] > - * * * if {$a eq ""} { > - * * * * * set a $i > + * * * if {[IconList_Index $w anchor] eq ""} { > + * * * * * *IconList_Selection $w anchor $i > * * * * } > * * * * IconList_Selection $w clear 0 end > - * * * IconList_Selection $w set $a $i > + * * * IconList_Selection $w set anchor $i > * * *} > *} > > Koen Hello Koen, This does not work properly for me. when Shift_Button1 is used, Nothing shows as selected, but filesnames appear in the File_Names: entry widget. -Todd |
|
#23
| |||
| |||
| thelfter@gmail.com wrote: > On Aug 25, 8:40 am, Koen Danckaert <k...@usenet.cnntp.org> wrote: >> Koen Danckaert wrote: >>> The code contains another small bug. Can you also apply the following >>> patch when committing your code? >>> @@ -614,7 +614,7 @@ >>> return >>> } >>> IconList_Selection $w clear 0 end >>> - IconList_Selection $w set anchor $i >>> + IconList_Selection $w anchor $i >>> } >> About this last bug: it happens when you press and hold <Shift-Button1> in the dialog, and then move the mouse. >> But the patch above is probably not right either; the following would be better: >> >> @@ -581,12 +581,11 @@ >> if {$i eq ""} { >> return >> } >> - set a [IconList_Index $w anchor] >> - if {$a eq ""} { >> - set a $i >> + if {[IconList_Index $w anchor] eq ""} { >> + IconList_Selection $w anchor $i >> } >> IconList_Selection $w clear 0 end >> - IconList_Selection $w set $a $i >> + IconList_Selection $w set anchor $i >> } >> } >> >> Koen > > Hello Koen, > > This does not work properly for me. when Shift_Button1 is used, > Nothing shows as selected, but filesnames appear in the File_Names: > entry widget. > > -Todd Are you sure? It seems to work properly for me. Below is the complete patch I have for tkfbox.tcl. Koen --- tkfbox.tcl#org 2008-08-21 15:03:39.000000000 +0200 +++ tkfbox.tcl 2008-08-25 14:33:48.233159560 +0200 @@ -581,12 +581,11 @@ if {$i eq ""} { return } - set a [IconList_Index $w anchor] - if {$a eq ""} { - set a $i + if {[IconList_Index $w anchor] eq ""} { + IconList_Selection $w anchor $i } IconList_Selection $w clear 0 end - IconList_Selection $w set $a $i + IconList_Selection $w set anchor $i } } @@ -1608,21 +1607,9 @@ set text [$data(ent) get] if {$data(-multiple)} { - # For the multiple case we have to be careful to get the file - # names as a true list, watching out for a single file with a - # space in the name. Thus we query the IconList directly. - - set selIcos [::tk::IconList_CurSelection $data(icons)] - set data(selectFile) "" - if {[llength $selIcos] == 0 && $text ne ""} { - # This assumes the user typed something in without selecting - # files - so assume they only type in a single filename. - VerifyFileName $w $text - } else { - foreach item $selIcos { - VerifyFileName $w [::tk::IconList_Get $data(icons) $item] - } - } + foreach t $text { + VerifyFileName $w $t + } } else { VerifyFileName $w $text } @@ -1783,7 +1770,7 @@ if {[llength $text] == 0} { return } - if { [llength $text] > 1 } { + if {$data(-multiple)} { set newtext {} foreach file $text { set fullfile [JoinFile $data(selectPath) $file] |
|
#24
| |||
| |||
| On Aug 25, 10:47*am, Koen Danckaert <k...@usenet.cnntp.org> wrote: > thelf...@gmail.com wrote: > > On Aug 25, 8:40 am, Koen Danckaert <k...@usenet.cnntp.org> wrote: > >> Koen Danckaert wrote: > >>> The code contains another small bug. Can you also apply the following > >>> patch when committing your code? > >>> @@ -614,7 +614,7 @@ > >>> * * * *return > >>> * * } > >>> * * IconList_Selection $w clear 0 end > >>> - * *IconList_Selection $w set anchor $i > >>> + * *IconList_Selection $w anchor $i > >>> } > >> About this last bug: it happens when you press and hold <Shift-Button1> in the dialog, and then move the mouse. > >> But the patch above is probably not right either; the following would be better: > > >> @@ -581,12 +581,11 @@ > >> * * * * if {$i eq ""} { > >> * * * * * * return > >> * * * * } > >> - * * * set a [IconList_Index $w anchor] > >> - * * * if {$a eq ""} { > >> - * * * * * set a $i > >> + * * * if {[IconList_Index $w anchor] eq ""} { > >> + * * * * * *IconList_Selection $w anchor $i > >> * * * * } > >> * * * * IconList_Selection $w clear 0 end > >> - * * * IconList_Selection $w set $a $i > >> + * * * IconList_Selection $w set anchor $i > >> * * *} > >> *} > > >> Koen > > > Hello Koen, > > > This does not work properly for me. *when Shift_Button1 is used, > > Nothing shows as selected, but filesnames appear in the File_Names: > > entry widget. > > > -Todd > > Are you sure? It seems to work properly for me. > Below is the complete patch I have for tkfbox.tcl. > > Koen > > --- tkfbox.tcl#org * * *2008-08-21 15:03:39.000000000 +0200 > +++ tkfbox.tcl *2008-08-25 14:33:48.233159560 +0200 > @@ -581,12 +581,11 @@ > * * * * if {$i eq ""} { > * * * * * * return > * * * * } > - * * * set a [IconList_Index $w anchor] > - * * * if {$a eq ""} { > - * * * * * set a $i > + * * * if {[IconList_Index $w anchor] eq ""} { > + * * * * * *IconList_Selection $w anchor $i > * * * * } > * * * * IconList_Selection $w clear 0 end > - * * * IconList_Selection $w set $a $i > + * * * IconList_Selection $w set anchor $i > * * *} > *} > > @@ -1608,21 +1607,9 @@ > > * * *set text [$data(ent) get] > * * *if {$data(-multiple)} { > - * * * # For the multiple case we have to be careful to get the file > - * * * # names as a true list, watching out for a single file witha > - * * * # space in the name. *Thus we query the IconList directly.. > - > - * * * set selIcos [::tk::IconList_CurSelection $data(icons)] > - * * * set data(selectFile) "" > - * * * if {[llength $selIcos] == 0 && $text ne ""} { > - * * * * * # This assumes the user typed something in without selecting > - * * * * * # files - so assume they only type in a single filename. > - * * * * * VerifyFileName $w $text > - * * * } else { > - * * * * * foreach item $selIcos { > - * * * * * * * VerifyFileName $w [::tk::IconList_Get $data(icons) $item] > - * * * * * } > - * * * } > + * * * *foreach t $text { > + * * * * * *VerifyFileName $w $t > + * * * *} > * * *} else { > * * * * VerifyFileName $w $text > * * *} > @@ -1783,7 +1770,7 @@ > * * *if {[llength $text] == 0} { > * * * * return > * * *} > - * *if { [llength $text] > 1 } { > + * *if {$data(-multiple)} { > * * * * set newtext {} > * * * * foreach file $text { > * * * * * * set fullfile [JoinFile $data(selectPath) $file] Yes this looks good, I misapplied your changes. -Todd |
|
#25
| |||
| |||
| All who are tracking this; A patch for this bug has been applied to the Tk 8.5 and 8.6 cvs repositories -Todd |
|
#26
| |||
| |||
| On Aug 26, 10:53 am, "Donal K. Fellows" <donal.k.fell...@manchester.ac.uk> wrote: > Don't forget, it's sometimes necessary to push the maintainers a bit > too. They've got their own priorities (of course) and otherwise worthy > patches can get omitted by accident. Squeaky wheels *do* get grease. > Maintainers, please consider building your code against Tcl/Tk 8.5.4, then making certain your package's test suite runs successfully. If the package makes it through that, then developers and users will have a greater confidence in the latest Tcl release. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.