On 5/4/06, Ben Stucki <[EMAIL PROTECTED]> wrote:

> I'm looking for some feedback and help on my audio visualization component. Specifically, I'd like to know the best way to handle color and alpha properties from both nonInherited and style rules. Any suggestions for better property/component naming and general tips to improve performance (perhaps all the looped var declarations should be declared in the class scope)?

> http://blog.benstucki.net/?id=18

Comments:

1.  Unless you want to be able to add children in MXML, use
percent-sizes (width="x%") and contraints-based layout, there's no
need to extend Canvas. You could just extend UIComponent directly.

2.  Children should be created and added in 'createChildren' rather
than the constructor.

3.  The call to the superclass constructor is redundant (thanks to
Mr. Bruce Eckel for pointing this one out :) )

4.  Use 'getStyle' to fetch the value of a style. You should never
have to access the 'nonInheritingStyles' variable directly.

5.  There's no need for a 'lineColor' property. You can directly set
the 'lineColor' style; you can also bind to it in MXML.

6.  I don't think you'd gain much by declaring variables at the class level.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to