Jeremy

Forum Replies Created

Viewing 15 posts - 811 through 825 (of 1,522 total)
  • Author
    Posts
  • in reply to: Trials are unintentionally skipped #7047
    Jeremy
    Keymaster

    The 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 with getDropDown("say") and the second one with getDropDown("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 releases

    Jeremy

    in reply to: Trials are unintentionally skipped #7045
    Jeremy
    Keymaster

    Hi 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

    in reply to: Materials preloaded but not shown in the experiment #7041
    Jeremy
    Keymaster

    Did 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

    in reply to: Callback command #7038
    Jeremy
    Keymaster

    Hi 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

    in reply to: Refreshing canvas #7036
    Jeremy
    Keymaster

    I’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

    in reply to: Refreshing canvas #7033
    Jeremy
    Keymaster

    The 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

    in reply to: Combing text and regex in test.text() #7029
    Jeremy
    Keymaster

    Hi,

    Regular expressions (built either using /slashes/ like you do, or with the RegExp constructor) are not Strings in javascript, so you cannot just concatenate a string (row.prime) with a regular expression /\w+/). You can, however, pass a literal string to the RegExp 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

    in reply to: How to preload in advance #7028
    Jeremy
    Keymaster

    Hi 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

    in reply to: Refreshing canvas #7027
    Jeremy
    Keymaster

    Hi Rafael,

    The Template command from your post contains a trailing , after getText("value").text( getVar("value") ) and misses a closing parenthesis (you seem to include a closing parenthesis for Template( but no closing parenthesis for newTrial()

    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

    in reply to: Change font size of experimental items #7026
    Jeremy
    Keymaster

    Hi,

    Have you tried adding

    .PennController {
      font-size: 1.5em;
    }

    to PennController.css in the Aesthetics folder of your project?

    Jeremy

    in reply to: Materials preloaded but not shown in the experiment #7025
    Jeremy
    Keymaster

    The problem was coming from a trailing / at the end of the URL pointing to the zip file in PreloadZip: 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 PennController

    Jeremy

    in reply to: Materials preloaded but not shown in the experiment #7020
    Jeremy
    Keymaster

    Hello,

    Would you mind sharing the demonstration link to your project, either here or at support@pcibex.net?

    Jeremy

    in reply to: Own experiment does not run on set up server #7016
    Jeremy
    Keymaster

    Hi 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

    Jeremy
    Keymaster

    Hi,

    Did you reference the SetCounter trial in your Sequence?

    Here’s a demo: https://farm.pcibex.net/r/LiCSni/

    Jeremy

    Jeremy
    Keymaster

    By 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

Viewing 15 posts - 811 through 825 (of 1,522 total)