Air:--> Execute String as a Code

16 views
Skip to first unread message

shridhar kulkarni

unread,
Dec 20, 2012, 8:07:33 AM12/20/12
to flex_...@googlegroups.com
Hi,

I am currenlty working on Air.

I need some help from you guys.

I am having one string variable in which I stored code as a String
For Example
 var s:String =    " Alert.Show("Hello")";
 function printData(s:String):void
{
   ??
}


When I call  'printData ' function ,
I want to execute the code which has given in string variable. i.e for here I want to show AlertBox.

As in PHP/Python there is Eval functionality which executes a code given in a string.

Can this is possible in Air?????

Please Help me

Thanks in advance...!!!
Shridhar




Abinash

unread,
Dec 22, 2012, 8:34:22 AM12/22/12
to flex_...@googlegroups.com

Hi Shridhar,

I hope this library solves your issue! I have not worked on this library, but looks like this can work in your case.

Thanks,
Abinash

shridhar kulkarni

unread,
Dec 31, 2012, 7:50:12 AM12/31/12
to flex_...@googlegroups.com
Hi,

Thanks for the reply.
 I checked the issue with this link. but its not executing the code in string. it just convert string to int and etc.
 I just want to execute the code which is written in a string.

Thanks 
Shridhar
Reply all
Reply to author
Forward
0 new messages