Forum Replies Created
-
AuthorPosts
-
Jeremy
KeymasterHello Eleni,
All the
.jpg
files whose names start with0
in your project’s Resources folder lack a dot before the second digit, but your code does include a dot (eg.newImage("0.9.jpg")
but the file’s actual name is09.jpg
) — your draft project simply doesn’t reference any of those imagesEither remove the dots between
0
and the second digit in your code, or rename the files in your project and the problem should go awayJeremy
Jeremy
KeymasterHi,
my experiment has filler sentences that won’t have any intended answer – for instance, some of them have an unusual word order which would make them ungrammatical. Is there a way to log these filler sentences as “null” or “none” using this method?
You could replace
.log("CORRECT", getVar("CORRECT"))
with.log("CORRECT", row.TYPE=="filler" ? "NA" : getVar("CORRECT"))
I’m addressing the question from the last post on the dedicated topic created here
Jeremy
Jeremy
KeymasterHello,
You print an element below another one by calling
print()
on the latter after calling it on the former. You are actually already doing this to print your Image elements below your Text elements (although you then move the Image element inside a Canvas element that only contains it, which seems unnecessary):PennController("univ.exist", newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.") //// Set #2 , 2.7 .center() .print() , newImage("2.7.jpg") .settings.size( 300 , 200 ) .print() , newCanvas("side-by-side", 450-200) .add( 0, 0, getImage("2.7.jpg")) .center() .print() , newKey (" ") .wait() )
So all you need to do is print a Scale element after the Image element, like this:
newTrial("univ.exist", newText("Κάθε κομμώτρια χτένισε κάποια γυναίκα.") .center() .print() , newImage("2.7.jpg") .size( 300 , 200 ) .center() .print() , newScale("answer", 5) .log() .css({"max-width":280,width:280,color:"blue"}) .button() .before( newText("(Διαφωνώ) ").italic() ) .after( newText(" (Συμφωνώ)").italic() ) .center() .print() .wait() )
Jeremy
Jeremy
KeymasterHi,
Your code currently embeds every line starting from
Template("CompQuantAdultStudy2022.csv",
inside thewait
command of the “practice” Scale element, because its closing parenthesis only comes at the end of the code. You need to take three closing parentheses out of the block of six below thegetScale("score")
lines, and move them up to replace the comma currently below the closing parenthesis of thefailure
command of the “practice” Scale element. This way, you’ll be closing not only thewait
command, but also the “practice”newTrial
andTemplate
commands before getting to the “experimental-trial” onesJeremy
Jeremy
KeymasterHello,
It’s possible that the farm was receiving many requests when the issue occurred, and failed to respond to some requests for individual resources. Consolidating your resources in a single zip file makes the experiment send a single request, which is more likely to complete that several individual requests. That solution requires an external hosting solution, either a webserver or, for example, an Amazon S3 bucket
Jeremy
Jeremy
KeymasterHi,
Yes, the logic is exactly the same:
newTrial( newTimer("timeout", 4000).start() , newText("Please click on A, B or C").css("margin-bottom","1em").print() , newScale("answer", "A", "B", "C") .css({"max-width":"unset",width:"10vw"}) .button() .callback( getTimer("timeout").stop() ) .print() .log() , getTimer("timeout").wait() , clear() , getScale("answer").test.selected().failure( newText("Time out! Press SPACE to proceed").print() , newKey(" ").wait() ) )
Jeremy
Jeremy
KeymasterHello,
The zip file and the pictures it contains are being downloaded and preloaded normally in the projects you linked to, now that the zip file is publicly available at the URL you gave
Jeremy
Jeremy
KeymasterHi,
You could add this before your Scale element:
newVar("CORRECT").global().set(false)
Then right after
wait()
on the Scale element:.test.selected(row.EXPECTEDANSWER).success( getVar("CORRECT").set(true) )
and finally after the last “record trial data”
log
line:.log("CORRECT", getVar("CORRECT"))
Jeremy
Jeremy
KeymasterHello,
You would need to edit DashedSentence.js: replace all occurrences of
.text
with.html
Jeremy
Jeremy
KeymasterHi Nico,
No worries. I’m leaving the post here in case anyone facing a similar issue finds it useful
Jeremy
Jeremy
KeymasterHello,
The link points to a forbidden resource. Does the zip file have read permission for everyone?
Jeremy
Jeremy
KeymasterHi Rok,
You cannot simply insert
row.r1
androw.r2
directly in a string and have them replaced with the values of the corresponding javascript expressions. You need to do:newScale("practice_response", "<span style='white-space: nowrap;'>"+row.r1+"</span>", "<span style='white-space: nowrap;'>"+row.r2+"</span>")
Jeremy
Jeremy
KeymasterHi Rok,
You can keep the two sentences on a single line, but if they are too long, they will necessarily end up overflowing the page’s width at some point:
newScale("practice_response", "<span style='white-space: nowrap;'>this is a first pretty darn long sentence if you want my opinion</span>", "<span style='white-space: nowrap;'>this is a second rather wordy sentence too if we are being honest</span>") .radio() .log() .labelsPosition("right") .center() .print() .wait()
Jeremy
Jeremy
KeymasterHello,
There are no files at the links you reference:
- https://www.ling.uni-potsdam.de/cslmlab/continuation_study/continuation_pcibex_resources/pic_continuation_study_day1.zip
- https://www.ling.uni-potsdam.de/cslmlab/continuation_study/continuation_pcibex_resources/pic_continuation_study_day2.zip
I tried visiting the same URLs without
www.
just in case, but with no success. Did you double-check the paths and the file names?Jeremy
-
AuthorPosts