Set keys without knowing the structure of the dictionary in js. Help!

Jun 15, 2012 at 1:22pm

Set keys without knowing the structure of the dictionary in js. Help!

I built a patch to write keys of any depth into a dictionary. The trick is to check if the dictionary alreday exists; if not, create a new one, set it as a value of a key and refer to the key in a dict obj with: “name u*****(name of the key)” in the first inlet of dict. Now, i tried to code it in javascript, because im not safisfied with the result and its easy to do loops in contrast to max, but im not able to refer to an dict object only to copy it.

– Pasted Max Patch, click to expand. –

autowatch = 1;
outlets = 1;

function set(){

var what = new Array ();
var keys = new Array ();
var bol = true;
what = arrayfromargs(arguments);
var dict = new Dict(what [0]);

for (i=1; i

#46589

You must be logged in to reply to this topic.