I downloaded an ActionScript 3.0 package and used it in a flex project.
It gave me some compiler warnings: Duplicate variable definition.
On closer inspection this was the code that gave the problem
switch (somevariable) {
case "g"
var nHours:Number = somevalue;
...
case ...
case "x"
var nHours:Number = somevalue;
The warning was about the variable nHours. In this particular package,
this was not an isolated incident, there were many more similar examples.
I personally would not code it this way, but would declare the
variable outside of the switch, then set depending on the case value.
What do other people do. Is there a way to switch off these compiler
warnings in Flex Builder?
Andrew
--
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/