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
    7 Posts 4 Posters 83 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
      last edited by

      I thought I could handle this with a keypress callback but it doesn't work.

      The callback still triggers on focus change. Another way is to do the action I want in the keyPress callback directly (which is fine) but the label's value still doesn't update until a focus change occurs.

      I also tried manually triggering it by calling loseFocus but that doesn't work either.

      HiseSnippet 912.3ocsV01aaaCDlxIJHRasXEX+.D5mTFJLricbSZvv5hS7lQaRLpSK12JnoNYQXIRAQpznUz+y6eP2QI4X4lfzVCT8ACduw6Q28bm7jLICTJYFwx8phTfX8y1SKD5ngQTtfL9Th0isOmpzPlWkpSJRoJEDPrr15uLJrb1lT97e+wIzXpfAqTQHuSxYvq4Ib8JsSd4q3wwinAvU7jFd2+kiYRwPYrLGwyV1cHoT1B5b3BpwsV1j+lphHV+l8A62i0O34A6u+AGMfQG.GERCC61Kne+AGdT2dGQ6e3.nyADqcNKfqkYS0TMnvK8DYPwzH4GDUI3cbEeVLXD5RlhYtRMYXDONXxxhihPr1dxpR0VUkpe09bd.+V8qJY+RoAuUQzrnY05gfT2uCHY0.RaWAomXOkkwS0qrXvyOYOVfcvPJ1aZBkJeIsraYOThdHzsSnKfQYnvsQ3OnSmm4g+r2wttX+Qo8tll48Z5LHtq2u6sLx4fdnLIUJPA+mVY9oXLUmZqLlE5LY7PZb7Lrw5KEU1p0atetHlK.uvbASykBuuvEe1xL7LDDw4vdtez0AMpjwP6zLNl5J8G69I20SsJOABdETLICKLfx+iKfhgx.3Edc68IStW48RutEoKwiObMl6xjxC8pjZyUijrbE19EyQ.43jA57LwwtNtN5HtpMqzRfuAT6cbi2sKjZ3Rge48g306KMEFdu1pKFwP18Z1LTk8PA5KxSlAYMKgFGQRz5Lyc91XlrJBPCGkhwBt9xTnVdjLNvv3LmuKOlTyfvSuc7oTM0Psq0g9kBYZtANVmBWiKSpH5N1mBpEZYZou0jBbIltz5ipGCJaoDNl5csqZujaHV1VlrVXNr.O7AdfNxHDYQHQ.edj1H4illMe41HmcPwOa1REhHaJ+eWaukQW0Rpcsu7lh43KtFtAulcruBT3a1cmTwcDxf7Xpd8EGlUp0Fvd1ZSqlIRghqKZtx86XaRmGbax2JDeh8DtlEc+Xr08fQra9i.i06fej8Ygg.SuBfaaO5e1zEtekz+FYtlKleNUmwM7nKxSlhrCFXl8EPrxvaZYXzUxcLxlJvTPDTJ7Y7o1XWirUswtKMRRnrL46YUSpls76VpAwjnjf4feNFk85RJmdaVmSvO57dFa8q5NAt+lFXuMMv9aZfGroANXSC74aZfG90Cz7eB9ybsLoZrgPNexYkq6rrNSPQFXIak7+.773pt
      

      And the bug with label text watcher broadcaster not working is still present.

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @d.healey
        last edited by

        @d-healey Could the property updateEachKey be of any help to you?

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

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

          @ustk I don't see how. I just want to trigger the callback when I hit enter.

          I could roll my own complicated solution where I store each entered character in a variable and then process it when enter is pressed but that seems like a lot of work for something so simple.

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

            keypresscallback object has a "isFocusChange" property

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

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox
                last edited by

                Was the keypress callback a crucial part of your script or was it a work around for getting the value to print on ENTER?

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

                  @Chazrox I was using it to try and get around the focus behaviour.

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

                  45

                  Online

                  1.9k

                  Users

                  12.2k

                  Topics

                  106.5k

                  Posts