Manish,

Thanks for the awesome help. The main thing I was trying to gain from extending the Canvas was the borders and background control. I was going to extend directly off of UIComponent and let the user surround it in whatever container they wanted, but I thought this might save them the trouble. Is it costing significantly more in load time to extend off of Canvas? Also, thanks for all the time you spend on this list.

 

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
Sent: Thursday, May 04, 2006 7:18 AM
To: [email protected]
Subject: Re: [flexcoders] Audio Visualization Component Help

 

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