Check box doesn't show "tick" when selected = 1 in a script

HI All,

I have a scenario I can’t seem to solve, I have a series of check boxes that can be selected in a random pattern. I have a button that “deselects” them all and a button that “selects” them all.

The check marks disappear when deselected, but I can’t seem to get the check mark to appear when “select all” button is clicked.

I set the selected value to “1”. is there another step I need to do?

Regards,

Gareth

Try using True and False instead.

If that doesn't work then please post your code for both buttons. See Wiki - how to post code on this forum.

Just tested this. Set it to True instead of 1.

Perspective's backing property model is JSON, which has numbers, strings, and true booleans. 1[1] is not the same as true[2] is not the same as "true"[3] is not the same as "1"[4].


  1. a number ↩︎

  2. a boolean ↩︎

  3. a string containing four letters t, r, u, e ↩︎

  4. a string containing the numeral 1 ↩︎

4 Likes

thank you for this, True with the captial T is the keyword I was looking for. works now, much appreciated!

Regards,

Gareth

Thanks Paul, I appreciate this, I was getting a bit confused, I’ve used C and C# and a few other languages where 1 and 0 and true and false are interchangeable and the keyword is lowercase. I am new to JSON and Python, some of it is familiar and some not so much. This forum is a great tool and people are very generous with their knowledge.

Regards,

Gareth

thank you, this is exactly what I needed. regards, Gareth

(post deleted by author)