i confirm, i logged this on the open bug list and sent them a code sample.
my temp hack
(and this is because i do not need a getter) is this:
override flash_proxy  function getProperty(name:*):* {
               var p:*  = function():*
             {
                 callProperty(name,arguments);
             }
             return p;
        }

On 9/26/07, Derek Vadneau <[EMAIL PROTECTED]> wrote:
>
>   There seems to be a bug in flash.utils.Proxy. Here's some sample code:
>
> var mp:MyProxy = new MyProxy();
>
> mp.myVar = 'something'; // calls flash_proxy setProperty as expected
>
> mp['myVar'] = 'something'; // calls flash_proxy setProperty as expected
>
> mp.go(); // calls flash_proxy callProperty as expected
>
> mp['go'](); // calls flash_proxy getProperty - NOT expected
>
> Why is getProperty called where the [] operator is used instead of the
> . operator in the case where a function is being called, but not when
> setting a property?
>
> And in that case you MUST return a function or a runtime error will be
> thrown.
>
> This is unexpected behaviour, as far as I can see.
>
> Another example:
>
> mp.obj.go();
>
> mp['obj']['go'](); // getProperty is called twice, callProperty is NOT
> called at all
>
> The issue is that I am dealing with a dynamic API, so I don't always
> know that 'obj' or 'go' is a property vs. a method.
>
> But, because the getProperty is called when a callProperty should be
> called I am passing an instance of my Proxy class and a runtime error
> is thrown.
>
> --
>
> Derek Vadneau
>  
>



-- 
j:pn
\\no comment

Reply via email to