Creating new objects in max with java in presentation mode


    Dec 15 2011 | 1:17 pm
    Hi all, new to using java in max and am stuck so would really appreciate some help.:)
    I have created a patch where an instance of js creates a user defined number of toggles. I used 'this.patcher.newobject' to create the toggle but I have no idea how to create the toggle so it appears in presentation mode.
    Cheers

    • Dec 15 2011 | 1:52 pm
      This is a javascript question regarding [js] rather than a java question (which would use [mxj]), next time the javascript forum is the place to post otherwise people might miss your questions!
      You should be able to modify the "hidden" attribute directly after creating it:
      this.patcher.newobject("toggle").hidden = 1;