Definitely a bug in NumericStepper. Only
suggestion I can make is that you put a little hack in that ignores the first
change event and only acts on subsequent ones.
Matt
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Devin Holloway
Sent: Thursday, July 14, 2005
10:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
NumericStepper change event executes on startup
I have a web service that executes on application initilization. When
using the Network Service monitor in FlexBuilder,
I noticed that both
the send and result filters for the web service
showed up twice. At
first I assumed this was a bug with the Network
Service monitor. But
sometimes the web service call would fail for
whatever reason, and
when it did, it would show two consecutive alert
boxes telling me it
failed. That's when I figured that it is most
likely being called
twice.
The web service sends back 10 results at a time,
so I'm using the
numericstepper to request additional results. The
only two places in
my application that calls the web service is in
the Application
initialize and NumericStepper change attributes.
Out of curiosity, I removed the web service call
in the Application
initilization and kept it in the NumericStepper
change event. When
the application starts up, the web service still
gets called (and
only called once according to the network service
monitor).
My conclusion is that the NumericStepper's change
event is
automactically executed after initilization, even
though the livedocs
say that the change event is only executed when
the value changes
from "user interaction".
<mx:NumericStepper id="pager" value="1"
minimum="1"
maximum="{aws.ItemSearch.result.Items.TotalPages}"
change="aws.ItemSearch.send()"/>
Even though using the numericstepper to call the
web service on
application startup works, that seems like an
unnatural way to
develop. Does anyone have any thoughts on this?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?>---- HM ADS ?>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?>
---- HM ADS ?>
YAHOO! GROUPS LINKS