define slide images inline - need to clear after each trial?

jotaylor2306 at gmail.com jotaylor2306 at gmail.com
Fri Aug 8 11:45:05 UTC 2014


Well I guess I'll reply to my own question now that I've solved my problem!

>> It turns out that it wasnt that I needed to clear my images or set them 
to nothing, but that I was "drawing" each slide twice. In each inline I had 
the following piece of code: 

slImage.Filename  = c.GetAttrib("LocChose1")  & ".tif"
slImage.Load
stimslide2.Draw

I didn't need the line stimslide2.Draw because I had stimslide2 in my 
procedure and thus I didnt need to "Draw" it.
So each trial I was "Drawing" (i.e. presenting) each  stimslide twice and 
the first time it still had the attributes from the previous trial.

______________

On Tuesday, August 5, 2014 3:57:11 PM UTC+1, jotayl... at gmail.com wrote:
>
> Hi there,
> I have a spelling task in which participants listen to a 3 phoneme word 
> (consonant-vowel-consonant) and must select which 3 (from an array of 16) 
> symbols spell that word, in the correct order.
> They should see each selection appear on the screen, and after all 3 
> symbols have been selected they should see the correctly spelled word 
> alongside their own selections and receive correct/incorrect feedback.
> They are spelling them in a new script they have learned so I can't use 
> keyboard input as they are not Latin letters.
>
> I have programmed the task by having each trial contain 4 slide objects:
> stimslide1. Shows the array of symbols - same layout each trial
> stimslide2. Shows the array of symbols - plus the symbol they selected on 
> Slide 1
> stimeslide3.  Shows the array of symbols - plus the symbols they selected 
> on Slide 1 and Slide 2
> stimslide4. Shows the array of symbols - plus the symbols they selected on 
> Slides 1, 2, and 3. And also shows the correctly spelled word and a text 
> object saying whether their spelling was correct or incorrect.
>
>
> The inline code I have used to determine which slide image they selected 
> (which is placed after stimstlide1 in the trialproc) is pasted below.
>
>
> The problem I am having is that after trial 1, the image selections from 
> the previous trial are displayed very briefly (i.e. they flash up) before 
> the image selections from the current trial.
> I am aware that I must need to clear the images from each trial, but can't 
> figure out how to do so. I have the line  Set s1Image = Nothing as this 
> seems to be good practice but tbh I am not sure what it does as this doesnt 
> do what I would want it to do!
>
> I have also tried adding an inline at the end of the trialproc that says 
> s1Image.clear but I got a runtime error (Object variable or With block 
> variable not set).
>
> Could someone please tell me the proper way to clear images from trial to 
> trial?
> Thanks,
> Jo
>
>
>
> 'This section determines which image they clicked on.
> nCurrentResponse=0
> bContinue=True
>
>
> While bContinue<>False
>
> If stimslide1.InputMasks.Responses.Count<>nCurrentResponse Then
> nCurrentResponse=nCurrentResponse+1
>
> Set 
> theMouseResponseData=CMouseResponseData(stimslide1.InputMasks.Responses(nCurrentResponse))
> If Not theMouseResponseData Is Nothing Then
>
> strHit=stimslide1State.HitTest(theMouseResponseData.CursorX,theMouseResponseData.CursorY)
>
> If strHit<>"" Then
>
> Set theSlideImage=CSlideImage(stimslide1State.Objects(strHit))
> If Not theSlideImage Is Nothing Then
>
> bContinue=False
>
> ' this creates an attribute called LocChose1 that contains the Name of the 
> Image they selected which is the same as its actual file name.
> c.SetAttrib "LocChose1", strHit
>
> If c.GetAttrib("LocChose1") = c.GetAttrib("Correct1") Then
>  CountAcc=CountAcc+1
> End If
>
> End If
> End If
> End If
> End If
>
> ' This section tells the programme to display the image they clicked on on 
> the next slide (stimslide2) in the image called "Selection1" which by 
> default is set to be a blank bmp file.
> Dim  slImage as SlideImage
>      
>   Set slImage = 
> CSlideImage(stimslide2.States("Default").Objects("Selection1")) 
>      
> ' This retrieves the LocChose1 attribute which was the image they selected 
> and adds the file extension so that the image can be displayed 
> slImage.Filename  = c.GetAttrib("LocChose1")  & ".tif"
> slImage.Load
> stimslide2.Draw
>         Set s1Image = Nothing 
>
> Sleep 100
> WEnd
>
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/9cf68c2d-af89-460e-90b2-edd17fb28cbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20140808/b5119fb3/attachment.htm>


More information about the Eprime mailing list