HISE Logo Forum
    • Categories
    • Register
    • Login

    Panel Timer best practise

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 173 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      Hello everyone,

      I wonder if it is ok to set the value of panel 2 in the timer callback of panel 1 or is this a problem and I should use a separate timer for it?

      Thank you very much
      Oli

      ustkU A 2 Replies Last reply Reply Quote 0
      • ustkU
        ustk @Oli Ullmann
        last edited by

        @Oli-Ullmann it’s perfectly fine. Then if you need you trigger the second panel’s callback afterwards, or call a repaint or whatever

        Can't help pressing F5 in the forum...

        Oli UllmannO 1 Reply Last reply Reply Quote 1
        • Oli UllmannO
          Oli Ullmann @ustk
          last edited by

          @ustk
          Yes, I call repaintImmediately() in the timer callback after I set the value.

          Cool, thank you! :-)

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @Oli Ullmann
            last edited by

            @Oli-Ullmann repaintImmediately() has no more advantage over repaint(), it's just still there for compatibility reasons

            Can't help pressing F5 in the forum...

            Oli UllmannO 1 Reply Last reply Reply Quote 1
            • Oli UllmannO
              Oli Ullmann @ustk
              last edited by

              @ustk good to know, thank you! :-)

              1 Reply Last reply Reply Quote 0
              • A
                aaronventure @Oli Ullmann
                last edited by

                @Oli-Ullmann It really depends on the use case. Remember that the panel timers stop when the UI of the plugin is closed. You can test this with the little moon icon in the interface designer.

                If this breaks your functionality in any way, use your own timer objects.

                Oli UllmannO 1 Reply Last reply Reply Quote 1
                • Oli UllmannO
                  Oli Ullmann @aaronventure
                  last edited by

                  @aaronventure
                  Good point, thanks to you! I actually only use it for UI animations. So it's actually useful that the timer is stopped when the UI is closed, as it doesn't consume CPU resources.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  17

                  Online

                  1.8k

                  Users

                  12.1k

                  Topics

                  104.9k

                  Posts