active state

Apr 27, 2010 at 11:21am

active state

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 at 8:51pm

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 4, 2010 at 7:45pm

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 7, 2010 at 1:44am

Try checking the current filepath against the frontmost filepath as shown below.


max.frontpatcher.filepath == this.patcher.filepath


You must be logged in to reply to this topic.