Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34383

RTE when removing SkinnableContainer with skinDestructionPolicy "auto" and skin with VGroup or HGroup as the "contentGroup"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Apache Flex 4.12.1
    • None
    • None

    Description

      Steps to reproduce:

      1. Import and run the attached project.
      2. Press the button.

      Actual behaviour: The application throws the RTE below.
      Desired behaviour: The "container" component is simply removed from stage, with no RTE.
      Notes:

      • the only change I made to the default SkinnableContainerSkin in EmptyContainerSkin.mxml is the use of VGroup (or HGroup) as the "contentGroup", instead of the standard Group.
      • there are a few potential solutions, of course. I'm leaning toward preventing SkinnableContainer.partRemoved() from clearing the old contentGroup's layout (not sure why it does it; no useful blame info in git), as it doesn't look necessary. Patch attached.

      Error: You are not allowed to change the layout for this class. It is read-only.
      at spark.components::VGroup/set layout()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/VGroup.as:533]
      at spark.components::SkinnableContainer/partRemoved()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/SkinnableContainer.as:1049]
      at spark.components.supportClasses::SkinnableComponent/clearSkinParts()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:779]
      at spark.components.supportClasses::SkinnableComponent/detachSkin()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:813]
      at spark.components.supportClasses::SkinnableComponent/removedFromStageHandler()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as:1132]
      at flash.display::DisplayObjectContainer/removeChild()
      at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/framework/src/mx/core/UIComponent.as:7365]
      at mx.core::UIComponent/removeChild()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/framework/src/mx/core/UIComponent.as:7272]
      at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementRemoved()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/Group.as:1758]
      at spark.components::Group/removeElementAt()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/Group.as:1505]
      at spark.components::Group/removeElement()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/Group.as:1483]
      at spark.components::SkinnableContainer/removeElement()[/Users/aharui/flex-sdk-4.12.1/frameworks/projects/spark/src/spark/components/SkinnableContainer.as:805]
      at _main/button1_clickHandler()[C:\Users\mihaichira\workspace\_removeSkinnableWithVGroup\src\_main.mxml:20]
      at main/___main_Button1_click()[C:\Users\mihaichira\workspace\_removeSkinnableWithVGroup\src\_main.mxml:26]

      Attachments

        1. _removeSkinnableWithVGroup.fxp
          10 kB
          Mihai Chira
        2. FLEX-34383.patch
          0.9 kB
          Mihai Chira

        Issue Links

          Activity

            People

              evolverine Mihai Chira
              evolverine Mihai Chira
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: