# How to give your block a default help screen (the kind with pictures)

Name it "catch" or "throw" and nothing else. It's just this thing I noticed, probably a feature with the "catch/throw" block?

Umm, well, if your block does the same thing as the library block, I suppose.

Pre-5.0, we had a Tools library that had many blocks that are now included as primitives. We viewed the tools as really part of the language, even though written in Snap!, so we gave them help screens. (This dates back to before we had the comment-on-hat-as-help-text feature for custom blocks!) I guess catch and throw may be the only ones left.

But I think this is misleading as a "how to" because it doesn't tell people how to make a relevant help screen. I'm moving it to... I dunno... share projects I guess.

Quite off-topic but why did you never change this though?

It's... It's more like an easter egg than like an advanced idea.

Inertia. And I still kinda think of catch and throw as part of the language. And, best reason, our goal is to move in the direction of letting users define fancy help screens with graphics, as a side benefit of Dylan's internationalization system for help.

They are. Those blocks were just run /w/ continuation and run with different labels.

That's not what I meant. I meant that CATCH and THROW are abstractions that we provide for users. Almost any primitive could be written in terms of other primitives -- the continuation ones are among the few really, really must-be-primitive primitives.

But, for example, MOVE n STEPS can be written in terms of GO TO X: Y: and the trig functions. But we provide it as primitive. By contrast, GLIDE n STEPS IN t SECS can be written in terms of the existing GLIDE, but it's not an abstraction we provide.

Yes. What I was saying, is that these blocks do exactly what the throw and catch blocks do. requires 13 blocks. Throw and catch require one block each. Forward saves 12 blocks whenever it's used, so if it wasn't built in, I would build it a custom block, if I needed it. Throw and catch do not save any blocks because they do the exact same function as a primitive.

Yeah, I guess, although CATCH provides the convenience of an upvar. It's kinda like the syntax LET/CC that some people add to Scheme: (let/cc var foo) is like (call/cc (lambda (var) foo)). And so CATCH isn't just call/cc; it also has a SET and a RUN.

Do you dislike CHANGE var BY delta? It's just a SET and a +. But Scratch decided to include it as a primitive, and we inherited it. (Of course Scratch had the disadvantage of no custom blocks, in its early days, and that adds pressure to include things as primitive.)

On the other hand, they didn't include PREVIOUS COSTUME. Each case is different.

actually if you do this or
it switches to the previous costume, unless you have a costume named "previous"

Oh sure, I wasn't suggesting that it can't be done, just that when they designed Scratch they decided they didn't need PREVIOUS COSTUME as a primitive, even though they decided they did need CHANGE BY. The two cases are similar in terms of the complexity of building them out of other blocks, but the decisions were different because (I'm supposing) they did research on the projects kids built to determine how often people were thwarted by the lack of that block. Or something like that.

That previous costume thing doesn't work for me.

[scratchblocks]
switch backdrop to [previous backdrop v]
[/scratchblocks]
does work, of course.

woops, I meant previous costume, like,
[scratchblocks]
switch costume to [previous costume v]
switch costume to (join [previous costume] [])
[/scratchblocks]

(I got the images in my other post from scratchblocks so I didn't test it out, but this time I actually tested it out.)

Aha, that does in fact work. Interesting that the option doesn't appear in the dropdown, though...

There are a lot of things you can do with the join block in both Snap! and Scratch. The most common example is key detection.

[scratchblocks]<key (join[\$]::operators) pressed>[/scratchblocks]

next costume also works, suggesting that this was meant to be instead of the next costume block. I don't know why it's hidden.

for me, it's converting things to text strings (seriously, the join block is so powerful is snap)

@jens does this sometimes: He puts in a hidden experimental feature and doesn't tell anyone, or at least doesn't tell me, so it doesn't get documented. Like shift-click on the BROADCAST menu to get a green flag option.

wow, he didn't tell you that? I think I found that out when I was shift-clicking every single menu in primitive blocks, and on every button (that's how I find stuff out)