How 'global' are globals?

I am working on 2 interdependent scripts/patches that rely heavily on globals. a client and a router. i knew that there were issues communicating between runtime, max for live, and plain old MaxMSP and i was going to tackle that after the fact.

but i find that if i have clients in 1 patch, and a router in another everything is gravy, but when i open a 3rd patch that has a client, bedlam begins. udpsend and receive were suggested to me, but i really do not believe those would be helpful as i am–potentially–making too many channels to rely on udpsends feedback-less setup.

EDIT: to make it clearer, after more creative testing: if i have 8 clients in 1 patch and open that patch…no problem. if i instatiate a new patch after that, it acts as though those first 8 don’t exist.

i would also like to take this opportunity to request that globals gain the ability to speak across all max environments. i imagine that could be a security risk, so….i know it isn’t a snap your fingers and it’s done kinda thing, but I would greatly appreciate the functionality.

the scripts are monome-centric, but testmmc should work without a physical monome. shell3 has the router in it. press, slide and test are the clients.

Attachments:

i thought for a moment that i made a simple mistake, which was what i hoped, but i am really getting frustrated now. when i make a new instance of a patch that has the client, the global that i am using to keep track of all of the clients is cleared.

Attachments:

I’m working on a similar system right now for monomod. I’ve only been coding for the last day, but I’m running into similar problems. I’ve found no problem running multiple clients with multiple hosts, my problem is coming up with a way to store and recall unique id’s and paths so that things stay the same for the next session. Its driving me nuts.

I’ll take a look at your methods when I get a chance and see what I can offer. Or maybe it will give me some insight into how I can do things differently. I glanced at it for a moment, it looks very interesting. You are going about things much differently than I am, but there are similarities.

so, after a good bit of rest, and a moment of contemplation, i considered the fact that the router global has a few properties that DID persist. it was ONLY the applist that dissapeared. so then i thought "I don’t do anything with theappList in the client script. i mean, i shouldn’t there is no reason to. let me just search for ‘appList’ and confirm that."