HISE Logo Forum
    • Categories
    • Register
    • Login

    Crash on inline function button callback

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 267 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.
    • S
      Sawer
      last edited by

      Hello. As show here under, the moment I compile with that inline function, it crashes.
      Basically I just want to load the next sound whenever that button is pressed.
      Am I doing something wrong? Any help is greatly appreciated.

      Screenshot 2021-12-06 at 22.16.33.png

      d.healeyD ustkU 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @Sawer
        last edited by

        @nesta99 Your button is set to saveInPreset so when the preset loads it triggers the button, which loads the preset, which triggers the button, which loads the preset, which triggers the button, etc.

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

        S 1 Reply Last reply Reply Quote 4
        • ustkU
          ustk @Sawer
          last edited by ustk

          @nesta99 in general, it is better to use a condition in the callback so it isn't triggered twice (with the button set as momentary of course)

          if (value)
             // do something 
          

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

          S 1 Reply Last reply Reply Quote 2
          • S
            Sawer @d.healey
            last edited by

            @d-healey
            Ahah , great! Thanks man

            1 Reply Last reply Reply Quote 0
            • S
              Sawer @ustk
              last edited by

              @ustk
              Alright, will do. Thanks

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

              25

              Online

              1.8k

              Users

              12.0k

              Topics

              104.1k

              Posts