Unexpected ActionScript Behavior

By sgrosvenor

I was working on a project the other day using the XMLConnector component to see how much time it would save me. It took about 60 seconds to pull the data from the schema, set up the bindings and get it pushing data to a custom list box…that was all fine. I then proceeded to get the application pushing and pulling data from a SQL 2000 database with no problems.

The problems arose when using the onLoad event handler after the LoadVars.sendAndLoad()operation to trigger a function to update the XMLConnector and get the refreshed content into a standard list box which had an XML data feed.

You’d think that XMLConnectorInstance.trigger(); would work first time round. In actual fact, it would never work as expected, and only seemed to reset the list box position strangely enough rather than the content. Weird behavior I thought, so I copied and pasted the line again to call the trigger and it all worked fine and the list box updated with new content.

Why does it take two method calls to instantiate the XML refresh? Not sure, but something I

  • Andy Owen

    I had the same problem but pasting the trigger code line again underneath didn’t seem to refresh the data in my dataGrid!

    Any ideas

  • WonderBoy

    Wow Macromedia… WOW…. You’d think after their 8th iteration of Components they would have ironed out all of the bugs, but I swear learning to code, as in seriously code some RIA’s is way more about learning to hack around macromedia’s bugs than it is actual coding… Take for example the DataGrid… I could lecture on for hours on bugs on the dataprovider, dataset, and all the backend, but hell, lets just assume we are managing the dataprovider ourself with custom objects…. hell, lets just run a double nested for loop and populate the grid with some fake data…. Fine, everything looks good. So, using SetStyle turn on horizontal lines…. Ok, still allright… but now i need some scrolling action to see everything…. turn on horizontal scrolling. Ok, now everything you scroll right all the horiztonal lines disappear past the original view box…. Love you Macromedia… Took me so long to hack this one for some stupid reason. Eventually fixed by hooking the scroll event and calling drawColumns(). Just makes me wonder how productive I might be if things actually worked as expected….

  • Anonymous

    i’m using actionscript loadVariables() and it is causing major problems in firefox. it only works in ie. i set up a simple test to on the remote page in php to echo myVar=”somedata” and it takes forever to load. then my computer crashes with what appears to be memory problems. anyone having this issue? i’m using flash 8.

  • Diego Kleiner

    I´m having the same problem using AS loadVars function in Mozilla Firefox.. It´s annoying! I would appreciate any help. Thnaks.

Get the latest in Front-end, once a week, for free.