PDA

View Full Version : Ext Core w/Air


travispaxton
04-06-2009, 02:39 PM
I was attempting to use Ext Core with Adobe Air and didn't think it would be a problem since Ext Core checks for the existence of Air. I did run into a JavaScript eval violation however. When I included the ext-air.js file from Ext 2.2.1, I received a couple errors regarding functions not available in Ext Core, but present in Ext 2.2.1. Will there be an ext-air.js specifically for Ext Core?

aconran
04-06-2009, 04:52 PM
We will certainly put this on the list of things to look at. Any places where we are dynamically eval'ng code or generating Functions will have to be re-written in an AIR safe way. What errors did you run into?

travispaxton
04-06-2009, 05:01 PM
I managed to get a very simple example working. In order to do that, I included the ext-air.js with everything below line 729 removed.

Ext.query = Ext.DomQuery.select;

// Remove everything below this

Date.precompileFormats = function(s){
var formats = s.split('|');
for(var i = 0, len = formats.length;i < len;i++){
Date.createNewFormat(formats[i]);
Date.createParser(formats[i]);
}
}

The initial problem had to do with the Date API reference in 2.2.1. After I removed those, I ran into unknown error that I couldn't pinpoint using the Air Introspector, so I went ahead and removed all of the Ext.air references. After that, things seemed to run okay.