source keyedListLib.tcl ################################################################ # proc appendToKeyList {}-- # Append a pair of values to the keyList # Arguments # NONE # # Results # global variables key and keyList are modified. # proc appendToKeyList {} { global keyList global key set keyList [appendKeyedPair $keyList [incr key] $key] } set row 1 set column 1 set key 1 set w [button .b_addPair -text "Add Pair" \ -command appendToKeyList] grid $w -row $row -column $column incr column set keyList {} set w [label .l_keyList -textvariable keyList -width 50] grid $w -row $row -column $column