Like it!

On 5/10/13 11:45 PM, "Justin Mclean" <jus...@classsoftware.com> wrote:

> Hi,
> 
>> Like I said, probably not worth your time.  The overhead of proxy is known
>> to be pretty high.
> 
> Looking at the code I'm not even sure what the try catch is in there as there
> nothing that can throw an exception.
> 
> It probably could be simplified to (it may even be faster).
> 
>     override flash_proxy function getProperty(name:*):*
>     {
>         if (name is QName)
>             name = name.localName;
> 
>         var n:Number = parseInt(String(name));
> 
> if (isNaN(n))
>         {
>             message = resourceManager.getString(
>                 "collections", "unknownProperty", [ name ]);
>             throw new Error(message);
>         }
>         else
>         {
>    // If caller passed in a number such as 5.5, it will be floored.
>             return getItemAt(int(n));
>         }
>     }
> 
> getItemAt with throw correct exception if n < 0
> 
> Justin

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to