Re: Issuing a single command to multiple js scripts using a global

new version of the “spread” script. this one filters out all closed slaves and allows multiple master scripts (e.g. one per patch) to cooperate (not overwrite the global slave list).

the check for invalid slave is not very correct – it relies on a bug in Max’s javascript that changes “.box” property when the patch containing [js] is closed. When registering a slave I store its current .box into a new property ._box and assume that as long as the two properties remain equal the slave is still valid. This doesn’t sound very robust or convincing, but I can’t seem to invent a better way. Especially since even stored “._box” reports as “.valid” after its patch is closed.

Attachments:
  1. spread-002.zip
Aug 4, 2010 at 2:15pm #184682