1. #1
    Ext JS Premium Member
    Join Date
    Feb 2009
    Location
    Birmingham, AL
    Posts
    88
    Vote Rating
    1
    re_buchanan is on a distinguished road

      0  

    Default Having trouble getting started with Air

    Having trouble getting started with Air


    I've just start playing around with Air, so please bare with me. I have a fairly large application that already runs pretty well on the browser (better on some browsers than others.)

    In my first pass at making it run in Air, I've created an Air application that contains nothing more than an iframe that loads my application.

    Without modifying my (ExtJS 3.0) application at all, it runs remarkably well (the only real problem is a custom combobox that contains a tree.) When I say 'without modification', I mean I have not even added the ext-air.js or ext-air.css.

    I have looked at several tutorials, but I still have some fairly basic (perhaps even stupid) questions:
    1. Is this "my entire app loads from the web server in an iframe" a completely insane model? (I know that I'd be missing out on some of the big benefits of Air, but my main goal for working with Air is to have a modern, high-performance "browser" that our software support group is capable of managing - this is for an enterprise environment and they have pretty much ruled out anything other than IE)
    2. If #1 is ok, is the ext-air.js and ext-air.css necessary in this model, or is it just for when you have bits of ExtJS running "locally" (i.e. in the Air application sandbox)
    3. If I add ext-air.js and ext-air.css (built from the latest on the SVN) to the "remote" code (the bit that gets loaded from the server), the "air" variable is not defined (adding AIRAliases.js to the remote code doesn't help because "window.runtime" is not defined) - is this due to a defect somewhere or is this due to conceptual confusion on my part?

    Thanks,

    Ron Buchanan

  2. #2
    Sencha User scipio's Avatar
    Join Date
    Nov 2007
    Posts
    38
    Vote Rating
    0
    scipio is on a distinguished road

      0  

    Default


    Hi Ron,

    1) Running the app completely within an iframe isn't insane, but you lose some of the best attributes of AIR, like access to the local file system or the local SQLite database. You can still use the AIR runtime using sandbox bridge functions, but they are a pain to use because they neuter the data that you send through them.

    Also, in my experience, memory management in the non-app sandbox is lousy. I don't think security is a problem, because the non-application sandbox doesn't have direct access to the air runtime.

    2) The ext-air.js file is not necessary for you because the ext-air.js file is primarily concerned with avoiding any use of JavaScript's eval() function after the dominitialized event in the application sandbox. Since you are running the app in the non-app sandbox, you dont' need to worry about this, because eval() is allowed after the onload event in the non-app sandbox. There are other methods in the file relating to nativeWIndows, and SQLite stores, but you won't be using these so you don't need it.

    The ext-air.css file is also not necessary. However, it changes a few annoying things so you won't have to. FOr example, you can't create the splitbar cursor in AIR, so the stylesheet changes it to the 'move' cursor. It has some other safari fixes, but you can get by without it.

    3) 'air' is the object that contains the AIR runtime methods and properties. In the application sandbox, the air runtime is added to the window object and is accessible by local javascript. However, in the non-app sandbox (i.e. -> you) it cannot be accessed. Thus, if you include ext-air.js, it will attempt to use the AIR runtime, it cannot, and throw an error. Don't add it to the remote code, (i.e. the non-app sandbox).

    Hope this helps.

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2009
    Location
    Birmingham, AL
    Posts
    88
    Vote Rating
    1
    re_buchanan is on a distinguished road

      0  

    Default


    Thanks scipio, that was very helpful

  4. #4
    Sencha User khebs@live.com's Avatar
    Join Date
    Mar 2008
    Posts
    83
    Vote Rating
    0
    khebs@live.com is on a distinguished road

      0  

    Default Hello

    Hello


    Hi re_buchanan, try this one iv been playing around for a while..

    http://dl.dropbox.com/u/2342057/AirModular.zip

  5. #5
    Sencha User
    Join Date
    Dec 2008
    Posts
    105
    Vote Rating
    0
    piroman is on a distinguished road

      0  

    Default


    can you repost please the zip file is offline now

    i curious about the modular structure of the project

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi