skulpt / skulpt

Skulpt is a Javascript implementation of the Python programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to support turtle.textinput and tuttle.numinput attribute

Golotus opened this issue · comments

When I run turtle.textinput("hello","world"), I get this error:
Attempting file: undefined
AttributeError: '' object has no attribute 'textinput' on line 2

Below is the source code that runs:
import turtle
turtle.textinput('Hello', 'world')

Welcome friends who have the same problem to discuss and solve.

You may use the prompt for it.
refer to:

Sk.builtin.raw_input = function (prompt) {

You may use the prompt for it.
refer to:

Sk.builtin.raw_input = function (prompt) {

Thanks a lot, let me try.

BTW: You should define the textinput/numinput function yourself, and use the javascript builtin prompt function as input component.

BTW: You should define the textinput/numinput function yourself, and use the javascript builtin prompt function as input component.

Thanks a lot for your advice, I am learning and trying.