Any update about radio for Web Vpython 3.2?

26 views
Skip to first unread message

陳冠榮

unread,
Oct 1, 2022, 4:14:35 AM10/1/22
to Glowscript Users
I found just now that previously working program went wrong! Is there any change to radio for Web Vpython 3.2?
未命名.jpg
cokojo

Bruce Sherwood

unread,
Oct 1, 2022, 11:49:45 AM10/1/22
to Glowscript Users
I don't understand why this error occurs. However, I have found that the following structure works properly:

for i in range(5):
    radio(text=str(i+1)+'   ', id=i+1, name='T2', checked=(i == 0), bind=setT2)

Bruce

陳冠榮

unread,
Oct 1, 2022, 11:53:14 AM10/1/22
to Glowscript Users
Ok. I will try it. Thanks.

cokojo

Bruce Sherwood 在 2022年10月1日 星期六晚上11:49:45 [UTC+8] 的信中寫道:

陳冠榮

unread,
Oct 1, 2022, 12:11:57 PM10/1/22
to Glowscript Users
Yes. That structure works. But why? It's bizarre.

cokojo

陳冠榮 在 2022年10月1日 星期六晚上11:53:14 [UTC+8] 的信中寫道:

Bruce Sherwood

unread,
Oct 1, 2022, 11:48:54 PM10/1/22
to Glowscript Users
Your original code now works. Thanks for the report.

Bruce
Reply all
Reply to author
Forward
0 new messages