UILabel modulatorValue() issue

Home Forums General Programming UILabel modulatorValue() issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116617
    zeokazeoka
    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: 1
    • Replies: 5
    • Total: 6

    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
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 399
    • Total: 440
    • ★★

    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
    zeokazeoka
    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 1 month ago by zeokazeoka.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 26 guests online
No users are currently active
Forum Statistics
Threads: 2,275, Posts: 15,922, Members: 57,248
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!