Sending/Receiving Patch Name

Home Forums General Programming Sending/Receiving Patch Name

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #589
    TK.
    Participant
      • Topics: 6
      • Replies: 42
      • Total: 48

      Hi,

      what is the best method for making a patch name editable?

      Currently I’m using an uiLabel component with enabled edit option.

      For each character in the patch dump (received via SysEx) I’m doing following copy operation into uiLabelText (which works fine):
      [code:2wsm8qo5]
      if( ix < 0x10 ) then — patchname
      local modulator = panel:getModulatorByName("PatchName"):getComponent()
      local name = string.format("%-16s", modulator:getPropertyString("uiLabelText"))
      name = string.format("%s%c%s", string.sub(name, 0, ix), value, string.sub(name, ix+2, -1))
      modulator:setPropertyString("uiLabelText", name)
      [/code:2wsm8qo5]

      Now I would like to send back an edited patch name, but it seems that uiLabel doesn’t provide a Lua callback.
      So, which alternative method could be used?

      Best Regards, Thorsten.

      #4180
      LilCthulhu
      Participant
        • Topics: 9
        • Replies: 67
        • Total: 76

        Add a button near the label field to apply the modification ? Personnally, I stick with 16 combos with letters and value <img decoding=” title=”Wink” />

        #4181
        TK.
        Participant
          • Topics: 6
          • Replies: 42
          • Total: 48

          :-/

          #4182
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            I’ll add a lua callback to the label when the text is changed, i wanted to add a TextEditor component but noone ever asked for it but it’s not a problem it’s a simple task, this one will be editable in "live" mode without clicking (with apropriate LUA callbacks ofcourse).

            #4183
            LilCthulhu
            Participant
              • Topics: 9
              • Replies: 67
              • Total: 76

              Could that label have a maximum lenght property ? and a list of valid character ? Of course that could be coded in the callback if too complicated <img decoding=” title=”Wink” />

              #4184
              atom
              Keymaster
                • Topics: 159
                • Replies: 2945
                • Total: 3104
                • ★★★★★

                it’s possible i think, i’ll see what i can do

                #4185
                TK.
                Participant
                  • Topics: 6
                  • Replies: 42
                  • Total: 48

                  Great! <img decoding=” title=”Smile” />

                  Best Regards, Thorsten.

                  #4186
                  atom
                  Keymaster
                    • Topics: 159
                    • Replies: 2945
                    • Total: 3104
                    • ★★★★★

                    It’s already done both the callback for changes and the limits for both length and allowed characters.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • The forum ‘Programming’ is closed to new topics and replies.
                  There is currently 0 users and 75 guests online
                  No users are currently active
                  Forum Statistics
                  Threads: 2,495, Posts: 17,374, Members: 77,605
                  Most users ever online was 12 on January 22, 2019 3:47 pm
                  Ctrlr