proc fillDescriptionFieldNames {filelocation descField} {
set location [$filelocation getCurrentValue]
set filename ""
append filename $location ".str"
if {[string length $filename] > 4} {
set buffer [GuidoExecServer FillDescriptionFieldNames [subst {FileName = "$filename"}]]
set status [GuidoGetParamBufferValue $buffer status]
if {$status >= 0} {
set num_fields [GuidoGetParamBufferValue $buffer "fieldCount"]
set desc_field_names [GuidoGetParamBufferValue $buffer "field_name"]
set numberofFields ""
for {set i 0} {$i < $num_fields} {incr i} {
set fieldName [lindex $desc_field_names $i]
lappend numberofFields $fieldName
}
$descField removeAllItems
eval [concat {$descField} {setValues} $numberofFields ]
$descField setExclusive true
$descField setNullAllowed false
$descField setCurrentValue [$descField getItemAt 0]
}
}
}
proc getDescriptionFieldNames {filelocation descField} {
set location [$filelocation getCurrentValue]
set filename ""
append filename $location ".str"
if {[string length $filename] > 4} {
set buffer [GuidoExecServer GetDescriptionFieldNames [subst {FileName = "$filename"}]]
set status [GuidoGetParamBufferValue $buffer status]
set numberofFields ""
if {$status >= 0} {
set num_fields [GuidoGetParamBufferValue $buffer "fieldCount"]
set desc_field_names [GuidoGetParamBufferValue $buffer "field_name"]
for {set i 0} {$i < $num_fields} {incr i} {
set fieldName [lindex $desc_field_names $i]
lappend numberofFields $fieldName
}
$descField removeAllItems
eval [concat {$descField} {setValues} $numberofFields ]
$descField setExclusive true
$descField setNullAllowed false
$descField setCurrentValue [$descField getItemAt 0]
} else {
$descField removeAllItems
set fieldName "Z"
lappend numberofFields $fieldName
eval [concat {$descField} {setValues} $numberofFields ]
}
}
}
proc destroyDescriptionFieldsMap {} {
set buffer [GuidoExecServer DestroyDescriptionFieldsMap {}]
}
