UILabel modulatorValue() issue

Home Forums General Programming UILabel modulatorValue() issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116617
    zeoka
    Participant
      • Topics: 73
      • Replies: 466
      • Total: 539
      • ★★★

      Hi

      modulator value not changing
      Called when the contents of a Label are changed

      WrSndName = function(--[[ CtrlrLabel --]] label, --[[ String --]] newContent)
        
         -- mod value is set on value 1 by MouseDown method on this modulator set on "dynamic"  
         -- label is editable with 2 clicks 
        local z = label:getOwner() 
        local y = L(z:getLuaName())
         --LUA>> Owner:SoundName
      
        local w = z:getModulatorValue()
         --LUA>> OwnerValue: 0
      
        z:setModulatorValue(1,false,false,false)
         --LUA>> OwnerValue: 0  

      Any idea ?

      #116634
      Tedjuh
      Participant
        • Topics: 9
        • Replies: 97
        • Total: 106
        • ★★

        Does the modulatorValue of an uiLabel change at all? I tested this. Static or not static, edit on single or doubleclick, modulatorValue doesn’t change.

        If you want something to happen when the content of a label is changed, u need to write a lua script and attach it to uiLabelChangedCbk. At least that’s how I do it.

        Correct me if I’m wrong.

        #116643
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          I’m using uiLabels for displaying values on patch sheets.
          I’m putting a modulator OnChange method on the main modulator where I add something like the following line into it to modify the corresponding uiLabel (lblTune has been declared as modulator in another method)

          lblTune:getComponent():setPropertyString ("uiLabelText", tostring((value-50)/20))

          #116647
          zeoka
          Participant
            • Topics: 73
            • Replies: 466
            • Total: 539
            • ★★★

            Hi

            It seems that this modulatorvalue is used by the method “label changed”
            if you open the text box and the value is 1 then
            the value will goes to 0 it must probably correspond to a bool ,
            the bool of the text editor so the modulator value is unuseful

            uilabel text are updated by others mods , when part changing or patch changing
            it sends midi when Enter key is pressed so the method “label changed” is launched
            and sends midi even if you Don’t want

            there is feedback so i would desactivate this method execept when i edit the label.
            this modulator value was good candidate to be a free variable but no

            i have done a button editname that blocks all navigation during name edit ,
            label changed works only when this button is ON
            Edit : ( this button play with “Editing begins..” to cancel the method “label changed )

            i precise this is a multifunction label that displays several types of patchs
            it changes most of time

            • This reply was modified 4 years, 3 months ago by zeoka.
          Viewing 4 posts - 1 through 4 (of 4 total)
          • The forum ‘Programming’ is closed to new topics and replies.
          There is currently 0 users and 45 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