So, "change" event comes if you do enabled = false/true. Here is the description from docs: "Dispatched ["change" event] when the value of the NumericStepper control changes as a result of user interaction. " I always though that user interaction means clicks and keyboard input.
Does it mean that NumericStepper "overreacts" on it's own property change? Thanks! Dmitri. --- In flexcoders@yahoogroups.com, "valdhor" <[EMAIL PROTECTED]> wrote: > > I can see why - you are triggering the fOnChange function on a change > event. Then you go ahead and change the numeric stepper by changing > the enabled flag which triggers the change event and so on... > > > > > --- In flexcoders@yahoogroups.com, "Dmitri Girski" <mitek17@> wrote: > > > > Hi all, > > > > Just bumped into some strange effect - if you click on the > > NumericStepper, then processing function disables it, does something > > and re-enables it - it starts clicking by itself. > > > > Any ideas how to stop this? > > > > > > Here is the code: > > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > > layout="absolute"> > > <mx:Script> > > <![CDATA[ > > import mx.managers.CursorManager; > > [Bindable] > > private var m_bFlag:Boolean = true; > > private var m_timer:Timer = new Timer(1000, 1); > > > > private function fOnChange():void > > { > > CursorManager.setBusyCursor(); > > m_bFlag = false; > > m_timer.addEventListener(TimerEvent.TIMER_COMPLETE, > > fStop); > > m_timer.start(); > > } > > private function fStop(event:TimerEvent):void > > { > > CursorManager.removeBusyCursor(); > > m_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, > > fStop); > > m_bFlag = true; > > } > > ]]> > > </mx:Script> > > <mx:NumericStepper x="278" y="222" change="fOnChange()" > > enabled="{m_bFlag}"/> > > </mx:Application> > > > > > > Thanks! > > > > Dmitri. > > >