Hi,

> But first, let's nail this sort=null thing.  I can look into it if you
> want.

Just looking at it now. 

I've written a couple of dozen unit tests and have 3 failing in both ApacheFlex 
4.10 that I think should pass.

Leave it with me but so you get an idea this fails with an RTE:

        addNumbers(); // adds 1 and 2
        var sort:Sort = new Sort();                     
        sort.fields = [new SortField(null, false, true, true)];
        ac.sort = sort;
        ac.refresh();
        ac.sort = null;
        addNumbers(); // adds 1 and 2

I'd expect this result:
        assertEquals("Length is not four", ac.length, 4);
        assertEquals("First element not correct", ac[0], 2);
        assertEquals("Second element not correct", ac[1], 1);
        assertEquals("Third element not correct", ac[2], 1);
        assertEquals("Fourth element not correct", ac[3], 2);

This also fails:
        addNumbers(); // adds 1 and 2
        var sort:Sort = new Sort();                     
        sort.fields = [new SortField(null, false, true, true)];
        ac.sort = sort;
        ac.refresh();
        ac.sort = null;
        ac.removeItemAt(0); // still sorted so 2 is removed leaving 1

I'd expect this result:
        assertEquals("First element not correct", ac[0], 1);


Justin

Reply via email to