2 Replies Latest reply on May 29, 2008 3:23 PM by Aborda_dev

    Adobe Air AppCrash

    Aborda_dev Level 1
      Hello, we have developed and application off-line with AIR for salesforce.com and we have an application crash that we are unable to solve. Below you are some samples about our tests.
      Tests done over the sqlite database:

      Synch Queries
      Asynchrony Queries
      Queries using EventListeners.
      Queries using Responder.

      Always the result of our have been an AppCrash. We have done tests with the same code in an AIR project and in a FLEX project. This simple program launch HTTP requests to an URL. The result with AIR is a Crash and a success with FLEX. Here you are the code, is absolutely the same except that for AIR you must change "mx:Application" with "mx:WindowedApplication".

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()" width="461" height="127">
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.http.HTTPService;
      private var contador:Number = 0;
      private var encendido:Boolean = false;
      private var conexion:HTTPService = new HTTPService();

      private function initApp():void
      conexion.url = " http://www.salesforce.com/crossdomain.xml"
      conexion.resultFormat = "e4x";
      conexion.useProxy = false;
      conexion.method = "POST";

      function (event:FaultEvent):void
      trace(contador + " Error");


      function (event:ResultEvent):void
      trace(contador + " Ok");


      public function query():void
      if (!encendido) return;


      private function start():void
      encendido = true;

      <mx:Button x="42" y="35" label="Start" click="start();"/>
      <mx:Button x="42" y="65" label="Stop" click="{encendido = false;}"/>
      <mx:Label x="164" y="37" text="querys:"/>
      <mx:Label x="219" y="37" text="{contador}" width="205"/>


      Any feedback will be very welcome. Many thanks in advance.