Reply To: declaring and getComponent-better way?

Home Forums General Programming declaring and getComponent-better way? Reply To: declaring and getComponent-better way?

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

    Declaring your variables separately works fine.

    varMod = panel:getModulatorByName(“my_button”) makes varMod representing a modulator.
    You can verify this by typing what(varMod) in the console
    varComp = panel:getModulatorByName(“my_button”):getComponent() makes varComp representing the compoonent within the my_button modulator.
    You can verify this by typing what(varComp) in the console
    It is the equivalent of varComp = varMod:getComponent()

    It is no problem to have several methods into one…
    The OnChange methods have “mod” as variable and this represents the modulator that produced the changes.
    You can track its name or other property then based on if…elseif… statements perform the operation you want.

    I noticed there are issues with SetVisible so you need to handle this differently.

    Ctrlr