How to remove an object in the patcher from JAVA ?

    May 30 2012 | 11:59 am
    Calling/placing my set of abstraction from JAVA in the patcher, I'd need also to remove them.
    Does it exist a "remove" method as in JS ?

    • May 30 2012 | 12:01 pm
      sorry answering to myself for reference purpose:
      remove() exists basically & obviously :)
    • Feb 20 2013 | 10:00 am
      Hey Julien, can you give me a short workaround about the delete method? I read the api ad tried out several versions in java but it doesn't work. In js it was really easy but in java i didn't get it working. that is my simple code, i am working on. thanks
      import com.cycling74.max.*;
      class Verschaltung extends MaxObject{ MaxPatcher p = getParentPatcher();
      public Verschaltung() {
      public void create(int x,int y){ MaxBox b11 = p.newDefault(20,20,"toggle",null); MaxBox b21 = p.newDefault(50,20,"toggle",null); MaxBox b31 = p.newDefault(80,20,"toggle",null); MaxBox b41 = p.newDefault(x, 80, "flonum", null); MaxBox b51 = p.newDefault(20, y, "number", null); MaxBox b61 = p.newDefault(20, 400, "pak", null); } public void deleteAll(){ MaxPatcher.remove(b11); }
    • Feb 20 2013 | 2:13 pm
      OK, i figured it out, how to remove an object. But now i have my number box and want to initiate it with an value. I created an Atom[] of the length 1 and filled it with "1". But the value doesn't change in the maxpat.