on the 2nd pass, the startIndex value is completely missing from the options table of values passed to the pickerWheel; on the first pass, the startIndex value is provided. the problems begin to occur in the 2nd pass where startIndex is defined by table.indexOf(listDataBRF,setBRF)
In both passes array = listDataBRF is correctly formatted with expected and valid values and the value = setBRF is correctly defined; yet in the 2nd pass the startIndex calc goes to nil.
something is going awry in table.indexOf() calc.
Tnanks for any further insight you might provide. Rob.
Here are relevant print() outputs:
PASS 1
– this is table/array of the actual values which will create the sole column to this pickerWheel object
table: 0x7fab009683b0 {
[1] => 0
[2] => 0.1
[3] => 0.2
[4] => 0.3
[5] => 0.4
[6] => 0.5
[7] => 0.6
[8] => 0.7
[9] => 0.8
[10] => 0.9
[11] => 1
[12] => 1.1
[13] => 1.2
[14] => 1.3
[15] => 1.4
[16] => 1.5
[17] => 1.6
[18] => 1.7
[19] => 1.8
[20] => 1.9
[21] => 2
[22] => 2.1
[23] => 2.2
[24] => 2.3
[25] => 2.4
[26] => 2.5
[27] => 2.6
[28] => 2.7
[29] => 2.8
[30] => 2.9
}
PASS 1 - just after above array generated
the following print() output shows the indexOf value is 11 based on a default value of 1 (ie, setBRF = 1)
print(“IndexOf - setBRF”,table.indexOf(listDataBRF,setBRF),setBRF) -->> IndexOf - setBRF 11 1
PASS 1 - the options table passed to the pickerWheel object in setupDisplay
notice that startIndex = 11
table: 0x7fab00861850 {
[top] => 160
[font] => “Helvetica”
[columns] => table: 0x7fab00861850 {
[1] => table: 0x7fab00840d70 {
[align] => “center”
[startIndex] => 11
[labels] => table: 0x7fab00861810 {
[1] => 0
[2] => 0.1
[3] => 0.2
[4] => 0.3
[5] => 0.4
[6] => 0.5
[7] => 0.6
[8] => 0.7
[9] => 0.8
[10] => 0.9
[11] => 1
[12] => 1.1
[13] => 1.2
[14] => 1.3
[15] => 1.4
[16] => 1.5
[17] => 1.6
[18] => 1.7
[19] => 1.8
[20] => 1.9
[21] => 2
[22] => 2.1
[23] => 2.2
[24] => 2.3
[25] => 2.4
[26] => 2.5
[27] => 2.6
[28] => 2.7
[29] => 2.8
[30] => 2.9}}}}
PASS 2
– this is table/array of the actual values which will create the sole column to this pickerWheel object
– it is identical to initial pass
table: 0x7faafa55c300 {
[1] => 0
[2] => 0.1
[3] => 0.2
[4] => 0.3
[5] => 0.4
[6] => 0.5
[7] => 0.6
[8] => 0.7
[9] => 0.8
[10] => 0.9
[11] => 1
[12] => 1.1
[13] => 1.2
[14] => 1.3
[15] => 1.4
[16] => 1.5
[17] => 1.6
[18] => 1.7
[19] => 1.8
[20] => 1.9
[21] => 2
[22] => 2.1
[23] => 2.2
[24] => 2.3
[25] => 2.4
[26] => 2.5
[27] => 2.6
[28] => 2.7
[29] => 2.8
[30] => 2.9}
PASS 2 - just after above array generated
FYI: In Pass 1, the BRF was set to 1.5 and shows up correctly here
the following print() output shows the indexOf value is NIL based on a default value of 1.5 (ie, setBRF = 1.5)
print(“IndexOf - setBRF”,table.indexOf(listDataBRF,setBRF),setBRF) -->> IndexOf - setBRFnil 1.5
PASS 2 - the options table passed to the pickerWheel object in setupDisplay
notice that startIndex is now MISSING – even though array = listDataBRF is correctly formatted and setBRF = 1.5, which is a valid member of listDataBRF
table: 0x7faafa4ccf80 {
[top] => 160
[font] => “Helvetica”
[columns] => table: 0x7faafa4ccf80 {
[1] => table: 0x7fab0085d310 {
[align] => “center”
[labels] => table: 0x7fab0086fc10 {
[1] => 0
[2] => 0.1
[3] => 0.2
[4] => 0.3
[5] => 0.4
[6] => 0.5
[7] => 0.6
[8] => 0.7
[9] => 0.8
[10] => 0.9
[11] => 1
[12] => 1.1
[13] => 1.2
[14] => 1.3
[15] => 1.4
[16] => 1.5
[17] => 1.6
[18] => 1.7
[19] => 1.8
[20] => 1.9
[21] => 2
[22] => 2.1
[23] => 2.2
[24] => 2.3
[25] => 2.4
[26] => 2.5
[27] => 2.6
[28] => 2.7
[29] => 2.8
[30] => 2.9}}}}