equality and errors

From: marvin (scary_at_movie.com)
Date: 12/11/03


Date: Thu, 11 Dec 2003 09:41:17 -0500

hi -

in visual tcl i have these 2 functions defined. when i check for nonNumeric
values that code works.
this code is giving me problems though. if a zero is entered in entry1
field it should fire.
i dont understand!! I am really new to tcl. i am finishing my first visual
tcl gui program using
xotcl and i am trying to add this error trapping.

thanks for any help,
marvin

# errorProc code

set fail [catch { $first < 1} range1]
 if {$fail} {
   error "range1 error"
  }

# code attached to a button

 set a [Toplevel1.Entry1 get] ;
set b [Toplevel1.Entry2 get] ;

   set fail [catch {errorProc $a $b } returnString]

   if {$fail} {

 error "user error" "evaluating error" [list USER {123} {Non-Standard
User-Defined Error}] ;
  }