Forum Replies Created
-
AuthorPosts
-
Jeremy
KeymasterThe first thing I did with my copy of your project was re-activating the Debug popup: by inspecting the Sequence tab, I saw that the last trial is LQB, which means that the other trials are not included at all, ie. they are not skipped upon runtime, they just fail to be created
The Debug window also indicated that your project is running PennController 1.8-dev, in which the
self
keyword that you use at lines 1197 and 1256 wasn’t defined yet (I was able to identify this specific problem by opening the browser’s web console in which I saw the message “self.test is undefined”)You can replace the first
self
withgetDropDown("say")
and the second one withgetDropDown("hear")
, or update your version of PennController (the latest version is here). If you choose to go with the latter, make sure you take another test-run of your experiment (with the debugger on—basically keep the debugger on until you are about to compensate your first participant) to check that nothing broke in the process. There shouldn’t be any major problems, but I sometimes bring aesthetic updates with new releasesJeremy
Jeremy
KeymasterHi Valerie,
Do you mind sharing your project’s demonstration link, either here or at support@pcibex.net, so I can see the full code of your project (without having to paste it here) and troubleshoot it live?
Jeremy
Jeremy
KeymasterDid you clear your cache and refresh the page where you run your experiment? Your practice material has always preloaded just fine for me, I was just having preloading problems for the experimental trials (which I no longer experience since you fixed the trailing
/
)Jeremy
Jeremy
KeymasterHi Valerie,
Do you want participants to be able to change their mind after they have made a first choice, and have the corresponding TextInput element replace the one that’s on the page at that time? For example, if they first choose “often” then the TextInput element “hearWhere1” should appear, but if they click the DropDown element again and now choose “never” then the TextInput element “hearInstead” should take the place of “hearWhere1”?
In that case, yes, you would need to use a
callback
command. May I suggest a slight simplification of your code though, such that you would only update the Text element’s content upon selection of an DropDown option?newTrial( "LBQ.3" , newText("<u><b>Language Background Questionnaire</b></u>") .center() .print() , newText("<p> Picture a situation where someone used to hate classical music but likes it now. Imagine them saying the following sentence: 'I listen to classical music anymore.' Indicate whether this sentence is: </p>") .print() , newText("question", "") , newDropDown("hear", "a kind of sentence ...") .css("font-family", "Times New Roman") .css("font-size", "1.2em") .add("a kind of sentence you have <b>heard</b> often", "a kind of sentence you have <b>heard</b> occasionally", "a kind of sentence you have never <b>heard</b> before") .print() .log() .callback( self.test.selected("a kind of sentence you have never <b>heard</b> before") .success( getText("question").text("<p>How might you hear this same idea expressed instead?</p>") ) .failure( getText("question").text("<p>Where have you heard sentences like this?</p>") ) ) .wait() , newCanvas("hear", 1500, 100) .add( 0, 0, getText("question") ) .add( 0, 60, newTextInput("feedback", "") ) .print() , newCanvas("blankspace", 1500, 25) .print() , newButton("continue", "Continue") .center() .css("font-family", "Times New Roman") .css("font-size", "1.2em") .print() .wait( getTextInput("feedback").testNot.text("") ) )
Jeremy
Jeremy
KeymasterI’ve been working and updating 2.0.alpha on the farm, I think your project uses a slightly older version than the one I was testing your code with
Download this file and replace your project’s Modules/PennController.js file with it: https://raw.githubusercontent.com/PennController/penncontroller/master/dist/PennController.js
Jeremy
Jeremy
KeymasterThe Debug popup’s title shows the project’s PennController version. Feel free to share the demonstration link to your project here or at support@pcibex.net, which will make it easier to view the project’s code (and avoid any typo-insertion issues) and also the version of PennController it uses
Jeremy
Jeremy
KeymasterHi,
Regular expressions (built either using
/slashes/
like you do, or with theRegExp
constructor) are notString
s in javascript, so you cannot just concatenate a string (row.prime
) with a regular expression/\w+/
). You can, however, pass a literal string to theRegExp
constructor, which it will interpret as a pattern to build the regular expression:getTextInput("response").test.text( new RegExp(row.prime+"\s+\w+", 'i') )
(I added\s+
to require at least one space after the prime, and used'i'
to make it case-insensitive, assuming it shouldn’t matter whether the participant uses upper- or lower-case)Jeremy
Jeremy
KeymasterHi Krishna,
All resources start preloading as soon as your participants open your experiment’s page, so you can’t preload earlier than that. Having welcome screens, consent forms, etc. at the very beginning gives time for the resources to preload in the background before participants reach a trial that uses a resource
I am not sure where the delay might be coming from in your case, but feel free to share your project’s demonstration link here or at support@pcibex.net
Jeremy
Jeremy
KeymasterHi Rafael,
The
Template
command from your post contains a trailing,
aftergetText("value").text( getVar("value") )
and misses a closing parenthesis (you seem to include a closing parenthesis forTemplate(
but no closing parenthesis fornewTrial(
)Once I fix these two points, your scripts runs smoothly for me. I’m using PennController 2.0.alpha. If you are using an older version, it could be that using the same name (
"value"
) both for the Text element and for the Var element creates a conflict, so maybe try using a different name for your Text element (eg."value display"
)Jeremy
Jeremy
KeymasterHi,
Have you tried adding
.PennController { font-size: 1.5em; }
to PennController.css in the Aesthetics folder of your project?
Jeremy
Jeremy
KeymasterThe problem was coming from a trailing
/
at the end of the URL pointing to the zip file inPreloadZip
: the Log tab from the Debug window gives a warning that the “entry […] is not a valid URL” (I will move this to the new Warning tab in the next release of PennControllerJeremy
Jeremy
KeymasterHello,
Would you mind sharing the demonstration link to your project, either here or at support@pcibex.net?
Jeremy
Jeremy
KeymasterHi Valentin,
There is a bug with the native Ibex engine where filenames with an upper-case extension in chunk_includes will make the experiment crash on that “loading” message, which would be consistent with your experience. I realize that you have read the troubleshooting page however, so it’s probably not that
Another thing to note (although I’m unsure it would cause a crash there) is that serving resource files (images, audios, videos) from the chunk_includes folder (Resources) is specific to the PCIbex Farm: if your project contains resource files in its chunk_includes folder, you should move them to the www folder instead
Feel free to share the link to your standalone experiment, here or by email at support@pcibex.net
Jeremy
May 31, 2021 at 7:32 pm in reply to: preventing dashed sentence spillover / centering sentences #7015Jeremy
KeymasterHi,
Did you reference the
SetCounter
trial in yourSequence
?Here’s a demo: https://farm.pcibex.net/r/LiCSni/
Jeremy
May 28, 2021 at 5:17 pm in reply to: preventing dashed sentence spillover / centering sentences #7012Jeremy
KeymasterBy default the internal counter that controls automatic group assignment is only incremented upon completion: https://doc.pcibex.net/advanced-tutorial/10_counterbalancing.html#controlling-group-assignment
If you want to change that, you can use
SetCounter
Jeremy
-
AuthorPosts