set num_fields 0
proc loadReviewSurveyStationCoords { form } {
global num_fields
for {set idx 0} {$idx < $num_fields} {incr idx} {
global "value$idx"
upvar 0 "value$idx" field
$field setCurrentValue [$form readInputField main($idx).value]
}
return 1
}
proc saveReviewSurveyStationCoords { form } {
if {[string compare [$form getStatus] "legacy preprocess apply"] == 0} {
global num_fields
for {set idx 0} {$idx < $num_fields} {incr idx} {
global "value$idx"
upvar 0 "value$idx" field
$form writeOutputField main($idx).value "[$field getCurrentValue]"
}
$form finishedWritingFields
}
return 1
}
GuidoForm frm10125 {
-action initial {[loadReviewSurveyStationCoords $frm10125]}
-action stateChanged {[saveReviewSurveyStationCoords $frm10125]}
-default_buttons
-label "Review surface station co-ordinates"
-help_id 1634
-layout BoxLayout Y_AXIS
-tip SRV_REVIEW_DATA_TIP
GuidoScrollPane frm10125_35 {
-height 16
set fieldParam [GuidoExecServer "GetReviewSurfaceSurveyStationCoordFields" {}]
set num_fields [GuidoGetParamBufferValue $fieldParam FieldCount]
GuidoPanel main {
-layout CentreLineLayout
for {set idx 0} {$idx < $num_fields} {incr idx} {
set field_name "[GuidoGetParamBufferValue $fieldParam FieldName($idx)]"
set field_length "[GuidoGetParamBufferValue $fieldParam FieldLength($idx)]"
set num_decimals "[GuidoGetParamBufferValue $fieldParam NumDecimals($idx)]"
set nulls_allowed "[GuidoGetParamBufferValue $fieldParam NullsAllowed($idx)]"
set input_allowed "[GuidoGetParamBufferValue $fieldParam InputAllowed($idx)]"
if {$input_allowed == "true"} {
GuidoField "value$idx" {
-decimals $num_decimals
-display_length 32
-label $field_name
-max_length $field_length
-null $nulls_allowed
-input true
-tip "Enter the value required for this field"
-translate none
}
} else {
GuidoLabel "label$idx" {
-label $field_name
}
GuidoLabel "value$idx" {
}
}
}
}
}
$frm10125 legacyProcessValues false
}
