
wm title . " Choix du lieu d'archivage"

# tableau pour simuler une table de hachage

set courts "sac statasi"
set longs  "~/public_html/Farcompr  /home/info/gh/Crs/Stat/Asi"
for { set idm 0 } { $idm < [llength $courts] } { set idm [incr idm] } {
    set racco        [lindex $courts $idm]
    set lieuc        [lindex $longs  $idm]
    set lieu($racco) $lieuc
} ; # fin pour idm

# boutons

frame   .choix
set cfgBout "-font { Arial 14 bold } -width 10 -fg \"yellow\" -bg   \"blue\" "
eval "button .choix.lieu1 -text [lindex $courts 0] $cfgBout -command { specf [lindex $courts 0] } "
eval "button .choix.lieu2 -text [lindex $courts 1] $cfgBout -command { specf [lindex $courts 1] } "
eval "button .choix.lieux -text \"les deux\"       $cfgBout -command { specf \"$courts\" } "

frame   .exit
button  .exit.bout -text "exit" -font { Arial 14 bold } -width 10 -fg "red" -bg   "yellow" -command exit

pack    .choix -side top
pack    .exit  -side bottom

pack    .choix.lieu1 .choix.lieu2 .choix.lieux -padx 15 -pady 20 -side left
pack    .exit.bout                             -padx 15 -pady 20

# touche rapide pour quitter

bind . <q> exit

# sous-programme pour exécution de l'archivage

proc specf { ligp } { global lieu

 set specfi ""
 foreach idp $ligp {
    set specfi "$specfi    $lieu($idp)"
 } ; # fin de pour chaque

 label .spec -text " specifications :  $specfi  " \
             -fg   "blue" -bg   "yellow" -font { Courier 14 bold }
 destroy .choix .exit
 pack    .spec
 after   5000 exit

} ; # fin de procédure specf
