Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Piping text error

edited September 2014 in OpenSesame

Hello! I'm having a hard time getting OpenSesame to pipe text correctly. From what I can tell, this is supposed to be easy to do: the text input is stored as a variable (e.g., "input1") and this can be called up in a text display/sketchpad by referring to the variable (e.g. "[input1]"; http://osdoc.cogsci.nl/2.8.3/usage/feedback/)

Sounds okay in theory, but I'm finding that it won't print the contents of an initial variable in this way. All of the other text appears and no error occurs, but instead of printing the contents of that variable, it only prints a blank space. I KNOW that OpenSesame records the response to the first variable, because the logger records the response in the output file.

Here's the relevant syntax for a variable named "target" in the initial question and called up by the second form and the logger. The logger has no trouble reading the "target" variable, but the form won't.

What am I missing here?

define form_text_input TargetSelect
    set rows "5;2"
    set cols "1"
    set form_question "Now, write the first name of that person in the box below."
    set form_var "target"
    widget 0 0 1 1 label center="no" text="[form_question]"
    widget 0 1 1 1 text_input focus="yes" stub="" return_accepts="yes" var="[form_var]"

define form_text_input Targ1
    set rows "4;3"
    set cols "1"
    widget 0 0 1 1 label center="no" text="Now, take a few moments to think about a personal experience in which you felt this way about your relationship with [target]."
    widget 0 1 1 1 text_input focus="yes" stub="" return_accepts="yes" var="Targ1"

define logger logger
    set ignore_missing "yes"
    set description "Logs experimental data"
    set auto_log "no"
    set use_quotes "no"
    log "target"

Comments

  • edited 2:21AM

    Hi,

    The problem is the time at which forms are prepared. OpenSesame uses a prepare-run strategy, which is explained here:

    In all likelihood, what happens is this:

    1. TargetSelect is prepared
    2. Targ1 is prepared
    3. TargetSelect is executed, collecting the variable target
    4. Targ1 is executed, but doesn't show target because it was prepared before this variable was collected.

    Does that make sense?

    What you could do to work around this is put both form items in a sequence of their own (so not in the same sequence). This helps, because, as described under the link I posted above, the prepare-run strategy occurs at the level of sequence items. Put diffrently, a sequence will prepare its items during its own run phase.

    Hope this helps!

    Cheers,
    Sebastiaan

  • edited 2:21AM

    Sebastian,

    Thank you for your help, that makes a lot of sense.

    However, I've tried putting each form item in a separate sequence in the study, but the problem persists. Is this because they are both in the same sequence at the level of the study? If so, is there any way around this?

    Am I missing something? Any other advice would be greatly appreciated!

  • edited 2:21AM

    I found a solution that works. Basically, I just had to put the separate sequences into their own separate loops (since loops aren't prepared beforehand). Each "loop" just runs once to go through the sequence.

    I hope this helps others who need to pipe text. Thanks again, Sebastiaan, for the advice!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games