Hi.
I want to log the changes a user makes in numericStepper. However, if
user makes changes by clicking on the arrow buttons, these are
recorded separately than if he manually enters the value.
Current code snippets:
<mx:NumericStepper id="proposedBid" value="50}" minimum="0"
maximum="100" stepSize="1" change="{calcProfits(event)}"
mouseUp="{calcProfits(event)}" />
public function calcProfits(event:Event=null):void
{
var bid:int=event.currentTarget.value;
var now:Date=new Date();
if(event.type=="mouseUp" && bid != prevValue)
{
if(bid>prevValue)
writeFile("UP_ARROW"+event.type+"\t\t"+bid);
else
writeFile("DOWN_ARROW"+event.type+"\t\t"+bid);
prevValue=bid;
}
else if(event.type=="change" &&
event.type!="mouseDown" &&
event.type!="mouseUp" && bid != prevValue)
{
writeFile("TYPED_IN"+event.type+"\t\t"+bid);
prevValue=bid;
}
}
This is only a part of the entire code, but this records changes only
due to change event. However, if the else if part is commented out,
then it records the mouseup events, but the manual entry is not
recorded then.
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.