composer passing parameters?

rob,

line 92 is commented out. I fixed the reference to RowNumber to rowNumber. missed that one

thanks for taking time to look at this.

daveC

[lua]

print("5S------(87)— event.params.rowNumber is " … event.params.rowNumber )

print("5S------(88)— params.rowNumber is " … params.rowNumber )

–print("5S------(89)— rowNumber is " … rowNumber )

print("5S------(90)— row is " … row )

print("5S------(91)— myData is " … tostring(myData))

–print("5S------(92)-------- myData[row].name is " … myData[row].name)     –< commented out

–print("5S------(93)-------- myData[params.rowNumber].name is " … myData[params.rowNumber].name)

[/lua]

The error:

C:\Users\dcantera\Documents\Corona Projects\TabBarApp3,2017-04-10e\view5.lua:92: attempt to index field ‘?’ (a nil value)

means that in line 92, an index to something is nil. The only thing in line 92 you have a table named myData and you’re trying to find row, which is 7. So perhaps myData[7] is nil. Perhaps myData[7] exists but .name doesn’t exist.

Rob

rob,

this is puzzling, the table, myData in view4.lua, is full though and item 5, Pebbles is found as console print results showed. that’s why I tested it with setting  i = 5, and then printing the .name value just to make sure I had transferred the table successfully from scene4 to scene5 in params.

ugh.

[lua]

local myData = {}

myData[1] = { name=“Fred”,    phone=“555-555-1234”, relationship=“B”, hotFlag=“Y”, lflag="N”}

myData[2] = { name=“Barney”,  phone=“555-555-1235”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[3] = { name=“Wilma”,   phone=“555-555-1236”, relationship=“S”, hotFlag=“Y”, lflag="N”}

myData[4] = { name=“Betty”,   phone=“555-555-1237”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[5] = { name=“Pebbles”, phone=“555-555-1238”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[6] = { name=“BamBam”,  phone=“555-555-1239”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[7] = { name=“Dino”,    phone=“555-555-1240”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[8] = { name=“FredB”,    phone=“555-555-1234”, relationship=“BS”, hotFlag=“N”, lflag="N”}

myData[9] = { name=“BarneyB”,  phone=“555-555-1235”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[10] = { name=“WilmaB”,   phone=“555-555-1236”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[11] = { name=“BettyB”,   phone=“555-555-1237”, relationship=“B”, hotFlag=“N”, lflag=“N”}

myData[12] = { name=“PebblesB”, phone=“555-555-1238”, relationship=“S”, hotFlag=“N”, lflag="N”}

myData[13] = { name=“BamBamB”,  phone=“555-555-1239”, relationship=“B”, hotFlag=“N”, lflag=“N”}

myData[14] = { name=“DinoB”,    phone=“555-555-1240”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[15] = { name=“WilmaC”,   phone=“555-555-1236”, relationship=“S”, hotFlag=“N”, lflag="N”}

myData[16] = { name=“CettyC”,   phone=“555-555-1237”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[17] = { name=“PebblesC”, phone=“555-555-1238”, relationship=“BS”, hotFlag=“N”, lflag=“N”}

myData[18] = { name=“CamCamC”,  phone=“555-555-1239”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[19] = { name=“DinoC”,    phone=“555-555-1240”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[20] = { name=“WilmaD”,   phone=“555-555-1236”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[21] = { name=“DettyD”,   phone=“555-555-1237”, relationship=“S”, hotFlag=“N”, lflag="N”}

myData[22] = { name=“PebblesD”, phone=“555-555-1238”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[23] = { name=“DamDamD”,  phone=“555-555-1239”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[24] = { name=“DinoD”,    phone=“555-555-1240”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[25] = { name=“WilmaD”,   phone=“555-555-1236”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[26] = { name=“DettyD”,   phone=“555-555-1237”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[27] = { name=“PebblesD”, phone=“555-555-1238”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[28] = { name=“DamDamD”,  phone=“555-555-1239”, relationship=“B”, hotFlag=“N”, lflag="N”}

myData[29] = { name=“DinoD”,    phone=“555-555-1240”, relationship=“B”, hotFlag=“N”, lflag="N”}

[/lua]