05-13-2011 01:18 PM - edited 05-13-2011 01:20 PM
Hello everyone,
I just came across strange Picker behavior on my PlayBook application.
Any picker list (column) that is exactly 10 items long, and you select exactly index number 4 displays instead index number 5. The array itself keeps the correct index, but the picker displays the next index instead.
If the list is shorter or longer than 10, the behavior disappears. So 9 or 11 items work fine.
This behavior occurs on SDK version 1.0.1, but not on 0.9.4.
Is there something I'm doing wrong? Could someone please verify this behavior? (Code is attached)
Thank you so much for your help. I'm going nuts with this one.
Daniel
package
{
import qnx.ui.data.DataProvider;
import qnx.ui.picker.Picker;
import flash.display.MovieClip;
import flash.events.Event;
[SWF(backgroundColor = "#FFFFFF", frameRate = "30", width = "1024", height = "600")]
public class PickerIndexTest extends MovieClip
{
public function PickerIndexTest()
{
addEventListener(Event.ADDED_TO_STAGE, ready);
}
private function ready(e:Event):void
{
removeEventListener(e.type, arguments.callee);
var items:Array = [
{label: "Item 0"},
{label: "Item 1"},
{label: "Item 2"},
{label: "Item 3"},
{label: "Item 4"},
{label: "Item 5"},
{label: "Item 6"},
{label: "Item 7"},
{label: "Item 8"},
{label: "Item 9"}
];
var picker:Picker = new Picker();
picker.dataProvider = new DataProvider([new DataProvider(items)]);
picker.selectedIndices = [4];
addChild(picker);
}
}
}
Solved! Go to Solution.
05-13-2011 01:58 PM
05-13-2011 02:09 PM
Thanks a lot for checking Peter, I'll send it in. I'll just leave it open for a bit to see if anyone has further insight.
Daniel
05-13-2011 02:36 PM - edited 05-13-2011 02:37 PM