Hi;
I am trying to trace a variable which is an array element. The element holds a hexadecimal number which can be changed. If the user changes it, I need to make sure that a valid hex number was put in. Instead of getting the value of the element, I am getting the name of the element. Pieces of my trace and proc code are as follows:
trace variable sic${numrad} w eval_sic
proc eval_sic {sic_check index op}{
.
.
.
set choice {tk_messageBox -type ok -message $sic_check}
.
.
set str_len [string length $sic_check]
set choice {tk_messageBox -type ok -message $str_len}
if { $str_len <= 2 && $sic_check != ""} {
if {![$sic_check is xdigit]} {
display_error .....
.
2 hex digits are entered and I need to grab them as a string and eval both (i.e. look at FF not evaluate F then F}
the messagebox lines are for purposes of seeing the values. $sic_check comes out as SIC6 (the name of the array element}
and str_len evaluates to 4 (the number of chars in the element name) What I want is to grab the value that is typed into the element and its properties.
Any help is greatly appreciated;
jjfjr
I am trying to trace a variable which is an array element. The element holds a hexadecimal number which can be changed. If the user changes it, I need to make sure that a valid hex number was put in. Instead of getting the value of the element, I am getting the name of the element. Pieces of my trace and proc code are as follows:
trace variable sic${numrad} w eval_sic
proc eval_sic {sic_check index op}{
.
.
.
set choice {tk_messageBox -type ok -message $sic_check}
.
.
set str_len [string length $sic_check]
set choice {tk_messageBox -type ok -message $str_len}
if { $str_len <= 2 && $sic_check != ""} {
if {![$sic_check is xdigit]} {
display_error .....
.
2 hex digits are entered and I need to grab them as a string and eval both (i.e. look at FF not evaluate F then F}
the messagebox lines are for purposes of seeing the values. $sic_check comes out as SIC6 (the name of the array element}
and str_len evaluates to 4 (the number of chars in the element name) What I want is to grab the value that is typed into the element and its properties.
Any help is greatly appreciated;
jjfjr