Hmmm, I sent this over an hour ago and it still hasn’t updated on the list. Let’s try again:


Well, I just got probably a better working example. Matt can attest I find the weirdest bugs
J

Here’s the rundown:

<mx:Button id="test" label="Test" click="salesChart.dataProvider=model.hourData;"/>
<mx:LineChart id="salesChart" dataProvider="{model.hourData}"….
<mx:DataGrid id="HourGrid" dataProvider="{model.hourData}" ….

 

When the model changes, the DataGrid updates, the chart doesn’t.
When I click the button, the chart updates.

Same thing (I changed it to ArrayCollection from an Array to make sure) outside Cairngorm works fine.

Non-cairngorm:

-return from service
    hourData = event.result.list.hour;

    slicedHourData = new ArrayCollection(hourData);
-in mxml
     [Bindable]

     public var slicedHourData : ArrayCollection;

    <templates:TotalSales hourData="{slicedHourData}"

-in template component
    [Bindable]
    public var hourData : ArrayCollection;
    <mx:LineChart id="salesChart" dataProvider="{hourData}"
    <mx:DataGrid id="HourGrid" dataProvider="{hourData}"

Cairngorm:

-return from service
    model.hourData = new ArrayCollection( event.result.list.hour);
-in modelLocator (which is a bindable class)
    public var hourData: ArrayCollection;   
-in template component
    [Bindable]

    public var model : ModelLocator = ModelLocator.getInstance();
    <mx:LineChart id="salesChart" dataProvider="{model.hourData}"…
    <mx:DataGrid id="HourGrid" dataProvider="{model.hourData}"…

Pretty much the same exact code but it’s the chart isn’t updating in Cairngorm but the datagrid updates for both.

 

 

 

_________________________________________

Jonathan Miranda

Flexible Master of the Web

"Try not to become a man of success, but a man of value." - Albert Einstein

HealthGrades: Guiding America to Better Healthcare™

NASDAQ: HGRD

w  (720) 963-3832

c  (707) 761-0868

[EMAIL PROTECTED]

_________________________________________

The message contains confidential and/or legally privileged information and is intended for use only by the indicated addressee.  If you are not the named addressee you should not disseminate, distribute, or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed,arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to