dynamically created List only operates for level 1

ben robinson baltimore.ben at gmail.com
Thu Oct 6 17:30:09 UTC 2011


don't forget to add TrialList.Reset after adding all those levels.
hope that helps.

On Thu, Oct 6, 2011 at 11:53 AM, JACanterbury <jacanterbury at gmail.com> wrote:
> Hi
>
> I'm setting up my TrialList to have only 1 level and then building it
> on the fly something like this ...
>>>>>>>>>>>>>>>>>>
> for index = 1 to NUMBER_OF_TRIALS
>
>        TrialList.setProc index, "TrialProc"
>        TrialList.setWeight index, "1"
>        TrialList.setAttrib index, "response", responses( index )
>        TrialList.setAttrib index, "image", "images\\" & images( index )
>        TrialList.setAttrib index, "delay", Random( interval_min,
> interval_max )
>
>
>        if index < NUMBER_OF_TRIALS then
>                TrialList.AddLevel index + 1    ' add the next level to the list
> ready for the next loop iteration
>        end if
>
> next
>
> debug.print "TrialList size = " & TrialList.Size
>>>>>>>>>>>>>>>
>
> this code all works fine and adds the extra levels and the final
> debug.print displays the correct value (50 in this case) however the
> script then only performs 1 iteration so it seems to ignore all the
> extra levels that have been dynamically added.
> Interestingly, if I add an extra level ie level 2) manually  before
> running this code (with the approp tweak to stop AddLevel complaining)
> then the list operates for level 1 & level 2.
>
> It's as if e-prime is using the startup value for the list size and
> ignoring what has happened at run time.
>
> Any ideas would be appreciated ( i'd rather keep it dynamic if
> possible)
>
> Thanks
>
> --
> 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 this group at http://groups.google.com/group/e-prime?hl=en.
>
>

-- 
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 this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list