RE: [flexcoders] Extending visual custom components

2006-05-10 Thread Chris Reynolds





Chapter 2 of the Creating and Extending Flex Components 
followed by Chapter 7 perhaps?


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of mahuika1Sent: 
Thursday, May 04, 2006 9:57 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Extending visual 
custom components
I would like to create a custom component that displays 
visualcontrols such as labels etc then extend that to display other 
controlsbeneath the previous ones.  Does any one know how I can do this 
orshould I just have many small components and reuse them in 
othercomponents?  For example..I want to: create a Doc 
component which contains header and footerdetails.  Then create DocA 
component which extends Doc to also displaytext between the header and 
footer. Or: create Header and Footer components. Then create DocA which 
usesHeader and Footer and displays text.Silly example but ideally I 
would like to extend the component which Ican't seem to 
do.





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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Extending visual custom components

2006-05-04 Thread Manish Jethani



On 5/4/06, mahuika1 <[EMAIL PROTECTED]> wrote:
> I would like to create a custom component that displays visual
> controls such as labels etc then extend that to display other controls
> beneath the previous ones.  Does any one know how I can do this or
> should I just have many small components and reuse them in other
> components?  For example..
>
> I want to: create a Doc component which contains header and footer
> details.  Then create DocA component which extends Doc to also display
> text between the header and footer.

See Peter Ent's blog entry on how to create "templates"

http://weblogs.macromedia.com/pent/archives/2006/03/component_templ.cfm

> Or: create Header and Footer components. Then create DocA which uses
> Header and Footer and displays text.

I would do it this way.

I'm assuming you're talking about MXML components. If you're writing
your component in ActionScript, then you can do pretty much anything.
Just override 'measure' and 'updateDisplayList' and change the size
and layout of the "DocA" component accordingly.






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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.