simple assignment of values to BPatcher attributes - patching_rect

    Jul 28 2011 | 2:09 am
    Have a bpatch, withing a bpatch that contains an LCD. Simply need to resize the larger window and internal bpatcher display/presentation.
    An old example of doing something similar, but it does not work with anything new.
    For example,
    ; scrollit offset $1 -100;
    works perfectly when passed to the internal LCD level where "scrollit" passes "offset $1 -100" to thispatcher.
    But, I can not find any reference of the object or attribute "offset" and do not understand how this ever worked (or still works).
    More importantly, from the top level UI, I need to click a button and simply expand the window from 400x400 to 800x600.
    How to modify Patching Rectangle and Presentation Rectangle?
    for the internal/nested BP and the top level?
    When trying to access "patching_rect" or "presentation_rect" the response is "No Such Object"
    When trying to pass numeric parameters to resize the space, the response is: "0: not a symbol" "1250" not a symbol"
    Thank you for assistance!

    • Jul 28 2011 | 2:31 am
      Perhaps an even simpler question:
      How to set the value of anything at all?
      Eg, no trouble getting messages to different layers of bpatchers, but can't seem to set any of the "settings" at runtime. background mode border hide on lock Patching Rectangle Presentation Rectangle etc...
      This must be a very simple...
      Thank you!
    • Jul 28 2011 | 6:27 am
      You cannot find any reference??? Its in the help file of bpatcher (subpatcher "more") and of course in the reference for bpatcher...
      For changing the main patcher size, have a look at [thispatcher] and the window messages...
      presentation_rect is a message which all objects understand btw...
      If you still do not understand what I am talking about, you missed the tutorials...
    • Jul 28 2011 | 8:32 am
      Thank you for your reply and aim to help.
      I have gone through the tutorials several times and apparently missing something – yet, unable to figure out what.
      Thousands of lines of my maxmsp code work perfectly, and this simple step seems so challenging…
      In sending hundreds of presentation_rect messages in various forms – all fail.
      The help for thispatcher “size” sends a message to a “variable-name,” though attempts to send to scripted variable names all failed as well as attempting to get it to re’size itself.
      In terms of an object oriented language… all I want to do is
      A.B.presentation_rect.x = 800; A.B.presentation_rect.y = 600;
      Have spent a day and a half trying to figure this out and poured over hundreds of pages of discussion and documentation. It must be a very simple step, but I have been unable to figure it out.
      Embarrassing that what should be a 30 second fix has consumed more than 12 of the last 24 hours and still at square one.
      Is there a specific tutorial you might recommend?
      Thank you….
    • Jul 28 2011 | 9:13 am
      This one is a little tricky. With a bpatcher, inlets are directly tied to the internal patch. You have to give your bpatcher a scripting name then use thispatcher scripting to set attributes.
    • Jul 29 2011 | 8:39 pm
      Chris' example is pretty boss. For those of you who may be wondering about how to send messages to a bpatcher *inside* a bpatcher, here's another example that may be clearer. I'm enclosing an example in a zipped archive
    • Jul 30 2011 | 8:34 am
      Thank you for the wonderful responses and help!
      thought might be helpful to others to also post this reply fron gregory in tech support using script sendbox...