200 ui objects... And I don't want 200 pvar's.


    Mar 04 2008 | 7:10 pm
    Hello,
    Is it possible to avoid creating 200 pvar's (one for each UI object)...
    I definitely don't want the max 5 solution either in case you mention that. In fact I don't want any "corresponding" object at all.
    but rather instead...
    Is it possible that I could simply receive from the whole group of objects, all at the same time? ..receive a message from any of them which comes out of a single objects outlet? Which I could then route...
    Such as:
    [objectclass] [objectname] [message]
    so, ie,
    toggle foo_Mp_blues 1
    button arg_9_check bang
    At the moment I had to create 200 pvar's like so:
    pvar foo
    |
    prepend foo
    It's annoying...
    Hope someone can help!
    This would really really simplify every single one of my UI's in max... I simply want MESSAGES I can route.. not a zillion pvars.
    I'd like to be able to select different bunches of objects and assign them each to individual 'scopes' so that their route messages all come out of a certain outlet or are associated with a particular prepended symbol which I can then route...
    - Glot

    • Mar 04 2008 | 7:33 pm
      yes.
      pattrstorage with autopattr.
      set output mode to 1.
    • Mar 04 2008 | 7:51 pm
      Rob,
      damn... that was ALMOST a really good solution.
      Unfortunately it's not working with any of my UI objects.
      They are buttons and ksliders... What can be done?
      Thanks,
      - Glot
    • Mar 04 2008 | 8:24 pm
      It will work just fine!
    • Mar 04 2008 | 8:35 pm
      Mr. Leafcutter,
      The kslider doesn't recall orshow up at all in clientwindow,
      The LED's work, though.
      - G
    • Mar 04 2008 | 8:54 pm
    • Mar 04 2008 | 9:07 pm
      On Mar 4, 2008, at 12:35 PM, Glot wrote:
      > The kslider doesn't recall orshow up at all in clientwindow,
      Works for me.
      Chris Muir
      cbm@well.com
    • Mar 04 2008 | 9:27 pm
      How can I access the Buttons remotely? Regular old buttons...
      So it's working for everything except those, and it feels very odd to have the whole patch using a pattr system, but then make a special case scenario and add a ton of pvars for the Buttons only...
    • Mar 04 2008 | 9:34 pm
      On 4 mars 08, at 22:27, Glot wrote:
      > How can I access the Buttons remotely? Regular old buttons...
      > So it's working for everything except those, and it feels very odd
      > to have the whole patch using a pattr system, but then make a
      > special case scenario and add a ton of pvars for the Buttons only...
      Could you post a small example of what you want to achieve?
      ej
    • Mar 04 2008 | 9:43 pm
      EJ,
      It should be simple to describe:
      I have a UI, with:
      buttons, check boxes, numboxes
      Each element on the UI is a named object.
      Rather than make a ton of pvars, Rob posted a good solution. I can use @outputmode with pattrstorage and autopattr. This allows me to get a message from pattrstorage with the name of the object and its value.
      Extending this, I have put "classnames" in front of thte object names, like naming something: group1_foo. I then use jasch's strcut and strstr to detect the "group1_" part, remove it, and then route the message appropriately based upon its group. So it routes it based upon the start of the symbol.
      The problem is that while everything is working, I can't get messages from pattrstorage @outputmode for any of the bang buttons, because pattrstorage doesn't support those. It makes the whole routing thing very uneven.
      Hope this explains it,
      - Glot
    • Mar 04 2008 | 9:51 pm
      On Mar 4, 2008, at 1:27 PM, Glot wrote:
      > How can I access the Buttons remotely? Regular old buttons...
      pattr was designed to save state, and buttons don't have a state, so I
      think you're out of luck.
      Chris Muir
      cbm@well.com
    • Mar 04 2008 | 10:09 pm
      On 4 mars 08, at 22:51, Chris Muir wrote:
      > pattr was designed to save state, and buttons don't have a state, so
      > I think you're out of luck.
      Exactly. If you can convert button to a state, you can make it.
      ej