Thank you guys!



--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> That's pretty much it.  Buttons don't like being disabled when you've
> done a mouseDown, but before the mouseUp.  callLater can probably rescue
> you.
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Daniel Freiman
> Sent: Tuesday, May 06, 2008 4:31 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: NumericStepper goes nuts. Who to stop it?
> 
>  
> 
> I'm guessing it's simpler.  The stepper registers a mousedown event,
> which changes the enabled state to false.  Since the control is
> disabled, it never registers a mouseup event.  So the stepper thinks you
> are holding down one of the stepper buttons.  When it reenables, the
> steeper acts as if it is still being clicked.
> 
> - Daniel Freiman
> 
> On Tue, May 6, 2008 at 3:59 PM, Dmitri Girski <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> > wrote:
> 
> 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 <mailto:flexcoders%40yahoogroups.com>
> , "valdhor" <stevedepp@> 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
> <mailto:flexcoders%40yahoogroups.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
> <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.
> > >
> >
>


Reply via email to