Results 1 to 7 of 7

Thread: Gxt with Adobe AIR

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
      0  

    Default Gxt with Adobe AIR

    I am trying to use Ext GWT with Adobe AIR. My application is Desktop based and runs fine in hosted mode or in a browser; when run inside AIR (using adl) I get the following error:

    Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox.

    I understand this is a result of security restrictions implemented by Adobe which, for applications running in the application sandbox, restrict the use of eval(). I traced down the offending line of code to line 1380 of com.extjs.gui.ui.client.core.Ext (version 1.2 source): eval(fn.join(""))

    ExtJS seems to work fine in AIR - what do I need to do to get Ext GWT to play nice?

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    ExtJS only works fine with the air adapter (and this adapter is overriding some methods to work with air).

    So if you want that to work, you have to override the GXT sources.

    Or run your code in another sandbox where calls to "eval" are allowed.

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Ahh, ok, I found it. You don't already have an equivalent for the Gxt codebase by any chance? No. I'll get my hands dirty then.

    Just out of interest, if this adapter makes it work in AIR, why isn't this "non-eval" code used instead of the eval() method - is it much less efficient?

    An alternative sandbox is not an option - I want to use the AIR API's when the application is run in AIR.

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    What i am talking here. Just add another class (for example GXTAirAdapter) which sets some overrides from the ext-air-adapter file. Take a look to the Ext class how you can write normal javascript.

    As this is mostly a simple copy and paste of the needed methods, it shouldnt be too hard


    EDIT

    It can be possible that not all methods can be overriden this way. You might find methods which have to be overriden directly

  5. #5
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
      0  

    Default

    ...you may also wish to look at this project getting GWT and AIR working. Ext GWT is really just a GWT application so this should be all you need to do.

    http://code.google.com/p/gwt-in-the-air/

  6. #6
    Ext User
    Join Date
    Apr 2008
    Location
    Lincoln, NE
    Posts
    235
    Vote Rating
    0
      0  

    Default

    murd,

    Have you had any success getting GXT to run on Air?

    Thanks,

    JP

  7. #7
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    339
    Vote Rating
    99
      0  

    Default GXT and Adobe Air

    Hello people,

    can anyone please tell me how i can make a gxt application work inside the air runtime ?
    thx and greets

    Ekambos

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •