<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments on: Flex Object Composition Car Example</title> <atom:link href="http://renaun.com/blog/2006/07/flex-object-composition-car-example/feed/" rel="self" type="application/rss+xml" /><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/</link> <description>My ideas on the web and mobile application/game technologies</description> <lastBuildDate>Sat, 27 Jun 2015 02:02:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>By: Renaun Erickson</title><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/#comment-2391</link> <dc:creator>Renaun Erickson</dc:creator> <pubDate>Fri, 14 Jul 2006 06:34:03 +0000</pubDate> <guid isPermaLink="false">http://renaun.com/blog/?p=64#comment-2391</guid> <description><![CDATA[&lt;strong&gt;Updates to Car Example (Interface and ASDoc Comments)&lt;/strong&gt;The Flex object composition car example I recently created got some updates.  I changed CompositionBase into a interface instead inheriting the class (thx Marcus for the heads up on that one).  I also went through all the code and...]]></description> <content:encoded><![CDATA[<p><strong>Updates to Car Example (Interface and ASDoc Comments)</strong></p><p> The Flex object composition car example I recently created got some updates.  I changed CompositionBase into a interface instead inheriting the class (thx Marcus for the heads up on that one).  I also went through all the code and</p><p>&#8230;</p> ]]></content:encoded> </item> <item><title>By: Marcus</title><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/#comment-2384</link> <dc:creator>Marcus</dc:creator> <pubDate>Fri, 14 Jul 2006 02:09:19 +0000</pubDate> <guid isPermaLink="false">http://renaun.com/blog/?p=64#comment-2384</guid> <description><![CDATA[First, thanks for putting the time into creating all these examples.This is just an idea I had while looking through the source code. All your car parts extend from the &#039;CompositionBase&#039; class to ensure that the &#039;ptrCar&#039; property is available to be set from the &#039;Car&#039; class by its childrenCreated() method. In this example, that&#039;s cool and works fine, but I&#039;d suggest you create an &#039;CompositionBase&#039; Interface that all your car parts can implement, rather than the &#039;CompositionBase&#039; Class they extend.  (AS3 allows you to define getters and setters on Interfaces now.) That way you still know all the car parts implement the &#039;ptrCar&#039; thingy and they have the freedom to extend from other more relevant classes. eg. Headlight.as, Blinker.as, InteriorLight.as, GloveBoxLight.as can all extend from a basic Light.as Class to get its on/off functionality as well as implement &#039;CompositionBase&#039; so we know they all belong to our car. Keep up the good work.]]></description> <content:encoded><![CDATA[<p>First, thanks for putting the time into creating all these examples.</p><p>This is just an idea I had while looking through the source code.<br /> All your car parts extend from the &#8216;CompositionBase&#8217; class to ensure that the &#8216;ptrCar&#8217; property is available to be set from the &#8216;Car&#8217; class by its childrenCreated() method. In this example, that&#8217;s cool and works fine, but I&#8217;d suggest you create an &#8216;CompositionBase&#8217; Interface that all your car parts can implement, rather than the &#8216;CompositionBase&#8217; Class they extend.  (AS3 allows you to define getters and setters on Interfaces now.) That way you still know all the car parts implement the &#8216;ptrCar&#8217; thingy and they have the freedom to extend from other more relevant classes. eg. Headlight.as, Blinker.as, InteriorLight.as, GloveBoxLight.as can all extend from a basic Light.as Class to get its on/off functionality as well as implement &#8216;CompositionBase&#8217; so we know they all belong to our car.<br /> Keep up the good work.</p> ]]></content:encoded> </item> <item><title>By: Renaun Erickson</title><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/#comment-2371</link> <dc:creator>Renaun Erickson</dc:creator> <pubDate>Thu, 13 Jul 2006 15:18:47 +0000</pubDate> <guid isPermaLink="false">http://renaun.com/blog/?p=64#comment-2371</guid> <description><![CDATA[Mostly because I read Ely Greenfield&#039;s pdf on &quot;Building A Flex Component&quot;.http://www.onflex.org/ACDS/BuildingAFlexComponent.pdfHe states the life cycle of the component (page 8) is as such: Constructor createChildren() commitProperties() measure() updateDisplayList() CustomEventsI am a little new to all this also, so my thinking is that creationComplete event&#039;s definition is this&quot;Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing.&quot;This puts the creationComplete event in at the tail end of the component lifecycle.  Now for childrenCreated()&#039;s definition:&quot;Performs any final processing after child objects are created.&quot;Now I should do some real tests but it makes sense to do your initializing of pointers etc... right after the children are created (either createChildren() as in Ely&#039;s slide or childrenCreated()) so that the initialized code can be used in the rest of the Child&#039;s lifecycle, (commitProperties(), measure(), updateDisplayList(), Custom events)Both methods will work its a matter of the lifecycle of the component and what you want to accomplish.]]></description> <content:encoded><![CDATA[<p>Mostly because I read Ely Greenfield&#8217;s pdf on &#8220;Building A Flex Component&#8221;.</p><p><a href="http://www.onflex.org/ACDS/BuildingAFlexComponent.pdf" rel="nofollow">http://www.onflex.org/ACDS/BuildingAFlexComponent.pdf</a></p><p>He states the life cycle of the component (page 8) is as such:<br /> Constructor<br /> createChildren()<br /> commitProperties()<br /> measure()<br /> updateDisplayList()<br /> CustomEvents</p><p>I am a little new to all this also, so my thinking is that<br /> creationComplete event&#8217;s definition is this</p><p>&#8220;Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing.&#8221;</p><p>This puts the creationComplete event in at the tail end of the component lifecycle.  Now for childrenCreated()&#8217;s definition:</p><p>&#8220;Performs any final processing after child objects are created.&#8221;</p><p>Now I should do some real tests but it makes sense to do your initializing of pointers etc&#8230; right after the children are created (either createChildren() as in Ely&#8217;s slide or childrenCreated()) so that the initialized code can be used in the rest of the Child&#8217;s lifecycle, (commitProperties(), measure(), updateDisplayList(), Custom events)</p><p>Both methods will work its a matter of the lifecycle of the component and what you want to accomplish.</p> ]]></content:encoded> </item> <item><title>By: David Coletta</title><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/#comment-2369</link> <dc:creator>David Coletta</dc:creator> <pubDate>Thu, 13 Jul 2006 15:08:10 +0000</pubDate> <guid isPermaLink="false">http://renaun.com/blog/?p=64#comment-2369</guid> <description><![CDATA[Can you say more about why you prefer overriding childrenCreated() as opposed to listening for CREATION_COMPLETE? I admit that when I first started using Flex 2.0 alpha, my first instinct was to oveerride a method somewhere. I&#039;m pretty sure I looked for a childrenCreated() protected method, didn&#039;t find it, and just went with the event listener approach instead. I think perhaps they added childrenCreated() late in the game, after I had standardized on something else.But anyway, I&#039;m curious why you think it&#039;s more proper for a custom component to use the override approach rather than the event listener approach?]]></description> <content:encoded><![CDATA[<p>Can you say more about why you prefer overriding childrenCreated() as opposed to listening for CREATION_COMPLETE? I admit that when I first started using Flex 2.0 alpha, my first instinct was to oveerride a method somewhere. I&#8217;m pretty sure I looked for a childrenCreated() protected method, didn&#8217;t find it, and just went with the event listener approach instead. I think perhaps they added childrenCreated() late in the game, after I had standardized on something else.</p><p>But anyway, I&#8217;m curious why you think it&#8217;s more proper for a custom component to use the override approach rather than the event listener approach?</p> ]]></content:encoded> </item> <item><title>By: Renaun Erickson</title><link>http://renaun.com/blog/2006/07/flex-object-composition-car-example/#comment-2368</link> <dc:creator>Renaun Erickson</dc:creator> <pubDate>Thu, 13 Jul 2006 14:47:00 +0000</pubDate> <guid isPermaLink="false">http://renaun.com/blog/?p=64#comment-2368</guid> <description><![CDATA[super on the class above is pointless, its was a generated class and I didn&#039;t clean it out.  It also will not hurt leaving it in.]]></description> <content:encoded><![CDATA[<p>super on the class above is pointless, its was a generated class and I didn&#8217;t clean it out.  It also will not hurt leaving it in.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/5 queries in 0.002 seconds using disk: basic
Object Caching 368/373 objects using disk: basic

 Served from: renaun.com @ 2026-06-09 02:44:13 by W3 Total Cache -->