from an earlier post about this topic:
You need to roll it on your own. You could split the given path into
its parts and try to evaluate one piece after the other until you come
to the end.
public function eval( scope : Object, path : String ) : Object
{
if( path == null ) return null;
var result : Object = scope;
var parts : Array = path.split('.');
while( result != null && parts.length > 0 )
{
var part : String = parts.shift();
result = result[ part ];
}
return result;
}
Untested code, but hopefully you get the point. Maybe you need to add
some exception handling, when you try to access non existing
properties.
Cheers,
Ralf,
pdflibpilot wrote:
>
> According to the documentation "eval()" has been removed as function -
> is there an alternative ? I really would like to use this function.
>
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/