kuza55 / minimalcomps

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It is possible to select a non-existing item in a list

GoogleCodeExporter opened this issue · comments

When a list is created with a few items and the height of the list allows for 
more than those items, empty itemholders are created. When hovering over these 
empty itemholders their background color changes. It is also possible to select 
these empty itemholders.

What steps will reproduce the problem?
Run this code:
package
{
    import com.bit101.components.List;
    import flash.display.Sprite;

    [SWF(backgroundColor=0xeeeeee, width=600, height=400)]
    public class Main extends Sprite
    {
        private var myList:List;

        public function Main():void

        {   
            myList = new List(this,240,100);
            myList.addItem("1");
            myList.addItem("2");
            myList.addItem("3");
        }
    }
}

What is the expected output? What do you see instead?
I expect to be only allowed to select the first 3 rows of the list, which are 
filled with data. Instead i can also select 2 extra row that are empty.

What version of the product are you using? On what operating system?
0.9.9

Please provide any additional information below.
This can easily be patched by adding 4 lines to the list.as code, see attached 
file. The lines i've added are marked with comment: //Added

Original issue reported on code.google.com by pdro...@gmail.com on 11 Mar 2011 at 7:59

Attachments:

*please replace the word 'itemholder' in my report by 'item'*

Original comment by pdro...@gmail.com on 11 Mar 2011 at 9:19

Original comment by k...@bit-101.com on 9 Apr 2011 at 2:33

  • Changed state: Fixed