Cannot bind subpatcher's pattr to object in main patch


    Dec 12 2006 | 4:24 pm
    Hello,
    In order to clean my main patch I want to put all my pattr
    objects inside a subpatch. However I cannot manage to bind the
    pattr object to any object in the main patch (Max 4.6.2).
    The help patch for pattr has an example of a downward binding
    but there is no example about upward binding. Should I use an
    "up::" message ? Also the following explanation found in the
    help patch is not clear: "If nested inside of a patcher,
    abstraction, bpatcher or poly~, pattr objects will auto-name
    their parent patcher based on the name of their associated
    argument/file name or, failing that, based on their object
    type (e.g. 'bpatcher[2]')."
    The following patch shows this problem (save as "pattr_test")
    Of course I could use one autopattr to replace many pattr but
    I do not want to save data for all my UI objects or having to
    send tens of the "active" message.
    So is it possible to achieve this or not?
    thank you for helping.
    Roald Baudoux
    max v2;

    • Dec 12 2006 | 5:05 pm
      I think you want something like
      [pattr param1 @bindto parent::myswitch]
      I'm pretty sure it's in the docs somehwhere, can't remember where though.
      hth
      Owen
      Roald Baudoux wrote:
      > Hello,
      >
      > In order to clean my main patch I want to put all my pattr
      > objects inside a subpatch. However I cannot manage to bind the
      > pattr object to any object in the main patch (Max 4.6.2).
      >
      > The help patch for pattr has an example of a downward binding
      > but there is no example about upward binding. Should I use an
      > "up::" message ?
    • Dec 12 2006 | 7:38 pm
      Owen Green wrote :
      >
      >I think you want something like
      >
      >[pattr param1 @bindto parent::myswitch]
      Indeed, it works perfectly!
      Thanks.
      Roald Baudoux
    • Dec 12 2006 | 8:42 pm
      use the "parent" keyword, e.g. parent::someobject or
      parent::parent::someotherobject or
      parent::otherpatcher::yetanotherobject
      And I just added some text about this to the reference manual
      yesterday for an upcoming version! how prescient!
      jb
      Am 12.12.2006 um 17:24 schrieb Roald Baudoux:
      > The help patch for pattr has an example of a downward binding
      > but there is no example about upward binding. Should I use an
      > "up::" message