Table problems
darianb
Member Posts: 24
Hi,
Am I the only person experiencing serious problems with tables?
Problem 1:
I generate a random number in an attribute I call game.correct
Then I try to display the text from a table in column 1 on row game.correct.
tableCellValue( game.tabauth , game.correct ,1)
However, this always comes up blank.
But, if I delete the command to read from the table, and just leave display text game.correct, it displays the random number.
Problem 2:
Also, much of the text contained in the table keeps vanishing from the table (as it appears in GS), although it's still present in the XML file.
The most annoying thing is, I have another app that uses the same commands and the same table, which works fine (and is already on iTunes).
Please help!
Am I the only person experiencing serious problems with tables?
Problem 1:
I generate a random number in an attribute I call game.correct
Then I try to display the text from a table in column 1 on row game.correct.
tableCellValue( game.tabauth , game.correct ,1)
However, this always comes up blank.
But, if I delete the command to read from the table, and just leave display text game.correct, it displays the random number.
Problem 2:
Also, much of the text contained in the table keeps vanishing from the table (as it appears in GS), although it's still present in the XML file.
The most annoying thing is, I have another app that uses the same commands and the same table, which works fine (and is already on iTunes).
Please help!
Comments
Using tableCellValue(game.tabauth, game.correct, 1) leads to invalid expression to display in the display text behaviour.
Using tableCellValue(game.tabauth, "game.correct", 1) displays London correctly
That's a bit strange if it works in another app, I've uploaded the file here for you to look at http://www.mediafire.com/?q7a9nhb9sndjd3m
See if that is what you're after
the fact that a gameAttribute in the row,col … without the quotes … correctly retrieved cellValues in a previous app
makes me suspect that the type of that attribute was text. … as text doesn't need quotes
alas, we sometimes forget that text can be numbers as well as letters and punctuation
and, that all numberValues can be manipulated by most functions
though actual textNumbers … one, two, three only read as letters
if you create a text attribute … you can use random(min,max); abs(x); floor(x); ceil(x) … etc. function on numbers there
Provieded that attribute only contains numbers … no letters or punctuation other than decimal point; and - for a negativeValue
we think of spreadsheets, tables, and arrays as working with numbers and that is what they do
but, the values we enter into them are ascii text input from our keyboard! … we type them in.
@};- MH