-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrol_dump.js
More file actions
43 lines (33 loc) · 811 Bytes
/
Copy pathcontrol_dump.js
File metadata and controls
43 lines (33 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// gets dictionary -- returns all headers
var myval=0;
outlets = 2;
if (jsarguments.length>1)
myval = jsarguments[1];
function bang()
{
outlet(0, myval);
}
function dictionary(data)
{
post("getting dict" + "\n");
var oldDict = new Dict(data);
post(oldDict.getsize("array") + "\n");
var controllength = oldDict.getsize("array") ;
outlet(1, controllength);
outlet(0, 'clear', 'all');
for(i = 0; i < controllength; i++){
var s = [];
// why doesn't max's js allow for modern concatentating and for loops??
// var newArray = oldDict.get("array["+i+"]");
var element = oldDict.get("array["+i+"]");
s.push('set');
s.push(0);
s.push(i);
s.push(element.get("header"));
var z = arrayfromargs(s);
outlet(0, s);
}
}
function noHeader(){
outlet(1, '-err, no control header, yet');
}