I'd recommend going through with the debugger too.  Step into every
function so that you can make sure you see what's going on, including
stepping into the binding code.  I can't remember what's going on
off-hand, but Doug may be right that what you're seeing is a
re-assignment to the same value, so binding doesn't fire, so nothing
redraws.  

 

Matt

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Doug Lowder
Sent: Tuesday, December 12, 2006 1:20 PM
To: [email protected]
Subject: [flexcoders] Re: Need light shed on Array issue

 

Hi Robert,

I believe that is because Array.slice() returns a new Array object, 
which the binding to fire when assigned to slicedRegionData.source, 
whereas the second version is just setting slicedRegionData.source 
to the same value. Change the line:

slicedRegionData.source = regionData;

to:

slicedRegionData.source = regionData.slice();

and you should find it now works.

- Doug

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Robert Moss" <[EMAIL PROTECTED]> wrote:
>
> Sorry for bumping this, just hoping someone has an idea.
> 
> Thanks,
> Robert
> 
> >>> "Robert Moss" <[EMAIL PROTECTED]> 12/8/2006 4:47 pm >>>
> 
> In Adobe's dashboard sample app, 
http://www.adobe.com/devnet/flex/samples/dashboard/
<http://www.adobe.com/devnet/flex/samples/dashboard/>  it assigns a 
charting component's dataProvider to an ArrayCollection's source 
(e.g. revenueData="{slicedRegionData.source}") In the regionChange
() function it sets the array regionData and assigns it to 
slicedRegionData.source 
> 
> My question is, the delivered code
> 
> slicedRegionData.source = regionData.slice(slider.values[0], 
slider.values[1] + 1); 
> Alert.show(ObjectUtil.toString(slicedRegionData.source));
> 
> and
> 
> slicedRegionData.source = regionData; 
> Alert.show(ObjectUtil.toString(slicedRegionData.source));
> 
> Without the .slice, output the exact same data, but the region 
detail does not auto update without using the .slice code. WHY??? 
Thanks for any insight on this.
> 
> Robert
> 
> 
> ** Confidentiality Notice: This e-mail and any files transmitted 
with it are confidential to the extent permitted by law and intended 
solely for the use of the individual or entity to whom they are 
addressed. If you have received this e-mail in error please notify 
the originator of the message and destroy all copies. **
> 
> 
> 
> 
> ** Confidentiality Notice: This e-mail and any files transmitted 
with it are confidential to the extent permitted by law and intended 
solely for the use of the individual or entity to whom they are 
addressed. If you have received this e-mail in error please notify 
the originator of the message and destroy all copies. **
>

 

Reply via email to