Multiple instances of an embedded patcher object
I’m working on a pretty massive patch that makes heavy use of a custom database that I wrote. It’s essentially a wrapper around a central [coll] that allows me to query and edit the data in a multitude of patch-specific ways.
The problem I’m running into is that I have multiple instances of this database spread throughout my patch for easy access and querying one outputs out of all instances in the patch which obviously causes issues. I’ve worked around this by gating the output from an instance of the database to only be open for a query to that particular instance, but this is getting increasingly messy as the patch grows and this technique has stopped working reliably.
I feel like there has to be something (obvious?) I’m missing here and any suggestions or insights would be greatly appreciated.
Thanks in advance.
Can you post (part of) your patch to illustrate the problem? All colls that are named the same share their data, so you can query an instance in one place and not have it output in another place.
The patch is a little too big/unwieldy to put up here but I’ll attach an example that demonstrates my problem and see if I can better describe it. I guess my issue is that I’m treating a patcher like I would a coll (where I can have many instances that share data but behave independently) but it’s not really working.
So for example, let’s say I have a database named [databox] that is basically a system wrapped around a coll named [coll databox] that allows me to edit and query the data in the [coll] in desirable ways. Due to the logic of my patch, I have 3 instances of [databox] in my patch that I want to act independently of each other but still share the data in [coll databox].
My problem is that I send
can you post the dotbox0 patch?
Appreciate the help on this, but I figured my problem out… there was a send object a few layers deep in [dotbox] that was pinging a receive object in another layer. These there then of course getting sent to all like-named objects across the patch and causing undesirable output in certain cases.
Lesson: Don’t use send/receive in a patch you intend to use multiple instances of in another patch. :P
Or prefix your send/receive name with #0
Didn’t know that trick… many thanks.
Forums > MaxMSP