Using async in an AIR application?

After reading this FlexUnit tutorial:
http://www.adobe.com/devnet/flex/articles/flashbuilder4_tdd.html
I downloaded the files here:
http://download.macromedia.com/pub/developer/flashbuilder4_tdd_source.zip
...and changed the project, FlexUnit4Examples, to an AIR application via FlashBuilder.  After I did that, it no longer passes all of its asynchronous tests.
Do asynchronous tests have any issues or limitations with AIR?

The problem I had was not related to FlexUnit.  It was the way I was tried to access the file system when it was an AIR application.  I used FileStream instead of what was in the tutorial that worked with a web base application, which was HTTPService.
Since I am new with unit testing, I assumed that it was the test that was coded wrong.  I suppose I havent trusted my unit tests enough, since it told me that my source code was incorrect.

Similar Messages

  • Error using as3corelib in Adobe AIR application

    I have created a new Adobe AIR application (HTML/JavaScript) in Aptana Studio.
    To implement the password protected db, i am trying to implement the EncryptionKeyGenerator class from the swf file of as3corelib.
    However, when i try to access it's functions, i get the following error
    Value not a constructor. So i am not able to access the functions of the class.
    Can anyone help me..?

    Thanks 4 the reply...
    I downloaded as3corelib library from http://code.google.com/p/as3corelib/downloads/list, extracted the library.swf file from the available as3corelib.swc file, included it to the lib tab of my application, renamed it as EncryptionKeyGenerator.swf and i've done the following:
    <script type="application/x-shockwave-flash" src="lib/EncryptionKeyGenerator.swf"></script>
    function init(){
    var ekg;
    if(window.runtime)
                        if(!ekg)ekg={};
                       ekg.EncryptionKeyGenerator=window.runtime.com.adobe.air.crypto.EncryptionKeyGenerator;//from a document over net
                        keyGenerator=new ekg.EncryptionKeyGenerator();
    On running my application, it says Value not a constructor.
    However, i downloaded a installer package, EncryptedDBHTML.air  over the net and when i used the EncryptionKeyGenerator.swf file from this package in my application, it worked. Now, the available codin used this:
                       ekg.EncryptionKeyGenerator=window.runtime.com.adobe.data.encryption.EncryptionKeyGenerato r;
    I tried using the above package name, however i end up with the same error.
    Any help is appreciated..

  • What IDE do I use to develop Adobe AIR applications?

    You can leverage any existing IDE that you already use for Flash, Flex, or HTML/JavaScript development. Adobe AIR does not require a specific IDE; however, Adobe AIR is integrated into Adobe Creative Suite, Flash Professional, and Flash Builder (formerly known as Flex Builder).
    We also provide a set of command line tools that allow developers to test and package AIR applications from the command line. These tools can be found in the Adobe AIR SDK.
    Basically, you can use any tool that outputs SWF or HTML files.

    Here's one.
    The thunderbolt port doubles as a Mini DisplayPort.
    Mind you, it's just an adapter. You will need an HDMI cable to span the distance from the computer to the TV.

  • How to use Sql Lite with AiR application

    Hi,
    I am new to SqlLite , i need to fetch the details from the
    db file and i need to update every time . when the user click the
    update file . can any one help me hw to solve this issue
    ~~
    Sk

    Anything is possible. You might want to ask if it's a good idea, but look at some of the people who have asked before. It looks like there are products out there to help.
    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aocx&col=javaforums&x=19&y=13

  • Workers in AIR Application

    What is the workflow for creating and using workers in an AIR application? I can't import "flash.system.MessageChannel" nor "flash.system.Worker". The Worker class, used to create the messageChannels (e.g. Worker.current.createMessageChannel(worker))) is also not usable.
    Is this even possible at the moment? I created a new Flex project and selected SDK 4.6.
    Alternatively, I can create an Actionscript Project where I can import all the files mentioned above. I was attempting to load the swfs generated dynamically but shortly found out that the start2() method of the PrintJob class cannot be imported in an ActionScript project - which is what I want to use the worker for.
    Any ideas/help is greatly appreciated.
    Thanks,
    Victor

    Since you know the SWFs are safe, you can load them with the URLLoader class as a ByteArray object and then use Loader.loadBytes() to inject them into the AIR app. To do this, you must pass a LoaderContext with allowLoadBytesCodeExecution=true.Note that older versions of Flex had difficulty with this technique, but I believe they have been resolved. I've asked the engineers for clarification on the Flex support issue, but in the meantime, here are some links that might help:
    http://blog.esofthead.com/loading-modules-in-air-application-2/
    http://flair-flash-flex-air.blogspot.com/2009/09/framework-for-modular-air-applications.ht ml
    http://opensource.adobe.com/wiki/display/flexsdk/Marshall+Plan

  • Install Adobe Air application (.air file) from command line in Mac OS X

    Hello everybody
    I would like to install an air application on many systems (Mac OS X) using remote install. Is there a way to achieve this?
    Is there a pure command line utility to install Adobe AIR applications (.air files) in Mac OS X?
    Thanks. Masteradi

    Thanks for your reply. I already knew that command but it's good to see it again.
    In the meantime I have found a tool called ARH (AIR Redistribution Helper) which can be used to install an air application, uninstall an air application, etc.
    Now I would like to create a .pkg file (for Mac OS X) that will use ARH together with my .air file and that will install or update (uninstall/install) the application. But I guess this is no more an issue for Adobe AIR. I have to learn the tools specific for Mac (Iceberg, Xcode).
    Best regards
    Masteradi

  • Air application trace

    Hi,
    When i run my air application i am not able to get the trace output. I tryed "whistler","Vizzy".Still no use.
    And the Air application didnt update the "Application Data\Macromedia\Flash Player\Logs\flashlog.txt"
    How to get the Air application trace outputs.

    How are you starting your application up?  Are you using ADL?
    Chris

  • How have a free thawte key for my Air application

    I want sign my air apps.how to do it??

    Hi,
    could you please clearify what you mean when you say "I want sign my air apps.how to do it??"
    what do you mean sign... are u trying to create signature for a certificate during pakaging of your application?
    if thats the case it depends on the type of framework you are using to compile your air application . Are you using Flex, Flash or Ajax to develop an AIR app?.
    or do you want to publish your application onto the adobe air market place?
    if thats the case you need to register as a publisher and add an offering.
    if its none of the above then i might have misunderstood what you are requesting...
    surf

  • Right way to code an AIR application that uses sqllite database

    I am developing an AIR application that uses sqllite database.I want to know the correct way in which I should create the connections and SQLstatements according to MVC pattern.For example,whether i should have a single SQLStatement object for all my sql operations or I should use separate objects for insert,delete,select etc.I know how to open connection,execute statements and all,but i want to know the professional way of writing it.

    Make a controller for connect to db and save the connection in global varible (in model). Use this connection variable whenever u wanna execute the sql statements. Create seperate dao's for each table. Queries should be executed under the daos. You can call the method under the dao for execute the query from controller and show the result in view.

  • Unable to send file in binary mode to ftp server using AIR application

    Hi,  Can any one help me. i am trying to send local files to ftp server  in binary mode from AIR application using sockets.
    I cant use PASV mode for this FTP server because security restrictions. when i am trying to send Binary command i am always getting
    error code 500 which is unrecognized command. I googled for solutions but i cant find any one using Binary mode to send data every example is using PASV mode to send
    file.
    code example:
    private function upload():void{
    sendCommand("binary ");
    private function sendCommand(arg:String):void {
                                            arg +="\n";
                                            s.writeUTFBytes(arg);
                                            s.flush();
    in response i am getting unrecognized command.

    I'm successfully using an ftp example from http://http://projects.maliboo.pl/FlexFTP/
    that I converted to spark and uses a popup progress window.
    If you don't need to use sockets I can post a sample project.
    I believe I still connect with PASV, but have no problems sending Binary files.
    I don't think they're commands that are dependent on each other

  • Adobe Air application installation using the bundled runtime installer

    Hello.
    We plan to develop application for different platforms with Adobe Air and testing installing Air applications with bundled runtime installer on different platforms. It's ok with Windows and Mac OS, but we got troubles with "silent" installation on Ubuntu OS 9.10.
    I tried to install Adobe Air application with bundled runtime, like in this document in part "Silent installation":
    http://help.adobe.com/en_US/air/redist/WS485a42d56cd19641-70d979a8124ef20a34b-8000.html
    using command-line:
    "sudo ./MyInstaller -silent simple-air-air-application-1.0-SNAPSHOT.air"
    and installation fails. Installation log looks like this:
    [setup:2306][INFO] Runtime Installer begin with version 2.6.0.19140 on Linux x86
    [setup:2306][INFO] Commandline is: -silent simple-air-air-1.0-SNAPSHOT.air
    [setup:2306][INFO] No installed runtime detected
    [setup:2306][INFO] Invoking Application Installer for combined install
    [setup:2306][INFO] Launching subprocess with commandline /tmp/air.QMrLZl/build/opt/Adobe AIR/Versions/1.0/Adobe AIR Application Installer -runtime /tmp/air.QMrLZl/build/opt -silent -withRuntime -url file:///tmp/air.QMrLZl/simple-air-air-1.0-SNAPSHOT.air
    [setup:2306][ERR] Subprocess app installer failed (-1)
    [setup:2306][ERR] Runtime Installer end with exit code 7
    P.S. We tried do the same on Linux Mint 10. Everything's fine, application getting installed well.

    Thanks for the reply and solution MrSykes.
    I uninstalled adobe AIR and ran a file and registry cleaner to delete any left over files and installs.
    Then installed the v.15 Adobe AIR beta as recommended.
    The cleaners I used (ccleaner & jv16 power tools) did find some temporary install files and remnants of the Video Alchemy install.
    Tried the install again and still no installation window displays.
    I'm running Windows 7 on my PC and even changed the installation file compatibility to Windows XP service pack 2 to no avail.
    Funny that it installed fine on my notebook with Adobe AIR latest version running Windows 7.
    I'm watching task manager as I'm attempting the install and videoalchemy.exe has some cpu usage then drops to zero activity.
    Then Adobe AIR application Installer starts up then cycles to zero cpu activity.
    I'm stumped on this one :-(
    Thanks again for investing the time on my behalf.
    Regards
    Stephen

  • AIR runtime and AIR applications built using Captive Runtime still need Admin Privilege to Install

    I am working on a small project to install AIR application(native .exe & .dmg) with AIR runtime without needing the Administrator privilege so I used Captive runtime but the installation is still asking for admin privilege
    I bundled AIR application with AIR runtime using Captive runtime from flash builder 4.6, then I packaged this into a .MSI using Advanced Installer. Now when I install it for a user without admin privilege it prompts me for Admin credentials.
    Can you please tell me if
    1. I need AIR distribution license to install AIR runtime without Admin privilege
    2. Do I need a different installer
    3. Am I missing any step here
    Thank you

    If you're installing to a location where Windows requires elevated privileges, like Program Files, you'll need to have admin privileges to continue.  Are you using an AIR based native installer or have you taken the application with the captive runtime and rolled this up in your own installer?
    Here's a section from the Installation and deployment options in Adobe AIR 3 article that might help:
    Installation privileges
    When designing an installer, one has the option to choose from approaches that may or may not require administrative privilege. For example, a drag-and-drop install on Mac OS X requires no special privilege; users can always copy the application into their own application folders, for which they have the necessary permissions. On the other hand, if registry keys must be written to the machine-specific portion of the registry on Windows, installation of that application will require administrative privilege to do so.
    The two installer formats directly supported by AIR, AIR files and native installers, have always required administrative privilege. This was a design decision made in part to simplify the implementation of the AIR installers: If administrative privilege is assumed to be available, implementation is possible if the registry can be written to, and so on. It was also selected because, in many enterprises, this is the desired behavior: administrators can use the privilege requirement to gate software installation.
    All the same, there are scenarios where supporting installation without requiring administrative privileges is desirable, or even necessary. This can now be achieved using custom installers; you simply need to author an installer that operates correctly with only standard user privilege. In practice this can be easy to achieve; a simple install-by-copy to a writable location (that is, in the user's own folder) will suffice. Should you author a more complex installer, you should keep in mind that the addition of certain operations during the install process will in turn reintroduce the requirement for administrative privileges.

  • Using project libraries for both web-based and AIR applications

    I need to develop substantial code to build both web-based and AIR applications.  Yes, they will have different features, especially when it comes to accessing files on the local file system.
    However, 98% of the code can be shared.
    I want to use a project library that can be used for both types of applications. Maybe using conditional compile when required to not use AIR API's in a web-based application.
    I found this (somewhat old) warning:
    Include Adobe AIR libraries Select this option if your library must use AIR features, such as access to the AIR APIs. Flex Builder then changes the library path of this new Flex Library project so that it includes airglobal.swc and airframework.swc. Web-based Flex projects cannot use this library.
    Do not select this option if you are writing a generic library intended to be used only in a web-based Flex application, or in either a web-based or AIR-based application.
    Does this apply to Flash Builder 4.5?

    I have found a workaround, but it's quite clumsy, involving a transfer vector (in old-fashioned terms) in the main application for each function in the AIR library.
    I have created a library for AIR classes only (fourdtext.fileOperations is there). 
    The AIR application provides "Function" values that any other code in the general-purpose libraries can use.
    It works, but it's nasty.
    In Main.mxml:
    import com.fourdtext.fileOperations.AxFiles;
    // this gets a list of native path strings, from and array of "File" objects
    public var AxGetListFunction:Function = AxGetListRedirect;
    private function AxGetListRedirect(list:Array):Vector.<String>{
        return AxFiles.AxGetList(list);
    In general-purpose code:
    var list:Array = event.dragSource.dataForFormat("air:file list") as Array;
    var AxGetList:Function = FlexGlobals.topLevelApplication.AxGetListFunction;
    listFiles = AxGetList(list);

  • How to create a popup window to load HTML page in AIR application without using any mx or spark?

    How to create a popup window to load HTML page in AIR application without using any mx or spark components?
    I need to load the HTML page in popup in AIR application without using any of the <mx> or <spark> components. I need to open in the application itself not in the browser.(If we use navigateToURL() it will open in th browser)

    Can we achieve this? can somebody help me on this scenario..

  • Use the system lang of AIR applications auto update.

    Hello,
    I recently used the auto update framework for my AIR application, this works fine but i have a small problem.
    I made some reasearches and i found AIR uses the system lang by default. When i install my package for the first time, the lang is my sytem lang but when i find a new update after running auto update of my app, the AIR updater window doesn't use my sytem lang, which is french, but uses english lang. I'd like to put this window in french.
    Thanks.

    Try loading and using the add-on from this link: https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    Many add-ons do in fact work if you force them to run. The procedure to roll-back is given in this article: [[installing previous versions of firefox]]
    Unfortunately the official Firefox policy is that you downgrade to 3.6 which is supported for a while longer, and not the now unsupported Firefox 4. If after installing and running the ''add-on compatibility reporter'' you still have problems there are ways around the official policy.
    I think it is absurd that Firefox 4 may be used by tens of millions of users one day and a few days later those that upgrade to Firefox 5 should be not only told not to use a now unsupported browser, if they need to revert due to problems, but are actually obstructed in attempts to do so. See also [/questions/840397#answer-205154]

Maybe you are looking for