Single quotes in uiListBox and combo

Home Forums General Programming Single quotes in uiListBox and combo

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #81418
    m.tarenskeen
    Participant
      • Topics: 30
      • Replies: 113
      • Total: 143
      • ★★

      Hi,

      My Korg DS-8 and 707 panels show 100 patchnames from a received or loaded bank in a uiListBox. But problems arise when a patchname contains single quote literals.
      for a example a patchname like “Mc’Donalds”

      For now, I created a workaround that simply replaces the “‘” with a “.” before displaying them.

      But is there a better way to show single quotes in uiListBox and combo items?

      #81421
      Possemo
      Participant
        • Topics: 14
        • Replies: 638
        • Total: 652
        • ★★★

        If I remember well there are a few other characters that don’t work in ListBoxes. I use the same workarounds – AFAIK there is no other way.

        #81468
        m.tarenskeen
        Participant
          • Topics: 30
          • Replies: 113
          • Total: 143
          • ★★

          OK. Is it documented somnewhere which characters are or aren’t allowed? Then I can make my code work also in unforeseen situations.

          #81470
          Possemo
          Participant
            • Topics: 14
            • Replies: 638
            • Total: 652
            • ★★★

            I don’t think so. I looked into one of my panels who does load patch names into a listbox. It replaces the following characters with spaces:

            ” – ASCII 34
            ‘ – ASCII 39
            , – ASCII 44

            #81873
            dnaldoog
            Participant
              • Topics: 4
              • Replies: 480
              • Total: 484
              • ★★

              Did you try escaping with a \ in front of the ‘ ?

              #81874
              m.tarenskeen
              Participant
                • Topics: 30
                • Replies: 113
                • Total: 143
                • ★★

                Did you try escaping with a \ in front of the ‘ ?

                Yes I did. Doesn’t work.

                #81875
                dnaldoog
                Participant
                  • Topics: 4
                  • Replies: 480
                  • Total: 484
                  • ★★

                  I’m not sure about uiListBox, but I have it working in a uiCombo http://ctrlr.org/roland-jd990-super-editor/

                  A function on line 229 of myFunctions file loads patch names from an array in myArrays file into the uicombo Box on the left in the gui- on line 435 there is an example of an escaped ‘ “[I-56] JD\’s Sentiment”,

                Viewing 7 posts - 1 through 7 (of 7 total)
                • The forum ‘Programming’ is closed to new topics and replies.
                There is currently 0 users and 68 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