java not working

zackon1's picture

hi my friend get this when opening comps my friend is running osx 10.4.11 with quartz 2.1.2 (17.2)

Window Outputs Cannot create connection from ["output" @ "Splitter_1"] to ["level" @ "JavaScript_1"]

Window Outputs Cannot create connection from ["output" @ "Splitter_2"] to ["backgroundColor" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["title" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["wx" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["wy" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["ww" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["wh" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["animate" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["fullscreen" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["opaque" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["ignoresMouseEvents" @ "JavaScript_1"]

Window Outputs Cannot publish input port ["hasShadow" @ "JavaScript_1"]

Window Outputs Cannot publish output port ["status" @ "JavaScript_1"]

Macro Patch State restoration failed on node "Patch_4"

App Outputs Cannot publish input port ["shouldTerminate" @ "JavaScript_1"]

App Outputs Cannot publish input port ["hideMouse" @ "JavaScript_1"]

App Outputs Cannot publish input port ["preferences" @ "JavaScript_1"]

App Outputs Cannot publish output port ["status" @ "JavaScript_1"]

Macro Patch State restoration failed on node "Patch_5"

Status Bar Cannot create node of class "QCAnchorPosition" and identifier "(null)"

Status Bar Cannot create node of class "QCAnchorPosition" and identifier "(null)"

Status Bar Cannot create node of class "QCNumberFormatter" and identifier "(null)"

Status Bar Cannot create connection from ["outputHeight" @ "TextImage_2"] to ["inputHeight" @ "AnchorPosition_2"]

Status Bar Cannot create connection from ["outputWidth" @ "TextImage_1"] to ["inputWidth" @ "AnchorPosition_1"]

Status Bar Cannot create connection from ["outputY" @ "AnchorPosition_1"] to ["inputY" @ "Billboard_3"]

Status Bar Cannot create connection from ["outputWidth" @ "TextImage_2"] to ["inputWidth" @ "AnchorPosition_2"]

Status Bar Cannot create connection from ["outputX" @ "AnchorPosition_1"] to ["inputX" @ "Billboard_3"]

Status Bar Cannot create connection from ["outputX" @ "AnchorPosition_2"] to ["inputX" @ "Billboard_1"]

Status Bar Cannot create connection from ["outputHeight" @ "TextImage_1"] to ["inputHeight" @ "AnchorPosition_1"]

Status Bar Cannot create connection from ["outputString" @ "NumberFormatter_1"] to ["inputString" @ "TextImage_2"]

Status Bar Cannot create connection from ["outputY" @ "AnchorPosition_2"] to ["inputY" @ "Billboard_1"]

Status Bar Cannot publish input port ["inputNumber" @ "NumberFormatter_1"]

Macro Patch State restoration failed on node "Patch_7"

Rotational Controls Cannot create node of class "QCSmooth" and identifier "(null)"

Rotational Controls Cannot create node of class "QCSmooth" and identifier "(null)"

Draggable Cannot create connection from ["outputResult" @ "Logic_1"] to ["inputSampling" @ "SampleHold_1"]

Draggable Cannot create connection from ["outputResult" @ "Expression_3"] to ["inputSampleValue" @ "SampleHold_2"]

Draggable Cannot create connection from ["output" @ "Multiplexer_1"] to ["inputSampleValue" @ "SampleHold_1"]

Draggable Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputSampling" @ "SampleHold_2"]

Rotational Controls State restoration failed on node "Patch_2"

Draggable Cannot create connection from ["outputResult" @ "Logic_1"] to ["inputSampling" @ "SampleHold_1"]

Draggable Cannot create connection from ["outputResult" @ "Expression_3"] to ["inputSampleValue" @ "SampleHold_2"]

Draggable Cannot create connection from ["output" @ "Multiplexer_1"] to ["inputSampleValue" @ "SampleHold_1"]

Draggable Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputSampling" @ "SampleHold_2"]

Rotational Controls State restoration failed on node "Patch_1"

Rotational Controls Cannot create connection from ["outputResult" @ "Expression_5"] to ["inputValue" @ "Smooth_2"]

Rotational Controls Cannot create connection from ["outputResult" @ "Expression_3"] to ["inputValue" @ "Smooth_1"]

Rotational Controls Cannot create connection from ["output" @ "Splitter_2"] to ["inputIncreasingDuration" @ "Smooth_1"]

Rotational Controls Cannot create connection from ["output" @ "Splitter_2"] to ["inputDecreasingDuration" @ "Smooth_1"]

Rotational Controls Cannot create connection from ["output" @ "Splitter_2"] to ["inputIncreasingDuration" @ "Smooth_2"]

Rotational Controls Cannot create connection from ["output" @ "Splitter_2"] to ["inputDecreasingDuration" @ "Smooth_2"]

Rotational Controls Cannot publish output port ["outputValue" @ "Smooth_2"]

Rotational Controls Cannot publish output port ["outputValue" @ "Smooth_1"]

Macro Patch State restoration failed on node "Patch_2"

URL of single recently-dropped file Cannot create connection from ["outputMember" @ "StructureMember_index_1"] to ["inputSampleValue" @ "SampleHold_1"]

URL of single recently-dropped file Cannot create connection from ["outputMember" @ "StructureMember_index_1"] to ["inputSampling" @ "SampleHold_1"]

Macro Patch State restoration failed on node "Patch_8"

Macro Patch Cannot create connection from ["status" @ "Patch_4"] to ["input" @ "_protocolOutput_NSWindow"]

Macro Patch Cannot create connection from ["Rotation_Y" @ "Patch_2"] to ["inputRotateY" @ "Camera_1"]

Macro Patch Cannot create connection from ["Height" @ "Patch_1"] to ["Window_Height" @ "Patch_4"]

Macro Patch Cannot create connection from ["Width" @ "Patch_1"] to ["Window_Width" @ "Patch_4"]

Macro Patch Cannot create connection from ["Y" @ "Patch_1"] to ["Window_Y_Position" @ "Patch_4"]

Macro Patch Cannot create connection from ["status" @ "Patch_5"] to ["input" @ "_protocolOutput_NSApplication"]

Macro Patch Cannot create connection from ["output" @ "Multiplexer_2"] to ["Window_Title" @ "Patch_4"]

Macro Patch Cannot create connection from ["X" @ "Patch_1"] to ["Window_X_Position" @ "Patch_4"]

Macro Patch Cannot create connection from ["outputProgress" @ "ImageDownloader_1"] to ["Percent_Complete" @ "Patch_7"]

Macro Patch Cannot create connection from ["Rotation_X_1" @ "Patch_2"] to ["inputRotateX" @ "Camera_1"]

(null) State restoration failed on

cybero's picture
Re: javascript not working

Firstly, it isn't the case that JavaScript isn't working as such, per se.

I think it is a versioning problem.

That said .....

If your friend can open any of the QC2 versions of JavaScript examples to be found on Cybero's JavaScript reference without any trouble, or run the Developer Tool examples that came bundled with Tiger that are using JavaScript, then your friend's installation of QC Framework and the QC application is doing exactly what it is meant to do, more likely than not.

Would you care to upload an example composition that is offending in the fashion you've reported please?

gtoledo3's picture
Re: java not working

It's too bad it cuts off at what patch/patches the state restoration failed on. That's where it's going to point to which patch or patches aren't actually loading.

cybero's picture
Re: java not working

Quote:
It's too bad it cuts off at what patch/patches the state restoration failed on.

That'll be down to the change between QC 2 and QC 3 and upwards framework versions. [Ah fond memories of Tiger indeed].

I was wondering if there weren't other plugins and patches involved ....

gtoledo3's picture
Re: java not working

I'm not sure about that, just looks like a cut and paste error of the exception. QC still says what patches restoration failed on.

But yeah, maybe that version of the js patch is no longer restoring.

dust's picture
Re: java not working

isn't the qc 2 java script patch totally different than the version we use now ? i would think that may be the problem ? you would more than likely need to use the old java script patcher which will load in a newer qc. maybe you should have your friend send you a js patch from qc 2 and then integrate that into your comp, then maybe he/she will be able to open ? thats just a guess qc 2 is way before my time... although i have seen older js scripts floating around.

cybero's picture
Re: java not working

Quote:
isn't the qc 2 java script patch totally different than the version we use now ?

It is indeed different in the way that it allows for [and requires] JavaScript functions to be written.

A versioning problem.

This is a matter , I would have thought, of versioning the JavaScript routines. from the QC 3 or upwards file, which routines could easily be read in a good text editor, from the QC 3 and upwards file and then recreating them in QC 2 compliant format on Tiger.

Both Tiger and post Tiger QC files can be read in a plain text editor.

You cannot achieve success by simply copying and pasting from between the <key>script</key> tag of the QC3 or upwards composition file back in between the <key>script</key> tags of the QC2 conformant composition file and then saving that file though.

Instead ...

Open the file in, say, Text Wrangler, [my preferred choice] and search for <key>script</key>, which is the tag that is at the beginnings of the script that wouldn't open up properly for you.

Copy and paste that into a blank text document.

Create a new blank text document for the creation of the QC2 conformant script.

Create that QC2 conformant script which you can usually do quite easily by the simple means of dropping the line beginning, no doubt with something like

function (__nameofdatatype outputname[number of outputs of given datatype]) main (__nameofdatatype inputname[number of inputs of given datatype])
  • in a rather long winded pseudo code style :-) that's drawing somewhat from memory, that might be playing me false in regards of any possible facility to set the number of outputs in QC2 - to be honest - just can't remember, it's been so long since I have used an installation of Tiger.

drop the use of

var result = new Object();

(although that does not hold universally true in regards of all QC2 JavaScript examples, see below this example). and then commence reproducing the other essential code listings in QC2 conformant format.

For instance.

Here is an actual QC3 conformant format for a pretty simple script.

function (__number outputNumber) main (__number inputNumber[1])
{
var result = new Object();
for (i=0; i<5; i++)
{
if (i == 2) continue; } 
result.outputNumber = i;
return result;
} 

and here it is in QC2 conformant format, which will work ....

for (i = 0; i <5; i ++) 
{( 
if (i == 2) continue; 
outputs [0] = i; 
} ) 

As you can no doubt see everything within the QC2 {} braces is pretty much the same as in the QC3 {} braces. I would advise you to refer to the Tiger Developer Tools examples and to the QC JavaScript guide I posted the link to previously.

Here's a QC2 example that does use  var result = new Object();

var result = new Object();
arbor = new Array ("oak", "maple", "beech", "pine", "fir"); 
delete arbor[3]; 
if(3 in arbor)
{ result.outputNumber = false; } 
else { result.outputNumber = true; } 
return result; 

Do you see what I've been driving at above zackon1 ?

Once you have arrived at your QC2 conformant format JavaScript, then you can achieve success by copying and pasting that into the JavaScript patch's editor window and allocating the number of inputs and outputs required which can be discerned from looking at the number in the [ ] brackets, if any, to be found in the function line in the QC3 JavaScript.

If you would be so kind as to post up the composition that is vexing your friend, I'd happily take a look at it.

gtoledo3's picture
Re: java not working

So, dudes, I may have missed it, but has anyone actually gone ahead and tested the older JS patch in ML to see if it restores outside of this composition or not? (I'm not booted in ML.) (Also, cwright's fisheye.qtz that's in the composition repository here has the old "plasma" patch. It may be interesting to see if that restores or not too.)

cybero's picture
Re: java not working

Yes - on both counts.

Except we don't actually have zackon1's problem case to test that JS patch out of it's original context.

What's more that JS patch is actually QC3+ type and is not - for obvious reasons - opening up right in a QC 2 editor.

However, in regards of if the old QC2 type JS patch opens in ML QC - see attached picture.

Likewise in regards of your other CI / GLSL / Plasma Image - Fisheye enquiry. [at least, I think that is opening up OK as it did in Tiger].

PreviewAttachmentSize
QC2JSPatchinML.png
QC2JSPatchinML.png149.84 KB
FisheyeinML.png
FisheyeinML.png80.51 KB
FisheyeinMLPlasmaImage.png
FisheyeinMLPlasmaImage.png143.17 KB