Forums > Java

Traverse like in JS

May 1, 2009 | 5:17 pm

in js you have the code below utilizing the patcher.box property
that’s not available in java?

prev = 0;
owner = this.patcher.box;
while (owner) {
prev = owner;
owner = owner.patcher.box;
}
if (prev)
post("top patcher is",prev.name);

May 4, 2009 | 10:04 am

Have a look to:

public MaxBox getMaxBox()

in the MaxObject class.


May 4, 2009 | 11:46 am
Emmanuel Jourdan wrote on Mon, 04 May 2009 04:04
Have a look to:

public MaxBox getMaxBox()

in the MaxObject class.

EJ I apologize. what I meant is that there is no

patcher.getMaxBox()// wont compile

or

patcher.getParentPatcher()  // wont compile

so I can find out what patcher my Mobj is in. but not what patcher that PATCHER is in.


Viewing 3 posts - 1 through 3 (of 3 total)