Spent half the weekend making an abstraction I'm not sure I'll use - I'm sure many of you will be familiar with it.
My purpose: an abstraction that allows patchers to check after loading if there's already a patcher open doing something similar. If there is, maybe it will close itself or maybe it will just display a warning, I don't know yet.
The idea is you place a copy of 'OneCopyControl' in your patcher and feed it with an ID string. the ID string indicates what the patcher it is place in is supposed to do. Eg I will [loadmess M4L_IO] for patchers that communicate with M4L. When such a patcher loads it will check if there are any other patchers running with the 'M4L_IO' and if there are either close or display a warning.
* the 'ID' can be freely set so it can be used for different kinds of patchers of which you only want 1 to be open at any one time: Eg only 1 M4L IO patch, only one midi monitoring patch, etc
* only the newly opened patch receives the bang when there is already a patcher in the same category running (if both the newly-opened and the already-open patcher receive a bang I would end up closing both)
It's far from elegant, any suggestions welcome!