Custom libraries?

Is it possible to make your own block library with custom blocks that you made?
So that you can use them in your projects?

You can't make one accessible via the libraries menu option

What I do is export my custom blocks (and usually rename the .xml ) and then move them into a separate Snap blocks folder

Then any time I want them in a project - I just drag and drop them in

File > Export blocks.

If you select only a subset, make sure you select the ones that the ones you want depend on. Otherwise you'll end up with those horrible red "Obsolete!" blocks inside the scripts, until I convince Jens to fix this.

Why do you have to convince someone to fix it? I thought you were also developing Snap. Couldn't you fix things on your own? (I'm asking because I just want to know how it works).

Ah. There's a lot of my code in the libraries, and I've made a couple of contributions to Snap! itself (linked lists and hierarchical menus) but mostly my code isn't good enough to pass review by Jens, who's in charge.

My main visible contribution is in the documentation, especially the Reference Manual. But I've also contributed quite a lot to the design. Our process for BYOB 3.0, which took a year to develop, is that pretty much every day I'd send Jens a design spec for something, drawn in ASCII art until I broke down and learned to use Photoshop a little, and then he'd reply by email saying "that would be much too hard!" and I'd go to bed and when I woke up in the morning Jens would have implemented it and then we'd go on to the next piece of the design. We don't do that every day now, because most of the hard decisions are made, but new features still come out best when we talk about them a lot before anyone codes anything.

(In the past five years or so, most of my time has gone into BJC, the Beauty and Joy of Computing intro to computer science curriculum that uses Snap!. BJC was one of the main motivations for pushing the Scratch UI in the direction of first class procedures and all that.)

But, all that aside, "convince" is because we actually have a disagreement about this (for reasons I still don't understand), and even if I wrote the code myself it would be wrong of me to sneak it in knowing that we disagree.

:~) I guess you haven't seen one. There's nothing horrible about the word "obsolete," but seeing one of those fire engine red blocks glaring at you in the middle of your program is what's horrible.

Oh, you also wanted to know what it means. When you import a custom block, all the blocks inside it have to exist (or be defined in the same file). If block A calls block B, and there is no block B, then you get an Obsolete block instead. The name is actually a misnomer; we inherited it from Scratch, before they had custom blocks, and they gave you an Obsolete block if your Scratch 1.4 program used a Scratch 1.2 block that no longer existed. So "obsolete" made sense in that context.

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