Skip to search.
flexcoders · RIA Development with Adobe Flex

Group Information

  • Members: 9017
  • Category: Development
  • Founded: Mar 17, 2004
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Cairngorm problem   Message List  
Reply Message #32501 of 165212 |
RE: [flexcoders] Cairngorm problem

So….I stump everyone here yet? J

_________________________________________

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

jmiranda@...

_________________________________________

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.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonathan Miranda
Sent: Friday, March 24, 2006 11:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm problem

 

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

jmiranda@...

_________________________________________

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.

 




Mon Mar 27, 2006 7:54 pm

snowtechagent
Online Now Online Now
Send Email Send Email

Message #32501 of 165212 |
Expand Messages Author Sort by Date

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...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 24, 2006
6:13 pm

So....I stump everyone here yet? :-) _________________________________________ Jonathan Miranda Flexible Master of the Web "Try not to become a man of success,...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 27, 2006
7:54 pm

I create an example called "ComplexObjectBinding" that illustrates using simple binding and Cairngorm method of a static ModelLocator. You can find it here: ...
Renaun Erickson
kaibabsowats Offline Send Email
Mar 28, 2006
5:19 am

Alright, so after seeing this reply and going slightly insane for awhile I actually narrowed down the problem....and wow what a WEIRD bug. Ok, here goes: ...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 28, 2006
4:13 pm

Hello Jonathan, you've posted nice example so I've decided to investigate what you described even if i'm not very experienced dev yet, so first I wrote a...
Peter Blazejewicz
piotrblazeje... Offline Send Email
Mar 28, 2006
10:17 pm

This does sound weird. I haven't had time to play with the HTTPService 1s timing issue. But definetly something is going on. So we have narrowed it down to...
Renaun Erickson
kaibabsowats Offline Send Email
Mar 28, 2006
10:25 pm

Well, if I make the same exact call in non-Cairngorm it works fine. If you want, I can post the code of the non-cairngorm solution that works right now. Either...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 28, 2006
10:37 pm

Hello Jonathan & Renaun, I've added: executeBindings(true); in "onResults" handler posted previously and now chart are working fine, not tested with original...
Peter Blazejewicz
piotrblazeje... Offline Send Email
Mar 28, 2006
11:05 pm

hi Jonathan, calling Application.application.executeBindings(true) within orginal StatsCommand onResult handler make your example working fine for me (when...
Peter Blazejewicz
piotrblazeje... Offline Send Email
Mar 28, 2006
11:14 pm

Johanthan and Peter, I finally got a chance to test the code. I confirm the spardic LineChart bind issue with HTTPService's url accessing a cfm and a php ...
Renaun Erickson
kaibabsowats Offline Send Email
Mar 29, 2006
7:05 am

Yeah it seems to work, and thanks guys for looking into this.... Any ideas why I would have to do this though for just the chart? ...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 29, 2006
4:41 pm

Joe B found another bug related to binding and initialization, maybe we're running into something similar. If anyone has a simpler example that uses binding...
Matt Chotin
m_chotin Offline Send Email
Mar 30, 2006
5:31 am

I already sent ya mine but I think Renaun or Peter Blaze had a smaller example... _________________________________________ Jonathan Miranda Flexible Master of...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 30, 2006
4:14 pm

Actually, if you guys notice, even with doing executeBindings(true), the Legend doesn't update. But the Legend has a binding to the chart (which updates) and...
Jonathan Miranda
snowtechagent Online Now Send Email
Mar 30, 2006
9:35 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help