uiListbox component not updating correctly (1324)

Home Forums General Using Ctrlr uiListbox component not updating correctly (1324)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7301
    Hecticcc
    Participant
      • Topics: 25
      • Replies: 160
      • Total: 185
      • ★★

      I am trying to make a listbox display dynamically changing content using Lua, and although the change shows up in the xml-view the listbox itself does not reflect this change. At best i get one field that is selectable, but no text at all. In other content-customisable modulators (like UiFixedSlider) i get this working without a hitch.

      Any idea what might cause this?

      cheerz,

      Hec

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

        Share an example and i’ll help.

        #7307
        Hecticcc
        Participant
          • Topics: 25
          • Replies: 160
          • Total: 185
          • ★★

          I did some more trying in the mean while and found out i made an error in the syntax, now all is working as expected 😀

          Attached the “proof-of concept” panel of this functionality in case other people want to look into it.

          One thing does stump me still though, for the uiFixedSliders the values only get updated when the modulator itself changes value. Is there a way to force these “new” values so they update visually instantly? In the uiListbox it “just works”.

          Attachments:
          You must be logged in to view attached files.
          #7309
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            The update happens when the range of the slider changes, the range changes if the amount of elements on the list changes, you set the list to 3 elements always, try adding

            c:setPropertyString("uiFixedSliderContent","")
            

            before setting the actual value, that will clear the list and trigger a range change in the slider. The ListBox does that always because it’s stupid that way (it has no underlying logic that the Slider class)

            #7310
            Hecticcc
            Participant
              • Topics: 25
              • Replies: 160
              • Total: 185
              • ★★

              Cool, thanks Atom.

              I also noticed that when resetting the range this way it jumps to its “base” value (of course), but this can be remedied by grabbing the value @ start of the script and assign it again after doing the content manipulation, allowing visually seamless switching 🙂

              This will make my rebuild (v3 lol) alot more practical – i used 5 different modulators for “cutoff” alone in the last rev to make sure the right values were indicated, and switched visibility for them depending on filtertype. But this made a mess for automation purposes as you can imagine…

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