HISE Logo Forum
    • Categories
    • Register
    • Login

    How to trigger label callback on enter/return but not on focus change?

    Scheduled Pinned Locked Moved Scripting
    labeltextvalueupdatefocus
    30 Posts 5 Posters 1.7k 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.
    • d.healeyD
      d.healey @rglides
      last edited by

      @rglides said in How to trigger label callback on enter/return but not on focus change?:

      if (Label1.get("editable")

      The label is always editable isn't it?

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      rglidesR 1 Reply Last reply Reply Quote 0
      • rglidesR
        rglides @d.healey
        last edited by

        @d-healey Sure, but for some reason it has allowed clicking outside of the label and not triggering the callback

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

          @rglides said in How to trigger label callback on enter/return but not on focus change?:

          @d-healey Sure, but for some reason it has allowed clicking outside of the label and not triggering the callback

          It's still triggering it here. Add Console.print("test"); inside the if statement, you can remove all the update panels stuff, it's just complicating the picture.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          1 Reply Last reply Reply Quote 0
          • rglidesR
            rglides @rglides
            last edited by

            @rglides uggggh, ok, HISE has defeated me yet again, my logic was to start with an if statement to see if the callback could be avoided, so I thought I had it. Turns out the callback just won't trigger at all regardless of the if statement, until the label is re-interacted with (or when hitting enter) so I have proved useless again. But I tried, and it was fun to feel like I figured something out, briefly

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

              @rglides said in How to trigger label callback on enter/return but not on focus change?:

              I tried, and it was fun to feel like I figured something out, briefly

              You've done no worse than my attempt :)

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              rglidesR ChazroxC 3 Replies Last reply Reply Quote 1
              • rglidesR
                rglides @d.healey
                last edited by

                @d-healey Thank you. This really should just be a core feature, it seems like basic stuff

                1 Reply Last reply Reply Quote 1
                • ChazroxC
                  Chazrox @d.healey
                  last edited by

                  @d-healey @rglides this is a crazy one. lol I'll def try again.

                  rglidesR 1 Reply Last reply Reply Quote 0
                  • rglidesR
                    rglides @Chazrox
                    last edited by

                    @Chazrox fr

                    1 Reply Last reply Reply Quote 0
                    • ChazroxC
                      Chazrox @d.healey
                      last edited by

                      @d-healey Did you ever figure this out? I still need this function badly. Its so simple but crucial. Im not liking 'type name' ---> 'click SAVE button' flow.

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

                        @Chazrox said in How to trigger label callback on enter/return but not on focus change?:

                        I still need this function

                        What function?

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        ChazroxC 1 Reply Last reply Reply Quote 0
                        • ChazroxC
                          Chazrox @d.healey
                          last edited by

                          @d-healey Press Enter to fire label callback.

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

                            @Chazrox I'm having deja vu. Didn't we already cover this in another thread? Anyway the default behaviour of the label is to trigger the callback when you hit enter, you don't need to do anything special.

                            The problem I have (and why this thread exists) is because the callback is also triggered when the label loses focus, which is not what I want.

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            ChazroxC 1 Reply Last reply Reply Quote 0
                            • ChazroxC
                              Chazrox @d.healey
                              last edited by

                              @d-healey oh. Sorry. I dont remember that part. I just searched for 'label ENTER' and this thread popped up. I didnt see the other one.

                              @d-healey said in How to trigger label callback on enter/return but not on focus change?:

                              default behaviour of the label is to trigger

                              weird, my lables dont fire after typing a name into a label and pressing ENTER.

                              I have a label for my 'save preset name' function and it doesnt fire on pressing enter. hmmm...

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

                                @Chazrox Here it is, I knew I didn't dream it :)

                                https://forum.hise.audio/topic/13033/modifier-keys-shift-click-dosomething/5?_=1763681866828

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                ChazroxC 1 Reply Last reply Reply Quote 0
                                • ChazroxC
                                  Chazrox @d.healey
                                  last edited by

                                  @d-healey ah crud. Yeah we did. Ok I fixed it. Thank You! Sorry for wasting just a little bit of your time. I'll make it up to you in enthusiasm! haha. Hope you're having a great day! 🙏

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

                                  17

                                  Online

                                  2.0k

                                  Users

                                  12.9k

                                  Topics

                                  111.8k

                                  Posts