Welcome to Kap Lab Store

Topic "KapITFXPatches_SDK_4_0.swc from ParsleyConsole 2.3.2 breaks HTTPService responders"

8 Item(s)

per page
Simple case, create new project (I've created an AIR app) for flex sdk 4.1.

Use this code and launch the start() method (from button click, or whatever).
import mx.rpc.AsyncResponder;
import mx.rpc.AsyncToken;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
public function start():void
var service:HTTPService = new HTTPService();
service.url = "http://www.engadget.com/rss.xml";
var token:AsyncToken = service.send();
token.addResponder(new AsyncResponder(result, fault));
public function result(event:ResultEvent, token:AsyncToken):void {
trace('I will appear twice');
public function fault(event:FaultEvent, token:AsyncToken):void {
trace('I will appear twice - error');
The observed result is that the result handler will launch twice. I've narrowed it down to KapITFXPatches_SDK_4_0.swc. If it is included as library, it causes this behaviour (by patching some flex classes obviously). I did not observe this behaviour in pure mxml, using <s:HTTPService result="handler()" /> - then it works ok. The bug happens in SDK 4.0 as well.

This is pretty much a dealbreaker, if you have this patch in the project and use Parsley, you will get your result handlers fired twice, which causes errors hard to resolve for Commands or DynamicCommands. Still, Parsley console is a very useful think, so it would be good to have it.

Please fix it - thanks!
Posted : 16 December 2010 22:36
Oh dear, it didn't go too well with formating :/ Somehow I cannot edit my posts, though. Hope you can use it anyway.
Posted : 16 December 2010 22:40
Hi, thanks for reporting the problem, your sample will help to solve it.
However, the patch library is just a kind of addon on the console, it is not required for the console to work.
If the library is linked with your projects, only in dev builds, NOT in prod releases, then the console will display an extra tab named "service" that displays raw information on service calls.
You can then safely remove the library from your build and still use the console.
The fix will be included in the next release. Source code is also available if you wish to look at it by yourself
Posted : 17 December 2010 08:48
Thanks for quick answer. Yes, I'm aware that this patch is just for Services and I can go without it during development, and for sure, remove it from release build. I just wanted to have full functionality for testing/debugging purposes while developing.

Yes, I've tried to look at the source code, but somehow I could not download it. But anyway, I'm glad it has been recognized and you will work on it - great!
Posted : 17 December 2010 10:17
Have you tried this url in order to download the source code? http://lab.kapit.fr/download/attachments/53837862/KapDebug-sources.zip?version=2
I've checked your rights and nothing should prevent you from downloading the zip file.
It's kind of a big archive though (18mB).

Posted : 17 December 2010 10:28
Ah, I see what the problem is. Must be your hosting / way of delivering files. It does not give the final size of the file, rendering browsers incapable of showing the progress bar - at least in firefox. I did not pay attention that it's actually downloading and cancelled it after a while. But it can be downloaded, I have it now, thanks.
Posted : 17 December 2010 10:33
The archive is delivered by Tomcat, not Apache, that's the reason the size isn't shown before the entire download is complete :)
Posted : 17 December 2010 10:36
Which is only a minor inconvenience, once you know it :)
Posted : 17 December 2010 10:38

8 Item(s)

per page