0

我有这样一个问题:在带有 Android 操作系统的设备上,我正在执行动作脚本代码。我有一个方法,它必须发送一些数据到服务器。但!!!即使我在向服务器发送一些数据之前停止我的应用程序 - 它仍然会以某种方式发送该数据。不明白怎么可能??有人遇到过这个问题吗?请帮我。谢谢。

public class VerifyCommand extends SimpleCommand
    {


        override public function execute(notification:INotification):void 
        {       
            //here is the place, where I put breakpoint and stop the program
            trace("here is the place, where I put breakpoint and stop the program");
            verify();
        }

        private function verify():void
        {
            var tempError:Error = new Error();
            var stackTrace:String = tempError.getStackTrace();
            trace(stackTrace);

            var request : URLRequest = new URLRequest();
            request.url = "http://www.somesite.com";

            request.method = URLRequestMethod.POST;
            request.contentType = "application/x-www-form-urlencoded; charset=utf-8";
            request.data = variables;
            request.useCache = false;
            request.cacheResponse = false;

            var call_loader:URLLoader = new URLLoader();
            call_loader.dataFormat = URLLoaderDataFormat.TEXT;
            call_loader.addEventListener(Event.COMPLETE, onVerificationResult); 
            call_loader.addEventListener(IOErrorEvent.IO_ERROR, onVerificationError);
            call_loader.load(request);
        }

        private function onVerificationResult(event:Event):void 
        {
            trace("all ok");
        }

        private function onVerificationError( event:Event):void 
        {       
            trace("all failed");
        }
}
4

1 回答 1

0

这是一个调试器错误,它并没有完全停在我认为应该的地方。

于 2012-04-04T10:09:53.550 回答