set focusmaintained 0
proc firstcallback { } {
global attributes
global attribute
global dp
set numberOfRows [$attributes getRowCount]
for {set row 0} {$row < $numberOfRows} {incr row} {
if {"[$attribute getCurrentValue $row]" == "contact depth" ||
"[$attribute getCurrentValue $row]" == "contact description" ||
"[$attribute getCurrentValue $row]" == "dump angle off plane" ||
"[$attribute getCurrentValue $row]" == "complement of dump angle" ||
"[$attribute getCurrentValue $row]" == "pivot offset" ||
"[$attribute getCurrentValue $row]" == "collar offset" ||
"[$attribute getCurrentValue $row]" == "plane angle" ||
"[$attribute getCurrentValue $row]" == "hole dip" ||
"[$attribute getCurrentValue $row]" == "diameter" ||
"[$attribute getCurrentValue $row]" == "dump" ||
"[$attribute getCurrentValue $row]" == "dump direction" ||
"[$attribute getCurrentValue $row]" == "length" ||
"[$attribute getCurrentValue $row]" == "no. rods" ||
"[$attribute getCurrentValue $row]" == "left wall offset" ||
"[$attribute getCurrentValue $row]" == "right wall offset" ||
"[$attribute getCurrentValue $row]" == "pivot height" ||
"[$attribute getCurrentValue $row]" == "reference chainage" ||
"[$attribute getCurrentValue $row]" == "referenced pivot pos" ||
"[$attribute getCurrentValue $row]" == "referenced collar pos" ||
"[$attribute getCurrentValue $row]" == "hole declination" ||
"[$attribute getCurrentValue $row]" == "x" ||
"[$attribute getCurrentValue $row]" == "y" ||
"[$attribute getCurrentValue $row]" == "z" } {
$dp setInputAllowed $row true
} else {
$dp setInputAllowed $row false
}
}
}
proc attributecallback { attribute dp} {
set currentValue "[ $attribute getCurrentValue ]"
if {"$currentValue" != "contact depth" &&
"$currentValue" != "contact description" &&
"$currentValue" != "dump angle off plane" &&
"$currentValue" != "complement of dump angle" &&
"$currentValue" != "pivot offset" &&
"$currentValue" != "plane angle" &&
"$currentValue" != "collar offset" &&
"$currentValue" != "hole dip" &&
"$currentValue" != "diameter" &&
"$currentValue" != "dump" &&
"$currentValue" != "dump direction" &&
"$currentValue" != "length" &&
"$currentValue" != "no. rods" &&
"$currentValue" != "left wall offset" &&
"$currentValue" != "right wall offset" &&
"$currentValue" != "pivot height" &&
"$currentValue" != "reference chainage" &&
"$currentValue" != "referenced pivot pos" &&
"$currentValue" != "referenced collar pos" &&
"$currentValue" != "hole declination" &&
"$currentValue" != "x" &&
"$currentValue" != "y" &&
"$currentValue" != "z" } {
$dp setCurrentValue 0
$dp setInputAllowed false
} else {
$dp setInputAllowed true
}
global nattribute
$nattribute setInputAllowed false
}
proc remembervalue {attribute} {
global focusmaintained
set focusmaintained 1
}
proc checkvaluechanged {attribute title} {
global focusmaintained
global attributes
set newvalue "[ $attribute getCurrentValue ]"
set currentRow "[ $attributes getEditingRow ]"
$title setCurrentValue $currentRow $newvalue
set focusmaintained 0
}
GuidoForm frm70058 {
-default_buttons
-label "Drilling Report"
-help_id 1067
-layout BoxLayout Y_AXIS
-tip RD_DRILL_REPORT_ATTRIBUTE_HELP
-action initial {[firstcallback]}
GuidoLabel frm70058_2 {
-label RD_REPORT_SELECT_ATTRIBUTES
}
GuidoScrollPane frm70058_84 {
-height 12
GuidoTable attributes {
-instances 1 1 50
-interactive true
GuidoComboBox attribute {
-display_length 13
-exclusive true
-format none
-label "Attribute"
-max_length 32
-tip RD_DRILL_REPORT_ATTRIBUTE_LIST
-value_in number letter length "no. rods" "plane angle" "hole declination" b/t diameter dump "dump direction" x y z "reference chainage" "referenced pivot pos" "referenced collar pos" "pivot #" "pivot height" "left wall offset" "right wall offset" pipe drive stope "contact depth" "contact description" "dump angle off plane" "complement of dump angle" "pivot offset" "collar offset"
}
GuidoField title {
-display_length 13
-format none
-label "Title"
-max_length 31
-tip RD_REPORT_TITLE
-translate none
}
GuidoCheckBox right_align {
-default true
-display_length 3
-label "Right Align"
-selected_value Y
-unselected_value N
-tip RD_REPORT_RIGHT_ALIGN
}
GuidoField dp {
-default 0
-display_length 3
-format integer
-low_bound 0
-high_bound 4
-label "Dec. Places"
-max_length 16
-null false
-tip RD_REPORT_DECIMAL_PLACES
-translate none
}
GuidoField nattribute {
-dependency {"[1 == 2]"}
-format none
-display_length 1
-input disallowed
}
$attribute setActionCallback valueChanged {[attributecallback $attribute $dp]}
$attribute setActionCallback focusGained {[remembervalue $attribute]}
$attribute setActionCallback focusLost {[checkvaluechanged $attribute $title]}
}
}
}
