Radio button that works #170
Waldorf-Techie
started this conversation in
Ideas
Replies: 6 comments
-
There is no function named radio(). And interpolate_kwargs is how all
functions with keyword arguments are handled. If you want to create a
radio button in rapydscript you do it exactly like you would in
javascript with docuent.createElement.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks.
Do you know why the resulting radio button does not act like a radio
button, i.e. why selecting one does not deselect the others in the names
group?
…On Tue, Dec 7, 2021 at 9:15 PM Kovid Goyal ***@***.***> wrote:
There is no function named radio(). And interpolate_kwargs is how all
functions with keyword arguments are handled. If you want to create a
radio button in rapydscript you do it exactly like you would in
javascript with docuent.createElement.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW2INLU3WM522ONQVFR4SZTUP25VDANCNFSM5JSDNJNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Read the MDN documentation for radio buttons and how to make a group of
them.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I am working in Glowscript. I cannot determine the transcription of the
radio button, but it doesn’t work properly.
…On Tue, Dec 7, 2021 at 9:29 PM Kovid Goyal ***@***.***> wrote:
Read the MDN documentation for radio buttons and how to make a group of
them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW2INLXYAOA5G56IIDKBHJ3UP27KPANCNFSM5JSDNJNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Glowscript is a Python implementation that is transpiled to JavaScript.
On Tue, Dec 7, 2021 at 9:31 PM Harlan Gilbert ***@***.***>
wrote:
… I am working in Glowscript. I cannot determine the transcription of the
radio button, but it doesn’t work properly.
On Tue, Dec 7, 2021 at 9:29 PM Kovid Goyal ***@***.***>
wrote:
> Read the MDN documentation for radio buttons and how to make a group of
> them.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#170 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AW2INLXYAOA5G56IIDKBHJ3UP27KPANCNFSM5JSDNJNQ>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, to be clear, I am using Glowscript in Vpython mode, as I am teaching
Python at a school.
On Tue, Dec 7, 2021 at 9:33 PM Harlan Gilbert ***@***.***>
wrote:
… Glowscript is a Python implementation that is transpiled to JavaScript.
On Tue, Dec 7, 2021 at 9:31 PM Harlan Gilbert ***@***.***>
wrote:
> I am working in Glowscript. I cannot determine the transcription of the
> radio button, but it doesn’t work properly.
>
> On Tue, Dec 7, 2021 at 9:29 PM Kovid Goyal ***@***.***>
> wrote:
>
>> Read the MDN documentation for radio buttons and how to make a group of
>> them.
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#170 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AW2INLXYAOA5G56IIDKBHJ3UP27KPANCNFSM5JSDNJNQ>
>> .
>> Triage notifications on the go with GitHub Mobile for iOS
>> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
>> or Android
>> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>>
>>
>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having a problem with Glowscript, which transpiles Python to Javascript through rapydscript.
Oddly, radio buttons in Glowscript do not function as radio buttons (selecting one does not deselect the others), and it appears this is because the transpiler does not use the built-in Javascript radio button functionality, but instead uses something called ρσ_interpolate_kwargs (???) to generate the button. What ρσ_interpolate_kwargs establishes as a radio button does not operate as one.
I don't know why Rapydscript doesn't just use the Javascript radio button functionality, but there is probably some good reason...
Great program, by the way!
Harlan
Example code produced:
PYTHON CODE:
radio(bind=R, text='Runradio', name="RDO")
JAVASCRIPT GENERATED:
ρσ_interpolate_kwargs.call(this, radio, [ρσ_desugar_kwargs({bind: R, text: "Runradio", name: "RDO"})]);
Beta Was this translation helpful? Give feedback.
All reactions