[
https://issues.apache.org/jira/browse/FLEX-34390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
DarkStone updated FLEX-34390:
-----------------------------
Attachment: SkinnableTextBase bug (found in Flex 4.13.0 RC2).png
> SkinnableTextBase bug (found in Flex 4.13.0 RC2)
> ------------------------------------------------
>
> Key: FLEX-34390
> URL: https://issues.apache.org/jira/browse/FLEX-34390
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: TextArea, Spark: TextInput
> Affects Versions: Apache Flex 4.13.0
> Environment: Tested on AIR 14 Simulator for iPad/iPhone
> Reporter: DarkStone
> Priority: Minor
> Attachments: SkinnableTextBase bug (found in Flex 4.13.0 RC2).png
>
>
> Short story:
> There is a bug in SkinnableTextBase, inside the function body of "private
> function textDisplay_changeHandler(event:Event):void", the skin.currentState
> is null when running on mobile, I don't know how to fix it, but at least I
> know we should add a null check to the skin.currentState.
> Please see the screenshot I attached.
> Steps to reproduce the bug:
> 1. Create a subclass of SkinnableComponent, name the subclass SimpleTest.
> 2. Define a SkinPart of SimpleTest:
> [SkinPart(required="true")]
> public var queryInput:TextInput;
> 3. override partAdded function for SimpleTest:
> override protected function partAdded(partName:String, instance:Object):void
> {
> if ( instance == queryInput ) {
> queryInput.text = "Hello World";
> }
> }
> 4. Create the SimpleTestSkin.mxml for SimpleTest, use the <s:TextInput
> id="queryInput"/> to bind the SkinPart, use the TextInput's default skin.
> 5. Bind the SimpleTestSkin.mxml to SimpleTest using CSS.
> s|SkinnableComponent.simpleTest
> {
> skinClass: ClassReference("skin.SimpleTestSkin");
> }
> 6. Put <ns:SimpleTest styleName="simpleTest"/> inside <s:Application>
> 7. Run the application on Web or Desktop, no problems.
> 8. Run the application on AIR Simulator for mobile or run it on real mobile
> devices, will encounter the following errors:
> TypeError: Error #1009: Cannot access a property or method of a null object
> reference.
> at
> spark.components.supportClasses::SkinnableTextBase/textDisplay_changeHandler()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as:2703]
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at
> mx.core::UIComponent/dispatchEvent()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:13682]
> at spark.components.supportClasses::ScrollableStageText/set
> text()[/Users/aharui/release4.13.0/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as:1016]
> at spark.components.supportClasses::SkinnableTextBase/set
> text()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as:1410]
> at spark.components::TextInput/set
> text()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/TextInput.as:288]
> at
> global/SYSTEM.LIB.display.updaters::updateTextComponentByCharacterAndOS()[D:\VLP\FLEX\NewsCenterDesktop\src\SYSTEM\LIB\display\updaters\updateTextComponentByCharacterAndOS.as:41]
> at
> SYSTEM.COM.panes::FeedBasicEditorPane/partAdded()[D:\VLP\FLEX\NewsCenterDesktop\src\SYSTEM\COM\panes\FeedBasicEditorPane.as:119]
> at
> SYSTEM.COM.panes::FeedEssentialEditorPane/partAdded()[D:\VLP\FLEX\NewsCenterDesktop\src\SYSTEM\COM\panes\FeedEssentialEditorPane.as:112]
> at
> SYSTEM.COM.panes::SiteEditorPane/partAdded()[D:\VLP\FLEX\NewsCenterDesktop\src\SYSTEM\COM\panes\SiteEditorPane.as:65]
> at
> spark.components.supportClasses::SkinnableComponent/findSkinParts()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:751]
> at
> spark.components.supportClasses::SkinnableComponent/attachSkin()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:716]
> at
> spark.components.supportClasses::SkinnableComponent/validateSkinChange()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:457]
> at
> spark.components.supportClasses::SkinnableComponent/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:416]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1707]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1707]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1707]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at SYSTEM.SKIN.panes::SubscriptionEditorPaneSkin/initialize()
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChild()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7237]
> at
> spark.components.supportClasses::SkinnableComponent/attachSkin()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:707]
> at
> spark.components.supportClasses::SkinnableComponent/validateSkinChange()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:457]
> at
> spark.components.supportClasses::SkinnableComponent/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:416]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1703]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1707]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
> at
> mx.core::UIComponent/initialize()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7695]
> at
> mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7556]
> at
> mx.core::UIComponent/addChildAt()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:7260]
> at
> spark.components::Group/addDisplayObjectToDisplayList()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:2116]
> at
> spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:1707]
> at
> spark.components::Group/setMXMLContent()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:653]
> at
> spark.components::Group/createChildren()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Group.as:906]
--
This message was sent by Atlassian JIRA
(v6.2#6252)