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

different itemRenderers for list items in List.as

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.4 (Release)
    • None
    • mx: List
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1.
      override getItemRendererFactory and assign each list item a different custom itemRenderer
      2.
      supply data objects of different types to the itemRenderers
      3.
      make the list longer then it's actual height so that scrollbars are visible and scroll fast up and down...

      Actual Results:

      soon you get some error resulting from the fact that itemRenderers are assigned uniformely -

      Expected Results:

      normal scrolling without errors

      Workaround (if any):

      private function adjustVerticalScrollPositionDownward in List.as has error on line #953 in List.as:

      var item:IListItemRenderer = getMeasuringRenderer(iterator.current); ### 1 ###
      item.explicitWidth = listContent.width - paddingLeft - paddingRight;

      // now work backwards to see how many more rows we need to create
      while (h > 0 && more)
      {
      var data:Object;
      ...

          1. 1 ### should be moved inside the while loop - otherwise we are de facto expecting all the list items to have the same itemRenderer

      this assignment should be done inside the while loop because otherwise we are expecting all the list item to have the same item renderer

      workaround is to override protected function configureScrollBars and copy&paste the private function adjustVerticalScrollPositionDownward and move the item = getMeasuringRenderer assignment inside the while loop

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: