function get_top_level_patcher() { var p = this.patcher; while (p.parentpatcher) // If I have a parent, keep going up { p = p.parentpatcher; } return p; // var prev = 0; // var owner = this.patcher.box; // while (owner) { // prev = owner; // owner = owner.patcher.box; // } // if (prev) // // post("top patcher is",prev.patcher.name); // return prev.patcher; }