Badcreature / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

UIPicker will not choose index on large values #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
So I made a year-picker and filled it with quite a few values. If I choose a 
value that's over a certain threshold, the index function fails. It sets the 
index correctly (i.e. I can call pickerYear.index and get 80), but it's not 
showing in the control.

It works for smaller values, but I'm guessing there's something in the 
scrolling logic that's breaking for bigger numbers.

(and apologies for the odd two-step positioning code. That's another bug, but 
it's one I figured out how to work around)

var pickerYear:UIPicker = new UIPicker(this, <picker/>, new 
Attributes(0,0,120,0), false, false, 120)
var d = []
for (i = 1910; i<=2011; i++)
    d.push({label:i.toString()});
pickerYear.data = d
pickerYear.x = 228
pickerYear.y = 102
pickerYear.index = 80  // does not show in the control

Original issue reported on code.google.com by johnhat...@gmail.com on 9 Aug 2011 at 5:24

GoogleCodeExporter commented 8 years ago
Thanks.  I noticed a couple of issues with the picker.  I'll have them fixed 
for 0.5.9

Original comment by doc.andr...@gmail.com on 13 Aug 2011 at 8:20

GoogleCodeExporter commented 8 years ago
Fixed in 0.5.9

Original comment by doc.andr...@gmail.com on 14 Aug 2011 at 6:01