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

ListCollectionView does not react to wrapped list's REFRESH event

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 3.5 (Release)
    • None
    • Collections
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Run code below

      Actual Results:
      list2 and list3 reports a length of 1 after the filter input has changed

      Expected Results:
      list3 and list3 should report a length of 0

      Workaround (if any):
      Don't know, maybe subclass ListCollectionView..? Wouldn't be the first class I have to subclass to fix a bug myself.

      -------------

      var numberToMatch:Number = 1;

      var list1:ArrayCollection = new ArrayCollection([1,2,3]);
      list1.addEventListener(CollectionEvent.COLLECTION_CHANGE, function(event:Event):void

      { trace(event); }

      );

      var list2:ListCollectionView = new ListCollectionView(list1);
      list2.filterFunction = function(item:Object):Boolean

      { return Number(item) == numberToMatch; }

      ;
      list2.refresh();

      var list3:ListCollectionView = new ListCollectionView(list2);
      list3.sort = new Sort();
      list3.refresh();

      trace(list1.length);
      trace(list2.length);
      trace(list3.length);

      numberToMatch = 4;
      list1.refresh();

      trace(list1.length);
      trace(list2.length);
      trace(list3.length);

      list1.source = list1.source;

      trace(list1.length);
      trace(list2.length);
      trace(list3.length);

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: