Bpatcher and rect


    Feb 22 2014 | 10:58 pm
    Hi there,
    I need some help getting both the presentation rectangle and the patching rectangle attributes of a bpatcher. I know this topic has been addressed already here over and over again, but it didn't work for me.
    If I have a bpatcher called "bpatcher", then in js: bpatcher = this.patcher.getnamed("bpatcher"); bpatcher.getattr("presentation_rect"); //is null bpatcher.getattr("rect") //is set, seems absolute on screen. bpatcher.rect //is set, seems relative to the current window.
    How can I get both the presentation and the patching rectangle of a bpatcher?
    Thanks for your time, PS: I was able to set those attributes, via this.patcher.message("script", "sendbox", p.varname, "presentation_rect",0,0,100,100);

    • Jan 24 2016 | 7:01 pm
      in case anyone is still looking:
      bpatcher.box.rect will get you this.
    • Jan 24 2016 | 8:54 pm
      or if you need presentation_rect to change:
      this.message("script","sendbox","bpatcher","presentation",0); this.getnamed("test").subpatcher().box.rect=[0,0,600,100]; this.message("script","sendbox","bpatcher","presentation",1);
    • Sep 16 2017 | 1:28 pm
      wait, really? You can't just set the presentation_rect attribute?! wtf?