6 Replies Latest reply on Oct 7, 2013 1:10 AM by Pietro Francesco Maggi

    AsyncHttp Syntax

    David Miller

      I can't get AsyncHttp to work on the device (MC55A, windows mobile 6.5).  It does run the my_object_creation code but the UI is blocked.  Controller code:

       

       

      def kick_off_objection_creation

          Rho::AsyncHttp.get(:url => (url_for :action => my_object_creation), :callback => (url_for :action => :creation_complete))

          render :action => :creation_results_page    # this has JS functions to update the user of progress

      end

       

       

      def my_object_creation

           ...reads a csv file and imports the data into the database, using transactions...

           ...uses WebView.execute_js to update the user of progress on the creation_results_page...

      end


      def creation_complete

          dataImportStatusText = "Data Import Done"

             WebView.execute_js("setDataImportStatus('"+dataImportStatusText+"');")

      end

       

       

      Anybody see what is wrong?  Or is AsyncHttp not possible on a WM device?