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:

                       <mx:HTTPService showBusyCursor="true"

                        id="GetSalesData" url=""

                        result="event.call.resultHandler( event )"

                        fault="event.call.faultHandler( event )"/>

 

If I run this, it causes the problem I talked about – chart doesn’t update, datagrid does, yadda yadda. So I refresh the flex application like crazy (yes, spam refresh…I was mad at this stupid thing J) and IT WORKED. So dumbfounded, I hit refresh in a few seconds and it breaks.

So I decide, it’s gotta be the call right? So I go to that url and run it and see the result (it’s an xml file) and decide to copy the result xml into a hard file called dummy.xml.
                        <mx:HTTPService showBusyCursor="true"

                        id="GetSalesData" url=""

                        result="event.call.resultHandler( event )"

                        fault="event.call.faultHandler( event )"/>

Guess what? It worked 100%. So I’m now thinking….ok, what the heck. You’re telling me the service isn’t working fine? Because remember, this works exactly fine in non-Cairngorm….so I take the two files. I run the service link and do Save Page As – then I took the “view source” of that, write it into an xml file and save it. Compare the two, exactly the same file size and everything – zero file difference using a file comparison tool. So…..I delve deeper and finally figure it out and you’re not going believe me but I swear it’s true.

If my service takes more than 1second to run, I get all these problems. If it takes less than 1 second, it runs perfect.

Yup, that’s right – using CFdebugging I found out how long the service was running and if I can cut-down the file runtime under a second (aka the hard file or spamming refresh to get a saved result), it runs fine. If it takes more than 1 second, I get all these problems where the chart doesn’t show up, the legend is messed up, but the datagrid and the rest is fine…and if I hard push the data into the chart it works fine.

Seriously the *only* thing I change between the two is going to that URL above (which produces the exact same XML but takes a little longer) and a hard-copy of the xml and it works perfect. Zero coding changes at all besides that one line.

My guess? I know you’re going to think I’m nuts but this has to be Cairngorm because in the exact same code, if I take the HTTPService out of my Services.mxml file and move it into the charting template itself – works perfect. Something is going on in the Delegate, ServiceLocator, or the Chart is expecting an update to data that isn’t there yet, or….well hell if I know, all I know is if that webservice for some reason takes longer than 1 second the whole thing breaks. If anyone wants me to pump out any kind of debugging to see why this is doing this, just let me know - but seriously, all I change between the two is the url of that service and it goes from working to not at all.

http://www.irishtexan.net/~sand/temp/bin/srcview/

I’ve posted the code so you can look at what I’m doing – you’ll notice it’s pretty much to the T exactly like yours. Again, all I need to do is change that url to my internal url that I put above, have it take more than 1 second, and it all breaks….

_________________________________________

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.


From: [email protected] [mailto:[email protected]] On Behalf Of Renaun Erickson
Sent: Monday, March 27, 2006 10:19 PM
To: [email protected]
Subject: [flexcoders] Re: Cairngorm problem

 

I create an example called "ComplexObjectBinding" that illustrates
using simple binding and Cairngorm method of a static ModelLocator.

You can find it here:
http://www.renaun.com/flex2/

Not sure whats up with your code, I pretty much did you what you
outlined, only thing I can guess is if the model.hourData is set
before the Template is created you might not fire a bind event, but
its hard to say with out see the actual source code.

Either way check out the example above it shows both methods with a
Custom ChartTemplate and without one.

Its kind of a funny random chart line generate, have fun making funny
looking lines, hehe...

Renaun

--- In [email protected], "Jonathan Miranda" <[EMAIL PROTECTED]>
wrote:
>
> So....I stump everyone here yet? :-)
>
> _________________________________________
>
> Jonathan Miranda
>
> Flexible Master of the Web
>
> "Try not to become a man of success, but a man of value." - Albert
> Einstein
>
> HealthGrades <http://www.healthgrades.com/> : Guiding America to Better
> Healthcare(tm)
>
> 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.
>
> ________________________________
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Jonathan Miranda
> Sent: Friday, March 24, 2006 11:14 AM
> To: [email protected]
> 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 :-)
>
> 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 <http://www.healthgrades.com/> : Guiding America to Better
> Healthcare(tm)
>
> 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
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> 
>
> Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> 
>
> Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> 
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw> 
>
> Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> 
>

>

>
> ________________________________
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>        
> *      To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>        
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>

>
> ________________________________
>






--
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