Annotation of capa/capa51/GUITools/scorer.errors.tcl, revision 1.2

1.1       albertel    1: ###########################################################
                      2: # handleErrorsScorer
                      3: ###########################################################
                      4: ###########################################################
                      5: ###########################################################
                      6: proc handleErrorsScorer { num } {
                      7:     global gScorer
                      8: 
1.2     ! albertel    9:     if { [catch {set length [llength $gScorer(errors.$num)]}]} {
        !            10: 	displayMessage "There are no errors to save."
        !            11:     }
        !            12: 
1.1       albertel   13:     if { "" == [set file [tk_getSaveFile]] } { return }
                     14:     if { [catch {set fileId [open $file "w"]}] } {
                     15: 	displayError "Unable to write to $file"
                     16:     }
                     17: 
                     18:     for { set i 0 } { $i < $length } { incr i } {
                     19: 	puts $fileId "#[lindex $gScorer(errortype.$num) $i]"
                     20: 	puts $fileId "#[lindex $gScorer(errors.$num) $i]"
                     21:     }
                     22:     close $fileId
                     23: }
                     24: 
                     25: proc handleErrorsScorer2 { num } {
                     26:     global gScorer
                     27: 
                     28:     if {[winfo exists .scorerError$num]} { 
                     29: 	capaRaise .scorerError$num
                     30: 	return 
                     31:     } 
                     32:     set errorWin [toplevel .scorerError$num] 
                     33:     
                     34:     set generalInfoFrame
                     35:     set studentInfoFrame
                     36:     
                     37: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>