logging in or signing up flex components slides Nikita Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 1244 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 28, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Flex Component Development: Flex Component DevelopmentBasic Lifecycle: Basic Lifecycle Constructor parent.addChild() createChildren() Invalidation and Validation commitProperties() measure() updateDisplayList() parent.removeChild() Garbage CollectionConstructor: Constructor Add event listeners. Override properties. Nothing else. createChildren(): createChildren() Called only once. Instantiate children that never change. May override children from superclasses.createChildren() Example: createChildren() Example override protected function createChildren():void { if(!this.subComponent) { this.subComponent = new MyCustomComponent(); this.addChild(this.subComponent); } super.createChildren(); if(!this.textField) { this.textField = new TextField(); this.addChild(this.textField); } }Invalidation and Validation: Invalidation and Validation Properties invalidateProperties() commitProperties() Dimensions invalidateSize() measure() Display invalidateDisplayList() updateDisplayList()Invalidation Example: Invalidation Example private var _someParam:Number = 0; private var _someParamChanged:Boolean = false; public function get someParam():Number { return this._someParam; } public function set someParam(value:Number):void { this._someParam = value; this._someParamChanged = true; this.invalidateProperties(); }Validation Example: Validation Example override protected function commitProperties():void { super.commitProperties(); if(this._someParamChanged) { // do something this._someParamChanged = false; } }Component Measurement: Component Measurement measure() measuredWidth setActualSize() getExplicitOrMeasuredWidth() updateDisplayList() unscaledWidthMetadata: Metadata Events [Event(name=“itemRollOver”, type=“com.yahoo.astra.fl.events.TabBarEvent”)] Styles [Style(name=“contentPadding”, type=“Number”)] Please note: Both types are required for use in MXML.Default Styles (Required CSS File): Default Styles (Required CSS File) customlist.css: MyCustomList { paddingLeft: 10 paddingRight: 10; paddingTop: 5; paddingBottom: 5; } MyCustomListItemRenderer { backgroundColor: #ffffff; }Default Styles (Static Initializer): Default Styles (Static Initializer) private static function initializeStyles():void { var selector:CSSStyleDeclaration = StyleManager.getStyleDeclaration(“MyCustomList"); if(!selector) { selector = new CSSStyleDeclaration(); } selector.defaultFactory = function():void { this.paddingLeft = 10; } StyleManager.setStyleDeclaration("TreeMap", selector, false); } initializeStyles(); //call immediately Yahoo! Flash Platform: Yahoo! Flash Platform Yahoo! Flash Developer Network: http://developer.yahoo.com/flash/ Mailing List: http://tech.groups.yahoo.com/groups/ydn-flash/ Blog: http://www.yswfblog.com/ You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
flex components slides Nikita Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINTLite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 1244 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: November 28, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Flex Component Development: Flex Component DevelopmentBasic Lifecycle: Basic Lifecycle Constructor parent.addChild() createChildren() Invalidation and Validation commitProperties() measure() updateDisplayList() parent.removeChild() Garbage CollectionConstructor: Constructor Add event listeners. Override properties. Nothing else. createChildren(): createChildren() Called only once. Instantiate children that never change. May override children from superclasses.createChildren() Example: createChildren() Example override protected function createChildren():void { if(!this.subComponent) { this.subComponent = new MyCustomComponent(); this.addChild(this.subComponent); } super.createChildren(); if(!this.textField) { this.textField = new TextField(); this.addChild(this.textField); } }Invalidation and Validation: Invalidation and Validation Properties invalidateProperties() commitProperties() Dimensions invalidateSize() measure() Display invalidateDisplayList() updateDisplayList()Invalidation Example: Invalidation Example private var _someParam:Number = 0; private var _someParamChanged:Boolean = false; public function get someParam():Number { return this._someParam; } public function set someParam(value:Number):void { this._someParam = value; this._someParamChanged = true; this.invalidateProperties(); }Validation Example: Validation Example override protected function commitProperties():void { super.commitProperties(); if(this._someParamChanged) { // do something this._someParamChanged = false; } }Component Measurement: Component Measurement measure() measuredWidth setActualSize() getExplicitOrMeasuredWidth() updateDisplayList() unscaledWidthMetadata: Metadata Events [Event(name=“itemRollOver”, type=“com.yahoo.astra.fl.events.TabBarEvent”)] Styles [Style(name=“contentPadding”, type=“Number”)] Please note: Both types are required for use in MXML.Default Styles (Required CSS File): Default Styles (Required CSS File) customlist.css: MyCustomList { paddingLeft: 10 paddingRight: 10; paddingTop: 5; paddingBottom: 5; } MyCustomListItemRenderer { backgroundColor: #ffffff; }Default Styles (Static Initializer): Default Styles (Static Initializer) private static function initializeStyles():void { var selector:CSSStyleDeclaration = StyleManager.getStyleDeclaration(“MyCustomList"); if(!selector) { selector = new CSSStyleDeclaration(); } selector.defaultFactory = function():void { this.paddingLeft = 10; } StyleManager.setStyleDeclaration("TreeMap", selector, false); } initializeStyles(); //call immediately Yahoo! Flash Platform: Yahoo! Flash Platform Yahoo! Flash Developer Network: http://developer.yahoo.com/flash/ Mailing List: http://tech.groups.yahoo.com/groups/ydn-flash/ Blog: http://www.yswfblog.com/