View Full Version : TabPanel + AIR
dekart
12 Mar 2008, 4:52 AM
Hi,
I'm trying to add a new panel to previously created TabPanel, but when i try to activate new tab, i receive the following error:
Adobe AIR runtime security violation for Javascript code in the application security sandbox (eval)
at app://ext-2.0.2/ext-all-debug.js : 6962
Is there any way to fix this?
mcanthon
7 Jun 2008, 4:45 PM
I've just run into this same problem. Can't seem to get tab switching to work at all in AIR.
I created a new AIR project (using Aptana) and copied in the basic tabs example from the Ext source.
I've traced the problem to an eval function in line 859 of ext-all-debug.js (latest 2.1).
I added a call to air.trace to dump out the string being eval'd and this is the result...
var f = function(root){
var mode; ++batch; var n = root || document;
n = getNodes(n, mode, "span");n = byClassName(n, null, " x-tab-strip-text ");return nodup(n);
}
var f = function(root){
var mode; ++batch; var n = root || document;
n = byTag(n, "li");return nodup(n);
}
Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)
The first time it passes through that line is when the page is rendered, the second time is when I click on an unrendered tab.
Reading up on the security model in AIR indicates that eval is allowed for parsing pure JSON objects and before the onLoad event is triggered so anything that uses eval after the onLoad for generating functions on the fly is going to fail.
Is there any work-around for this at this time?
Cheers,
Michael
devnull
9 Jun 2008, 8:10 AM
you might have better luck with this in the air forum...
the workaround is to use a hidden iframe with functions available via the sandbox bridge that can run the evals. I have been slowly trying to work out a way to do this, but its pretty slow going.
mcanthon
10 Jun 2008, 2:17 AM
Erm... ok, most of that went over my head. :">
For now I'll redesign my app not to use tabs. Thanks for the reply
RobSmith
10 Jun 2008, 2:42 AM
In my application adding and activating a panel to a tabpanel is no problem at all. So this is not a general error. You might provide some code snippets to track the problem.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.