Search code examples
apache-flexhttpservice

Problems re-using HTTPService object


I'm trying to reuse the HTTPService object in a flex app but I'm running into a problem. In the handler for ResultEvent.RESULT I'm removing the listener, but it isn't removed. I've have to catch the asyncToken from send() and attach a new property so I know what it's supposed to do in the handler.

I've set up an example here: http://www.152.org/flex/
You can right-click and view source.

Has anyone else run into an issue where listeners aren't removed? Should HTTPService not be reused?


Solution

  • I came accross this problem today on an application that had been working well for several months. After serval hours of debugging, I found out that a recent upgrade in my flex compiler settings from 3.1 to 3.4 was the culprit. For now I have restored 3.1 as the compilation environment in order for my project to continue working.

    In my opinion this is a major bug introduced sometime after Flex 3.1, I hope adobe fixes it soon. I reuse HTTPService all the time all over my code and this bug makes version 3.4 not workable for me.

    Hope this helps.