kuza55 / minimalcomps

Automatically exported from code.google.com/p/minimalcomps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

List set items crash

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1.Make a List
2.do list.items = some_array

It can crash because makeListItems() is not called.
Also selected item should be set to -1

//I changed list - set items to this:
public function set items(value:Array):void
{
    _items = value;
    makeListItems();
    _selectedIndex = -1;
    invalidate();
}

Also I think invalidate is called in too many places that could cause multiple 
redraws.
For instance set selectedItem calls it but it also calls set selectedIndex 
which calls it too.


Original issue reported on code.google.com by GenAr...@gmail.com on 24 Jul 2011 at 3:50

Encountered the same issue. Added makeListItems(); in items setter to resolve.

Original comment by jboursiq...@gmail.com on 4 Aug 2011 at 5:42