Is it possible to insert a reporter in a dropdown?

image
I want the variable (var) to be able to enter the dropdown.
The dropdown is set to show every variable in the project, but i cant put the reporter in the set variable dropdown. anyway how?

https://forum.snap.berkeley.edu/t/why-cant-i-drag-a-variable-into-the-pulldown-variable-list-of-set-or-change/8959/3

its only possible if the dropdown isnt a read only, but the set var dropdown is.

no, you can drop a reporter into a read-only input, just not some.

The only read-only inputs you can't drop reports into are on these blocks

(not including hat blocks)
untitled script pic (21)
untitled script pic (22)
untitled script pic (23)
untitled script pic (24)
untitled script pic (25)
untitled script pic (20)
untitled script pic (26)
untitled script pic (27)
(only the first input)
untitled script pic (28)
(only the first input)
untitled script pic (29)
untitled script pic (30)
untitled script pic (31)
(only the first input)
untitled script pic (32)
untitled script pic (34)
untitled script pic (33)
untitled script pic (35)
untitled script pic (36)
untitled script pic (37)
untitled script pic (39)
untitled script pic (40)
(only the first input)
untitled script pic (41)
(only the first input)
untitled script pic (42)
untitled script pic (43)
untitled script pic (44)
untitled script pic (45)

Wow, there's a lot more than I thought... I'm just as surprised as you.

Strangely, you can drop a reporter into the INHERIT block.

You can't drop an expression onto a slot for which only certain values are meaningful, namely the ones in the dropdown. And even then you can say


(This is why all our pulldown menus have an empty string as the first option.)

Sure, because you can inherit sprite-local blocks from your parent.

yes

Most of the time, there's no need for joins, primitives or custom blocks
image

ive been having trouble with the run block, i didnt realize the dropdown had to be empty to be able to pass values through. i do like having the expression though with the join block but i agree most of the time its probably not necessary. but you technially dont need even the run block, did you see untitled script pic (10)?

I did see that block but I don't understand how it can be used or how it was constructed

its the normal set [var] to [val] block with a reporter in it. i just changed the block spec so the first input slot was a normal string input which accepts reporters. that can be done through javascript or developer mode. once you save and load it turns back to the original dropdown menu but keeps the reporter, which you can rename to whatever variable you wanted to put or swap out with any other reporter.

I see - very clever :slight_smile:

Jens doesn't like morph hacking but it is possible with it

It's possible though hacking, but who's going to choose hacking over an already implemented way to do it?

haha ha

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.