Best way to pass-through a list based on last-entry match
I'm sending a list from one plugin to another, consisting of a value and an ID. I want to pass through the value, as long as the ID is a match. What's the most efficient way to do this? Currently it's like this (attached)
It works, the only problem is that sometimes I'm sending a bunch of these out rapidfire, and it keeps confusing values.. as in, plugins with one ID are reacting to values meant for another ID. I've tried to think of a way to use zl for this but I'm drawing a blank.
What do you guys think?
I'd reverse the list and route it by id.
It seems that yhe route object doesnt accept "set" messages to change the argument.. the ID is user-assigned so I need that.. are there any other options you can think of?
This will work with a list of any length, or really any message for that matter, that ends with the specified ID.
You don't need a set message to change the message selector of route.
Chris-- That's essentially how I have it already, except you're using zl instead of unpack. The problem here is that the operation of approving the ID, with this configuration, takes too long and if i send 20 lists out rapidfire, it confuses them and lets through the wrong values. or does using zl help with that somehow?
Rick -- I don't see anything where you can change the route argument in that patch. I'm using max 5 though, btw
The example patch you posted works for me, as does my patch, so if you're experiencing problems with dropped messages in a more complex patch, I suspect the bug is elsewhere. If you want to test my patch, save it in the Max File Search Path with the name 'IDapproval', then use this test patch.
Yup, that's where the rub is. In max 6 route has changeable arguments.