Eval() error using Scriptaculous w/ AIR

Adobe AIR discussion pertaining to installing and configuring the Aptana Support and integrating the SDK and runtime.

Moderator: Aptana Staff

Eval() error using Scriptaculous w/ AIR

Postby james.garriss » Fri May 02, 2008 2:43 pm

I wrote a web app that uses Scriptaculous for drag and drap lists. I converted the app to AIR using aptana. But when I drag and drop, I get this error:

Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)
at app:/lib/scriptaculous/effects.js : 254
at app:/lib/scriptaculous/effects.js : 360

When I look at these lines, they do indeed use the eval() function. A little snooping reveals this page:

http://livedocs.adobe.com/air/1/devapps ... ity_3.html

which lets me know AIR puts restrictions on eval(). So what does that mean? Does it mean I can't fully use Scriptaculous in an AIR app? Or are there ways around these restrictions?

Appreciate your help.
james.garriss
 
Posts: 2
Joined: Fri May 02, 2008 2:31 pm
Location: Wake Forest NC

Postby emarc » Tue May 06, 2008 8:13 am

AFAIK, you can not use eval() after the application has inited, which will cause problems for what you're doing.

Some javascript libraries have been made 'AIR compatible', for instance jQuery 1.2.3 - apparently this means they do not use eval(). I have not checked the current status, but at least jQuery, Ext JS, Dojo, and Spry should be AIR compatible. Apparently there is no AIR compatible scriptaculous - the last comment I've read states that there are no plans to make prototype AIR compatible.

Best Regards,
Marc
User avatar
emarc
 
Posts: 7
Joined: Tue Apr 22, 2008 9:12 pm

Postby jkls » Thu Jul 24, 2008 10:58 pm

It seems Scriptaculous was just patched to support Adobe AIR.
AFAIK Prototype has always supported AIR.

The ticket explains explains the issue a bit more and also explains how Prototype supports AIR.
http://prototype.lighthouseapp.com/proj ... icket-20-5

Cheers.
jkls
 
Posts: 1
Joined: Thu Jul 24, 2008 10:52 pm


Return to Adobe AIR