how to know when a subpatcher is opened


    Jul 11 2008 | 1:32 pm
    Is it possible to check if a subpatcher is opened or closed?
    I am looking for a solution similar to the 'active'-object which will tell when a patcher window is active or not, but then if it is open or not.
    And, related question: is it possible to remotely open or close a subpatcher?
    Should I look into javascript-scripting, is it possible with that?
    Thanks
    Timo

    • Jul 11 2008 | 1:57 pm
      On 11 juil. 08, at 15:32, Timo Rozendal wrote:
      > > Is it possible to check if a subpatcher is opened or closed?
      I don't know if this is what you're after, but I do this with [js] for abstractions (it works with [patcher] too):
      function visible () { outlet (0,this.patcher.wind.visible); }
      > And, related question: is it possible to remotely open or close a > subpatcher?
      [pcontrol]? front to [thispatcher] ?
      _____________________________ Patrick Delges
      Centre de Recherches et de Formation Musicales de Wallonie asbl http://www.crfmw.be/max
    • Jul 12 2008 | 1:43 pm
      Thanks Patrick and Rabadja
      Patrick, your [js] solution works, however, you still need to bang it get that 'statusreport' and I would like to get a signal when a subpatcher is opened (it doesn't matter if it's active then or not)
      and about opening the subpatch remotely: yeah, of course that should be done with [thispatcher] and [front], thanks for reminding me,
      Rabadja, thanks for the patch, that shows you can use [thispatcher] to open a subpatcher, but the first question is indeed a bit different.
      Timo
    • Jul 14 2008 | 12:13 am
      active, closebang, onebang?
    • Jul 14 2008 | 7:58 am
      raja schrieb: > If, however, you are looking to be able to double-click on a > subpatcher> type subpatch then you might be short-changing yourself > out of the solution.
      You can cover this case with the active object, as this will be activeted by a double click and then be in front, but use a [sel 1] to gate the nonactive notification. In addition with closebang you can monitor if it has been closed again... As you usually have it always once in front if you open it, these two objects should be suffcient to track the state...
      Stefan
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com