Why specify the InputMask in the script when using goto after TextDisplay.run to terminate TextDispl

Paul Groot pfc.groot at gmail.com
Mon Aug 13 20:53:20 UTC 2012


Hi Jakob,

I'm not 100% sure about this, but my guess is that E-Studio generates code
where the inputmask of an object is initialized just before running
the object (you can check this in the full-script tab). And, since you run
the object explicitly in your own script in the try-again scenario, you
also have to initialize the inputmask explicitly yourself because the
generated initialization code is not yet called when you execute the
run-statement.

There are several workarounds for this. I will only explain a scenario that
doesn't use a goto-label, because goto's often have negative side effects.
My advise would be to put the practice block procedure in another  block
list that repeats several times (PracMasterList::Exit List = 999). Then,
instead of using a goto-label construct, simply call the terminate method
in case the ready-criteria are met (PracMasterList.Terminate)

If PracticeACC.Mean >= .80 Then
   EndPrac.Text = "Well done"
   PracMasterList.Terminate
else
   EndPrac.Text = "Try again"
end if

You might have to tweak other objects, such as the practice introduction
screen, to complete it: If the instruction should not repeat, then you can
simply place it before the practice master list. If the practice
instructions should repeat with different content, you could make use of a
Slide object having different tab's (SlideStates) with specific
instructions for the first and repeating runs. The Slide's ActiveState
property can be used to select the visible tab. The attached example shows
how you can do this. Sounds complicated, but is rather straightfoward
without additional inline script. *(In words: Define an attribute for
the active state in PracMasterList. Use the []-syntax to specify the name
of this attribute in the ActiveState property of the Slide. Set the list
ordering to sequential and include as many rows as required. Configure the
required active state for each row. Exit list should be reset to 1 cycle in
this case because the number of 'trials' determine how many times the
practice block.)*

Cheers,
Paul




2012/8/13 Jakob <jakob4resilience at gmail.com>

> Hello everyone!
>
> I would really appreciate if someone could help me understand the
> following:
>
> I have a conditional practice block with a script that displays one text
> in the following text-object if the accuracy-criterium is met. If the
> criterium is not met it displays another text in the same text-object and
> then jumps back to a label (goto). If the criterium is met everything works
> as intended. But in the case of the criterium not being met the text-object
> only terminates with input if I manually specify the InputMask for the
> text-object in the script, not if I merely specifiy the input in the GUI of
> the text-object (see below)
> I'd really like to understand this enigma! ;)
>
> Thanks in advance!
> Jakob
>
> Here is the relevant part of the experimental procedure and the script in
> question (CheckACC):
>
> --------------------------------------------------------------------------------------------------
> *PracticeBlockProcedure*
>
> *Setup* (Script that sets a Summation Variable)
>
> *PracticeInstruction* (TextDisplay Object)
>
> *Label2* (Label)
>
> *Reset* (Script that resets the Summation Variable)
>
> *Practice List* (List Object)
>
> *PracticeListProcedure*
>
> *PracticeDisplay* (ImageDisplay Object)
>
> *PracticeFeedback* (FeedbackObject)
>
> *AddObservation* (Script that adds the ACC of the PracticeDisplay to the
> Summation Variable so it can be compared to the criterium later on)
>
> *CheckACC* (Script that checks if the ACC criterium has been met and
> branches accordingly; *the line in question is in talics - see below*)
>
> *EndPrac* (TextDisplay Object that displays a text depending on the
> CheckACC script)
>
>
> --------------------------------------------------------------------------------------------------
> *
> *
> *CheckACC-Script:*
> If PracticeACC.Mean >= .80  Then
> EndPrac.Text = "Well done."
> Else
> EndPrac.Text = "Try again."
> *EndPrac.InputMasks.Add Keyboard.CreateInputMask("{SPACE}", "",
> CLng(Pause.Duration), CLng("1"), ebEndResponseActionTerminate,
> CLogical("Yes"), "", "", "ResponseMode:All ProcessBackspace:Yes")*
> EndPrac.Run
> Goto Label2
> End If
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "E-Prime" group.
> To post to this group, send email to e-prime at googlegroups.com.
> To unsubscribe from this group, send email to
> e-prime+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/e-prime/-/atKZiK1ES_MJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120813/03d66957/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConditionalPractice.es2
Type: application/octet-stream
Size: 43168 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120813/03d66957/attachment.obj>


More information about the Eprime mailing list