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

DataGroup with no layout specified causes DV to fail to render

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Spark: DataGroup
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      SDK steps to reproduce:
      1. Create an MXML file like this:
      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:components="my.favorite.components.*">
      <s:List x="49" y="101" skinClass="MyListSkin2"></s:List>
      </s:Application>

      2. Create a List Skin file like this:
      <?xml version="1.0" encoding="utf-8"?>
      <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx">
      <!-- host component -->
      <fx:Metadata>
      [HostComponent("spark.components.List")]
      </fx:Metadata>

      <!-- states -->
      <s:states>
      <s:State name="disabled" />
      <s:State name="normal" />
      </s:states>

      <!-- SkinParts
      name=scroller, type=spark.components.Scroller, required=false
      name=dropIndicator, type=mx.core.IFactory, required=false
      name=dataGroup, type=spark.components.DataGroup, required=false
      -->
      <s:DataGroup id="dataGroup" >

      </s:DataGroup>
      </s:Skin>

      3. Connect them and run in the browser.

      Actual Results:
      Error: BasicLayout doesn't support virtualization.
      at spark.layouts::BasicLayout/checkUseVirtualLayout()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\layouts\BasicLayout.as:186]
      at spark.layouts::BasicLayout/measure()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\layouts\BasicLayout.as:196]
      at spark.components.supportClasses::GroupBase/measure()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1078]
      at spark.components::DataGroup/measure()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\DataGroup.as:1299]
      at mx.core::UIComponent/measureSizes()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8042]
      at mx.core::UIComponent/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7966]
      at mx.managers::LayoutManager/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:617]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:709]
      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

      Expected results:
      Shouldn't DataGroup layout default to something reasonable so that it doesn't RTE by default?

      FB Steps to reproduce:
      1. New project
      2. Type <s:List skinClass="
      3. Take the hint to create a new skin. Do not create a copy - create an empty skin and edit it.
      4. The comments tell you to create a dataGroup. Ok, then type <s:DataGroup id="dataGroup"/>
      5. Go back to the main file (with the list in it), and go to DV.

      Actual Results:
      White screen. Warning in problems panel: "Design mode: error in component layout."

      Expected Results:
      This is an incredibly simple use-case. DataGroup is optional - why does it break DV when I add a trivial dataGroup?

      Workaround (if any):
      (I only figured this out by using the debugger): add a layout to the dataGroup:

      <s:DataGroup id="dataGroup>
      <s:layout>
      <s:HorizontalLayout/>
      </s:Layout>
      </s:DataGroup>

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: