Initial Cell Content Query • Activity Builder by Desmos

I’ve been using table cells to gather values, setting the initial value of each cell to “?” to indicate where input is required and clearing it when input starts, with script of the form:

initialCellContent(1,2): when this.cellHasFocus(1,2) “” otherwise “?”

This is fine when the cell is numeric but the “?” did not disappear when the cell was text. In putting an example together to illustrate the point, the “?” is now not appearing at all for the text cell? Help!

Twilight zone material?

Thats a pretty cool find! Neither of those behaviors (the one that works or the one that doesn’t) is completely surprising. any initial text. latex, etc remains dynamic until a student starts editing the input and what swap on cell focus is relying on a detail of which happens first - changing the initialText, or deciding that the user started editing. It’s not really reliable either way, but neither one feels like a bug to me. In documentation, I’d call this “unspecified behavior”. I wouldn’t rely on it long-term, but it’s also fairly likely to keep working this way.

Sorry Jay, I still feel there is something odd here! It doesn’t seem reasonable that code such as

initialCellContent(1,3): when this.cellHasFocus(1,3) “?” otherwise “?”

doesn’t result in “?” appearing in the cell. (This is now the code used in the example but still nothing appears). I do see that ‘initialCellContent’ should really be complete before interaction with a screen begins and so is in conflict with ‘cellHasFocus’ when it occurs later. However, ‘cellHasFocus’ should perhaps always be defined, returning ‘false’ before interaction begins, and so produce the initial ‘?’.