From cab826dd13561e25319890f82445a6d36effc973 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 11 Feb 2009 15:25:31 +0000 Subject: Increase idiomaticity --- library/demos/image2.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/demos/image2.tcl b/library/demos/image2.tcl index 0444dd4..eed64ad 100644 --- a/library/demos/image2.tcl +++ b/library/demos/image2.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a simple collection of widgets # that allow you to select and view images in a Tk label. # -# RCS: @(#) $Id: image2.tcl,v 1.11 2007/12/13 15:27:07 dgp Exp $ +# RCS: @(#) $Id: image2.tcl,v 1.12 2009/02/11 15:25:31 dkf Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -38,7 +38,7 @@ proc loadDir w { proc selectAndLoadDir w { global dirName set dir [tk_chooseDirectory -initialdir $dirName -parent $w -mustexist 1] - if {[string length $dir] != 0} { + if {$dir ne ""} { set dirName $dir loadDir $w } -- cgit v0.12