glossaphile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Variable Math and Text Concatenation #5098
    glossaphile
    Participant

    Thanks for your ever-prompt responses, Jeremy! I’ve almost accomplished what I need. The only problem now is that the computer seems to be trimming off blank space at the beginning and ends of the fixed strings. For example, my code to report reaction time to the user looks like this.

    newVar("sRT").set(getVar("RT"))
       .set(v => v/1000)
    ,
    newText("secs","000").text(getVar("sRT"))
    ,
    newText("Reaction Time: ")
       .after(getText("secs"))
       .after(newText(" seconds"))
       .print()
    ,

    Using 653 ms as an example, I should be getting “Reaction Time: 0.653 seconds,” but instead I’m getting, “Reaction Time:0.653seconds,” with the space before and after the number missing from the display despite being present in the code.

    in reply to: Reaction times of a selector response #5091
    glossaphile
    Participant

    How might I print a reaction time (or any numerical information) to the screen during the experiment? The “print()” command doesn’t work on a Var element or even on a Text element created by “newText(getVar(“VarName”)).” In the former case I get nothing, and in the latter case I get “undefined.”

Viewing 2 posts - 1 through 2 (of 2 total)