Type 2 parameters on SimpleProperty

As shown in the picture I did 2 parameters on SimpleProperty

this is problem how to solve it ?

Use @SimpleFunction insted of @SimpleProperty

1 Like

2 parameters are not allowed in simple property either use a list, a simple function or take both the values as separate properties.

1 Like

Have you seen any property block which support two params ?

Use SimpleFunction instead,

@SimpleFunction
public void MinMaxValue(int min, int max){
     rulerValuePicker.setMinMaxValue(min,max);
}

Or,

//As fields
private int minValue = 0 ; // def value
private int maxValue = 0; //def value

//
@SimpleProperty
public void MinValue(int min){
   this.minValue = min;
   rulerValuePicker.setMinMaxValue(this.minValue, this.maxValue);
}

@SimpleProperty
public void MaxValue(int max){
   this.maxValue = max;
   rulerValuePicker.setMinMaxValue(this.minValue, this.maxValue);
}

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.