Working on my script, i'm running into this:
I have 3 values, if i change on the others should be updatet.
It works fine as long as i mark the values with the mouse - change them - hit enter -other value is updated.
But if i click into the input the NumericTextEntry comes up - i change the value - hit enter (or click Okay) - nothing.
The NumericTextEntry doesnt give me a onChange event
How can i solve this?
Ralf
the htm file:
###############################
<html xmlns:moi>
<head>
<link rel="stylesheet" href="moi://ui/moi.css" type="text/css">
<script>
var opt;
function UpdateValues(opt)
{
if(opt ==1){
scale.value=newD.value/oldD.value;
}else{
newD.value=oldD.value*scale.value;
}
alert(opt);
}
</script>
</head>
<body class="commandbody">
Change Hole
Select all faces of the hole
Pick basepoint
Change Diameter
<moi:CheckButton id="subtype" style="persist:true" default=true>Keep Tool</moi:CheckButton>
<moi:NumericInput id="oldD" style="width:4em;">
<nobr> Old diameter</nobr>
<moi:NumericInput id="newD" style="width:4em;" onchange="UpdateValues(1);">
<nobr> New diameter</nobr>
<moi:NumericInput id="scale" style="width:4em;" onchange="UpdateValues(0);">
<nobr> Scale factor</nobr>
<nobr>Scalefactor</nobr>
<moi:Slider id="diameterSlider" min="0" max="5" style="width:90%">
<moi:NumericInput id="scalez" style="width:3em;" default="1" binding="diameterSlider.value = this.value">
<moi:CommandCancel>
<moi:CommandDoneCancel>
</body>
</html>
##############
|