TwelvestoneFlash

Canceling an XML load


Sign in

  • Waiting for Godot ( 720 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 4.8 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.8 k posts )
    general front end design an...
  • Back End ( 9.6 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
DontBogartMe
 
2007-12-03

Just using 12S as my dev blog again...

So you have a method in your class that loads up some XML from the server, and it sets up an onLoad event handler to the parse the XML.

But now you want to cancel that load before it's finished. You cancel the timer you had running and you set that XML object to null - but it still seems that the onLoad handler is getting called and that's causing some odd results.

The solution is to make sure you delete the onLoad handler before you nullify that XML object.

Storm
 
2007-12-04

proTip++

persist
 
2007-12-05

Unfortunately if you watch with Charles, your app is indeed still loading the data. There's just no object to receive the data with your solution.

It drives me nuts.

Your solution does stop those onloads from firing though which can be handy in recursive situations.

still it drives me nuts that you can't kill the request, especially when its a cancellation of a large file.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

Canceling an XML load