active state

    Apr 27 2010 | 11:21 am
    Is there a JavaScript method capable of querying the active state of a parent patcher? Say, I have a bpatcher and want to know whether its patcher window is frontmost, but don't want to create an active object in the parent patcher.

    • Apr 30 2010 | 8:51 pm
      No offense, but this sounds like poor encapsulation to me. Why not let the bpatcher support an active message and let users issue it from the parent patcher?
    • May 04 2010 | 7:45 pm
      I had the Max for Idiots kind of person in mind. That's why...
      Actually, there was a time when there was no JavaScript at all, and my patches were all running just fine...
    • May 07 2010 | 1:44 am
      Try checking the current filepath against the frontmost filepath as shown below.
      max.frontpatcher.filepath == this.patcher.filepath