You are commenting out the line that demonstrates the bug.

- Gordon

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Abdul Qabiz
Sent: Friday, June 24, 2005 1:15 PM
To: flexcoders@yahoogroups.com
Cc: Gary Grossman
Subject: RE: [flexcoders] Re: why are getter methods called twice when
invoked using bracket notation?

Hi,

If I comment following line in hello getter, it doesn't reproduce:

mx.controls.Alert.show("This should show once. (count: " +
getNextCount() + ")");


-abdul

 

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Saturday, June 25, 2005 1:33 AM
To: flexcoders@yahoogroups.com
Cc: Gary Grossman
Subject: RE: [flexcoders] Re: why are getter methods called twice when
invoked using bracket notation?

Yow! I repro'd it. It's the first time I've heard of this bug.

The current version of player 7 on www.macromedia.com, 7.0.19, doesn't
appear to have this problem.

- Gordon


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of martyfc
Sent: Friday, June 24, 2005 12:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: why are getter methods called twice when
invoked using bracket notation?

version 7,0,35,29

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
> I'm having a problem reproducing this. What version of the Flash 
player
> are you running?
> 
> - Gordon
> 
> -----Original Message-----
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of martyfc
> Sent: Friday, June 24, 2005 11:57 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] why are getter methods called twice when 
invoked
> using bracket notation?
> 
> does anyone know why getter methods are invoked twice when called 
> using
> bracket notation?  i've created a simple mxml test and observed 
the 
> following:
>  - when the button "Test Dot Notation" is clicked there are two 
> popups; one which says "Returned object: hello" and another that
> says "This should show once. (count: x)"
>  - when the button "Test Bracket Notation" is clicked there are 
> _three_ popups; one which says "Returned object: hello", another 
> that says "This should show once. (count: x)", and the third which 
> says "This should show once. (count: x+1)".
> 
> i would expect the "Bracket Notation" button to produce just two 
> popups, similar to what the "Dot Notation" button does.
> 
> thanks,
> marty
> 
> ----- start mxml -----
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
>   <mx:Script>      
>       var counter:Number = 0;
> 
>       function testDotNotation()
>       { 
>           mx.controls.Alert.show("Returned object: " + 
this.hello );
>       }
>       
>       function testBracketNotation()
>       {
>           mx.controls.Alert.show("Returned object: " + this
> ["hello"] );
>       }
>       
>       function get hello():String
>       {
>           mx.controls.Alert.show("This should show once. (count: " 
+ 
> getNextCount() + ")");
>           return "hello";
>       }
>             
>       function getNextCount():Number
>       {
>           return counter++;
>       }      
>   </mx:Script>
>       
>   <mx:Canvas width="550" height="400">
>     <mx:VBox>
>       <mx:Button label="Test Dot Notation " click="testDotNotation
> ()"/>
>       <mx:Button label="Test Bracket Notation " 
> click="testBracketNotation()"/>
>     </mx:VBox>
>   </mx:Canvas>  
> </mx:Application>
> -----  end  mxml -----
> 
> 
> 
> 
> --
> 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





--
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



 




--
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



 




--
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



 




--
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/

<*> 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/
 


Reply via email to