HISE Logo Forum
    • Categories
    • Register
    • Login

    Interface: Skipping changed() callback during onInit

    Scheduled Pinned Locked Moved Solved Scripting
    13 Posts 4 Posters 388 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.
    • clevername27C
      clevername27
      last edited by

      I understand this is a warning, but in my case - it probably means something important!

      I'm calling .changed() to trigger a button's setControlCallback. (I've also tried directly calling the callback.) The callback It's supposed to do something - but it doesn't seem to do anything.

      The only thing I can think of is that the panel containing the button is not visible (and thus, the button is hidden as well.)

      Any thoughts? This one's driving me up a tree, lol.

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @clevername27
        last edited by d.healey

        @clevername27

        I disabled this warning because it's annoying (even though I think it my post that prompted Christoph to add it :) )

        The warning basically means you can't call .changed() from the on init callback - well you can call it but nothing will happen. You need to call it instead from a control callback, a broadcasters, a timer, or somewhere else that is after on init.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Oli UllmannO clevername27C 2 Replies Last reply Reply Quote 2
        • Oli UllmannO
          Oli Ullmann @d.healey
          last edited by

          @d-healey Can you explain how I can deactivate the warning?

          d.healeyD 1 Reply Last reply Reply Quote 1
          • d.healeyD
            d.healey @Oli Ullmann
            last edited by

            @Oli-Ullmann https://github.com/davidhealey/HISE/commit/f2962b55ebf9049769c03101d305f4e9ead19910

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 1
            • clevername27C
              clevername27 @d.healey
              last edited by

              @d-healey Thank you for your response - why can't it be called during init? I'm using it to initialize buttons to specific values (and execute the associated callback from when that happens.). (I'm not calling it from init, but I'm calling functions that do, so maybe that's the same thing,)

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @clevername27
                last edited by

                @clevername27 said in Interface: Skipping changed() callback during onInit:

                why can't it be called during init

                Dem's da rulez

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                clevername27C 1 Reply Last reply Reply Quote 1
                • clevername27C
                  clevername27 @d.healey
                  last edited by

                  @d-healey Ah, I see. (Wouldn't a message to that effect be better?) So, would that apply to directly calling the callback during init, too?

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @clevername27
                    last edited by

                    @clevername27 yeah, if you search you'll find my post about it and Christoph's explanation

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    clevername27C 1 Reply Last reply Reply Quote 0
                    • clevername27C
                      clevername27 @d.healey
                      last edited by

                      @d-healey Thank you - do you mean this thread?

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @clevername27
                        last edited by

                        @clevername27 This one - https://forum.hise.audio/topic/8702/bug-changed-not-working

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        clevername27C 1 Reply Last reply Reply Quote 1
                        • clevername27C
                          clevername27 @d.healey
                          last edited by

                          @d-healey Thanks for taking the time to dig that up - I hit up Chris about calling the callbacks explicitly. Cheers.

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

                            @clevername27 Yeah just call the inline function that you're passing to the setCallback() method.

                            The only thing that changed() would do on top of it is it would set the control as "last touched" if it's set as a plugin parameter. I'm unsure whether that also puts it "in focus" in HISE.

                            clevername27C 1 Reply Last reply Reply Quote 1
                            • clevername27C
                              clevername27 @aaronventure
                              last edited by

                              @aaronventure Thank you - did not know that!

                              1 Reply Last reply Reply Quote 0
                              • clevername27C clevername27 has marked this topic as solved on
                              • First post
                                Last post

                              39

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              102.1k

                              Posts