0
Button setter (Kotlin) not accepted
why is it wrong? it looks just like the example solution https://sololearn.com/coach/1143/?ref=app https://code.sololearn.com/ccJS1hOdo3Pw/?ref=app
4 Respuestas
+ 2
Ok so inside your setter block, the 'field' refers to the current value of the property (or the property itself), and 'value' is what you want to change it to.
In your condition you need to validate the value, not the field!
if (value>50)
+ 1
Tibor Santa i can’t believe i missed that… thanks!
0
If you actually show us your code, we can review.
0
Tibor Santa sorry i thought the link was to my code