in reply to Tk Interface To Run Apps

Just a minor nit-pick -- the day-of-week stuff could be handled a little more easily:
... #Create Labels and headings my @wkdays = qw/M T W R F Sa Su/; my %labelColumns; my $i = 0; foreach ( qw/On Program Browse/, @wkdays ) { $labelColumns{$_} = $i++; $mid_frame -> Label( -text => "$_", -relief => "sunken", -padx => +5 ) -> grid( -column => $labelColumns{$_}, -row => 0, -padx => 0 ) +; } ... # Time Checkbuttons for my $dy ( @wkdays ) { $mid_frame -> Checkbutton( -variable => \$files[$index][$label +Columns{$dy}]) ->grid( -row=>$_, -column=>$labelColumns{$dy}, -padx => 0, + -pady => 5 ); } ...
If/when you decide to change an option or something for those mid_frame Checkbuttons, you'll appreciate having only one line of code to change, instead of 7.

Replies are listed 'Best First'.
Re^2: Tk Interface To Run Apps
by ~~David~~ (Hermit) on Sep 22, 2008 at 13:44 UTC
    Your right. I was thinking that I might want to change the order in the future, but your way makes it just as easy and shorter...
    ~~David~~