slide show

13 views
Skip to first unread message

Heidi Vuletich

unread,
Apr 30, 2025, 2:01:21 PMApr 30
to min...@googlegroups.com
Hello,

I am trying to create a slide show in Minno and followed the instructions in the documentation to arrive at this code: 

define(['timeAPI'], function(APIconstructor) {

      var API = new APIconstructor();

            API.addCurrent({
                  baseURL: '/implicit/user/awinegar/trans_bias_ma/images/'
            });
            
      /**
      * Slide prototype
      */

    API.addTrialSets('slide', [
        {
            stimuli: [
                {media: {word: 'Imagine that you live in an area that regularly displays these types of messages.'}, css: {color: 'black', 'font-size': '2em'}}
            ],
            input: [
                {handle:'space', on: 'space'}
            ],
            interactions: [
                {conditions: [{type:'inputEquals', value:'space'}], actions: [{type:'endTrial'}]}
            ]
        }
    ]);

//Sequence//
    API.addSequence([
                  {
                        inherit:'slide',
                        layout: [{media :{image:'<img class="img-responsive" src="<%=current.baseURL%>A1.jpg">'}}]
                  },
                  {
                        inherit:'slide',
                        layout: [{media :{image:'<img class="img-responsive" src="<%=current.baseURL%>A2.jpg">'}}]
                  },
                  {
                        inherit:'slide',
                        layout: [{media :{image:'<img class="img-responsive" src="<%=current.baseURL%>A3.jpg">'}}]
                  },
                  {
                        inherit:'slide',
                        layout: [{media :{image:'<img class="img-responsive" src="<%=current.baseURL%>A4.jpg">'}}]
                  }
    ]);

    return API.script;
});


However, I keep getting this error (and nothing is loading): 

Failed to inherit Query failed, object ({"set":"slide","type":"random"}) not found. If you are trying to apply a template, you should know that they are not supported for inheritance.

Any help would be appreciated!

Best,
Heidi

Yoav Bar-Anan

unread,
May 3, 2025, 11:58:54 PMMay 3
to Heidi Vuletich, min...@googlegroups.com
Hi Heidi, 

Here is the revised code for a working example.

Below I explain a few problems with the original code:

On Wed, Apr 30, 2025 at 9:01 PM Heidi Vuletich <Heidi.V...@du.edu> wrote:

define(['timeAPI'], function(APIconstructor) {

      var API = new APIconstructor();

            API.addCurrent({
                  baseURL: '/implicit/user/awinegar/trans_bias_ma/images/'
            });
YBA: Instead of adding that to Current, it is better to use Minno time's built-in setting that determines where to take images from:
 API.addSettings('base_url','/implicit/user/awinegar/trans_bias_ma/images/');

     
    API.addTrialSets('slide', [
        {
            stimuli: [
                {media: {word: 'Imagine that you live in an area that regularly displays these types of messages.'}, css: {color: 'black', 'font-size': '2em'}}
            ],
            input: [
                {handle:'space', on: 'space'}
            ],
            interactions: [
                {conditions: [{type:'inputEquals', value:'space'}], actions: [{type:'endTrial'}]}
            ]
YBA: You never showed the stimulus. You need to use the action showStim at the beginning of the trial, to show the stimulus.
Like so:
             {//Show the text at the beginning of the trial.
conditions: [{type:'begin'}],
actions: [{type:'showStim', handle:'All'}]
},

Here, we use 'All' to show all the stimuli in the stimuli array. Typically, you will define a stimulus handle and use it in showStim. 
To learn how one would typically go about a bit more complicated presentation task, you can have a look at this short and simple Evaluative Conditioning Procedure script.

        }
    ]);

//Sequence//
    API.addSequence([
                  {
                        inherit:'slide',
                        layout: [{media :{image:'<img class="img-responsive" src="<%=current.baseURL%>A1.jpg">'}}]

YBA: Here, the value for "media" show be only the url for image. Typically, it will include only the image file name because one would set the url to the image folder in the settings at the beginning of the script, like so:
 API.addSettings('base_url','/implicit/user/awinegar/trans_bias_ma/images/');
 
You can also enter a complete url, but I don't think that you can enter an HTML code like you did here. 

Good luck,
Yoav

Yoav Bar-Anan

unread,
May 4, 2025, 12:00:39 AMMay 4
to Heidi Vuletich, min...@googlegroups.com
* Again, with a correction of the first link

Heidi Vuletich

unread,
May 5, 2025, 2:57:45 PMMay 5
to Yoav Bar-Anan, min...@googlegroups.com
Dear Yoav,

Thank you so much! We will implement new code and let you know how it goes!

Best,

Heidi


From: Yoav Bar-Anan <bar...@gmail.com>
Sent: Saturday, May 3, 2025 10:00 PM
To: Heidi Vuletich <Heidi.V...@du.edu>
Cc: min...@googlegroups.com <min...@googlegroups.com>
Subject: [EXTERNAL] Re: [Minno.js] slide show
 
[External Email From]: bar...@gmail.com


Heidi Vuletich

unread,
May 9, 2025, 3:19:16 PMMay 9
to Minno.js
Hello, 

Unfortunately, we are still encountering issues with this code. Here's the error message we get: 

pi-minno.js:16 Error: Query failed, object ({"set":"slide","type":"random"}) not found. If you are trying to apply a template, you should know that they are not supported for inheritance.
    at https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:25:81284
    at t (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:25:81909)
    at r.inflate (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:25:79497)
    at t.current (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:25:78996)
    at t.current (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:29:22605)
    at t.current (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:29:26606)
    at f (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:29:35639)
    at link (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:29:36077)
    at O (https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:16:34553)
    at https://cdn.jsdelivr.net/gh/minnojs/minno-quest@1.0/dist/pi-minno.js:16:28975 <div pi-timer="" pi-quest="" class="ng-scope">

I do not see any "type" or "random" code, so I'm confused as to where this is coming from. Could there be an issue in our manager file?

Thank you!
Heidi 

Yoav Bar-Anan

unread,
May 11, 2025, 2:59:14 AMMay 11
to Heidi Vuletich, Minno.js
Hi Heidi, 

The default type is 'random' and 'slide' is the name of the trial that is being inherited in the code. When I run the code I sent you there are no such problems. 
You can run it and see the whole study from here, to compare with what you've got and possibly find the difference. If it seems like there is no difference, you can try to copy my mgr.js and slideshow.js files and run them from your own study, to see that it works and then use that as the basis for your study. 

If you can't figure it out, please send me a link to your study and I'll try to figure it out.

Yoav

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/minnojs/98a8175a-7d2c-4072-b48a-49f10bff573cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages