flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kevin godell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34630) spark.components.Alert#partRemoved() implementation makes wrong super.partAdded() call
Date Thu, 01 Jan 2015 18:22:13 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262626#comment-14262626
] 

kevin godell commented on FLEX-34630:
-------------------------------------

I just realized that I previously used the wrong Alert.as when testing. So, I used the newer
Alert.as found at https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/experimental/src/spark/components/Alert.as
.
I copied the Alert.as and made my own component called ModifiedAlert.as. Correcting that line
of code super.partAdded to super.partRemoved inside of the override partRemoved now allows
me to assign a skinclass at runtime without error.

> spark.components.Alert#partRemoved() implementation makes wrong super.partAdded() call
> --------------------------------------------------------------------------------------
>
>                 Key: FLEX-34630
>                 URL: https://issues.apache.org/jira/browse/FLEX-34630
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.13.0
>         Environment: Flash Player 15.0.0.189 (debug version), Opera, Windows 7, SDK 
4.13.0 (20140701) and WIN_flex4.13.0-air15.0.0.249
>            Reporter: Andrii Radistao
>              Labels: Alert, Skin, partAdded, partRemoved, spark
>         Attachments: TestSparkAlert.zip, TestSparkAlertBuilt.zip
>
>
> _partRemoved_ implementation for {{spark.components.Alert}} probably has wrong super
method call: _partAdded_ instead of _partRemoved_.
> {code:title=Alert.as: 642|borderStyle=solid}
> override protected function partRemoved(partName:String, instance:Object):void {
>     super.partAdded(partName, instance);
>     if (partName == "buttonGroup") {
>         destroyButtons(Group(instance));
>     }
> }
> {code}
> *This implementation causes an exception if you change component's skin at runtime* (see
the attachment):
> [Fault] exception, information=ReferenceError: Error #1069: Property autoLayout not found
on Number and there is no default value.
> at spark.components::SkinnableContainer/partAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/SkinnableContainer.as:970]
> at spark.components::Panel/partAdded()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/Panel.as:554]
> at spark.components::Alert/partRemoved()[/Users/aharui/release4.13.0/frameworks/projects/experimental/src/spark/components/Alert.as:643]
> at spark.components.supportClasses::SkinnableComponent/clearSkinParts()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:779]
> at spark.components.supportClasses::SkinnableComponent/detachSkin()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:813]
> at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:453]
> at spark.components.supportClasses::SkinnableComponent/commitProperties()[/Users/aharui/release4.13.0/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:472]
> at mx.core::UIComponent/validateProperties()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/core/UIComponent.as:8751]
> at mx.managers::LayoutManager/validateProperties()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:605]
> at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:821]
> at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/aharui/release4.13.0/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message