ubumenu and pattrstorage

    Mar 27 2006 | 5:04 am
    Hi guys/girls...
    I'm fairly new to the workings of Pattrstorage and its associated objects and am running into a problem getting it to function how I would like with ubumenu.
    I am using ubumenu to store a list of file paths in several seperate patchers. Instead of having to manually save each ubumenu file I would like to do it in one fell swoop which will probably entail pattrstorage. Ideally I would like pattrstorage to represent exactly what is in my ubumenus, that is if I remove or add an index or clear the an entire list of items within ubumenu pattrstorage will represent this change. But... pattr seems to only "see" the value of the current index and not the others in the ubemenu and therefore can only be updated one item at a time. This is a pain and makes it difficult to sync the two objects...
    Can I get around this and achieve my desired result? Do I have to resort to all sorts of data manipulation chaos at the hands of coll? Am I missing or misunderstanding something? HELP!

    • Mar 27 2006 | 8:37 am
      Maybe I'm misunderstanding the problem, but you want pattrstorage to remember _all_ of the values in the ubumenu? Or you want pattrstorage to remember the item in the ubumenu based on its name, rather than on its index. If the latter, send the message "pattrmode 1" to ubumenu. If the former, you'll need to use a coll or something to back up the contents of your menu. pattrstorage won't do what you want here.
    • Mar 27 2006 | 4:08 pm
      I was trying to describe the 1st situation you mentioned...
      I was affraid that is what the answer would be. Any idea of whether pattrstorage will ever be able to store data structures or lists or things of that sort or is coll the dedicated alternative?? Would this be too much to ask computationally speaking?
      Thanks Jeremy!
    • Mar 27 2006 | 8:22 pm
      It has nothing to do with pattrstorage's storage capabilities, but rather with this abstract notion of "value". The "value" of an ubumenu is not the list, but the item in the list (whether by index, in the case of a static list, or by name, in the case of a more dynamic one). If someone were to make a menu object, for which the "value" were defined as the list itself, pattr/storage could handle it.
      For now, I would make friends with coll.
    • Mar 27 2006 | 11:42 pm
      Gotcha...coll it is!
    • Mar 28 2006 | 4:15 pm
      Here is one idea..... haven't finished it completely, but it could easily be made functional.... it remembers only the items in the menu at this point....
      you could make the last item in the array 'the currently selected item'....then it would do what you wan't (i guess:-)
    • Mar 28 2006 | 10:08 pm
      looks interesting, but I couldn't get your text into a patcher.
    • Mar 29 2006 | 12:23 am
      Just copy the text.... goto the maxMSP menubar and select 'New From Clipboard'......