• is something like that possible?

    laf.registerFunction("drawLinearSlider", function(g, obj)
        xxx = this.obj  getValue??
        if (obj.value !== xxx) 
               do anything
              do anything 

  • Inside your LAF function put this line:


    After you hit compile you will see in the console all of the obj properties that are available in your function.

  • What are you trying to do here?

    You're setting xxx to the value of the object, then trying to check if the value of the object is different to xxx (which is the value of the object).

    Seems a bit cyclical.

  • What I am trying to do is relatively simple.

    A user loads a preset and the knob "Decay" has the value 234, for example.
    If the user now changes this value - the colour of the knob should change - so that you can see that this value has been changed.
    and is no longer the original value.

    This is possible in a callback for the knob.

    But that would force me to create a callback for each of the 80 buttons.

    It would be more efficient if it were already possible in the "Look and Feel" for all buttons.

    1. get the default value
    2. if the value of the knob changes - i.e. greater/lower than the default value
    3. colour the knob red.

  • @MikeB said in obj.value:

    But that would force me to create a callback for each of the 80 buttons.

    You can use the same callback function for all knobs.

    The LAF function only provides the current value, you won't be able to detect a changed value without using some external variables which might get messy. You can still set the colour in the LAF though by changing the colour property in the control callback.

  • @d-healey

    I have given the knobs the colour (obj.textColour) in the LAF.

    However, this cannot be subsequently changed in a callback!

    at least I have not been able to do this

  • @MikeB This should work in the callback component.set("textColour", Colours.white);

Log in to reply