Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I make a "copy list (A) into list (B)" custom block? #1866

Open
towerofnix opened this issue Jan 11, 2019 · 3 comments
Open

How can I make a "copy list (A) into list (B)" custom block? #1866

towerofnix opened this issue Jan 11, 2019 · 3 comments

Comments

@towerofnix
Copy link
Contributor

Suppose I want to create a custom block which takes all the items in a given list and copies them into another given list. Hypothetically speaking, this is a quite simple - but useful - custom block:

"define copy items of (list A) into (list B): set index to 0; repeat (length of (list A)): add (item (index) of (list A)) to (list B); change index by 1"

However, it is impossible to drag blocks into list dropdowns, and therefore impossible to create a general custom block like this.

In a very real sense, no general custom blocks which apply to lists can be created. This is a barrier for teaching the uses of custom blocks and a hindrance to anybody who would otherwise make use of such custom blocks.

See also scratchfoundation/scratch-parser#47, which may be required or useful in allowing blocks to be placed into list dropdowns. Also see #1805, which recommends adding a "sprite dropdown" input type - in the same way, adding a "list dropdown" input type would be useful for general custom blocks like this.

@apple502j
Copy link
Contributor

See also scratchfoundation/scratch-vm#1030

@thisandagain
Copy link
Contributor

@Wowfunhappy
Copy link

See also: scratchfoundation/scratch-gui#2194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants