Re: Recursively searching for named object


Forums > Javascript > Recursively searching for named object

Nat
Mar 08 2013 | 5:09 pm

Guys,

This is much easier to do with the applydeep function:

-- Pasted Max Patch, click to expand. --

autowatch = 1;

var scripting_name = null;

function findObject(obj)
{

if (obj.varname == scripting_name)
{
post(obj.varname);post();
post(obj.maxclass);post();
}

}

function find(_scripting_name)
{
scripting_name = _scripting_name;
this.patcher.applydeep(findObject);
}

Attachments:
  1. objTest2.js

Subscribe to the Cycling ’74 Weekly Newsletter

Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.

* indicates required