Akaru78 / in-spirit

Automatically exported from code.google.com/p/in-spirit
0 stars 0 forks source link

Forgot to add event listeners for async #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try and send async
2. See that nothing is sent to the server

Instead of 

I use the latest version of the code, with windows 7 and, checked in all 
browsers.

Currently I added the event listener and removing it myself so data would be 
sent,
Simple to fix, add this line in the load method when checking if all the data 
is prepared(or if you deem it not right, in another place):
addEventListener( MultipartURLLoaderEvent.DATA_PREPARE_COMPLETE, startLoad);

Removing the listener in doSend method:
if (_async)
removeEventListener( MultipartURLLoaderEvent.DATA_PREPARE_COMPLETE, startLoad);

New startLoad signature:
public function startLoad(event:MultipartURLLoaderEvent):void

thats about it to get it working in async mode.

Original issue reported on code.google.com by shlom...@gmail.com on 27 Sep 2012 at 12:01