Yes I forgot to connect output ports to other patches! Thanks

Subject: Re: structures in input port javascript path
From: [email protected]
Date: Fri, 6 May 2011 11:44:35 +0200
CC: [email protected]
To: [email protected]



Hello Nisar,
did you make sure that your JavaScript patch gets executed? It's output has to 
be connected to something that is necessary for rendering otherwise the patch 
don't get executed and the inputs don't change. You also can check this by 
selecting the Debug Mode in the Viewer window.
Is it possible for you to post your composition so we can have a look?
best,
Achim BreidenbachBoinx Software
On 06.05.2011, at 11:35, Nisar Ahmed wrote:I am trying to take structure as 
input of a javascript patch but getting nothing during execution.
The structure input port is connected with the output port of another path that 
outputs a 2 dimensional structure with first dimension as indexed and second is 
keyed. During execution when I hover my mouse cursor over output port it shows 
the members and keys but the input port of my script patch is always blank. 
What do I do to make it work please help!
Below is the code
function (__structure transformedCursors, __index count) main (__structure 
inputCursors){       var result = new Object();      var xpos, ypos, xspeed, 
yspeed; var touchPoints = new Object(); if(inputCursors != null)        {       
        if(inputCursors.length >= 1)                    touchPoints = 
inputCursors[0];                                  if(inputCursors.length >= 2)  
          {                                       touchPoints.xpos = 
(inputCursors[0].xpos + inputCursors[1].xpos)/2                      
touchPoints.ypos = (inputCursors[0].ypos + inputCursors[1].ypos)/2              
        touchPoints.xspeed = (inputCursors[0].xpos + inputCursors[1].xspeed)/2  
                touchPoints.yspeed = (inputCursors[0].xpos + 
inputCursors[1].yspeed)/2          }       
                if(inputCursors.length >= 3)            {                       
                touchPoints.xpos = (inputCursors[0].xpos + inputCursors[1].xpos 
+ inputCursors[2].xpos)/2                       touchPoints.ypos = 
(inputCursors[0].ypos + inputCursors[1].ypos + inputCursors[2].ypos)/2          
             touchPoints.xspeed = (inputCursors[0].xspeed + 
inputCursors[1].xspeed + inputCursors[2].xspeed)/2                       
touchPoints.yspeed = (inputCursors[0].yspeed + inputCursors[1].yspeed + 
inputCursors[2].yspeed)/2               }       
                result.count = inputCursors.length;
        }       result.transformedCursors = touchPoints;        return result;}
ThanksNisar_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com

This email sent to [email protected]

                                          
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to