This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-02-20 09:46:35

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Editing Options For Blocks

One of the features I like best about math blocks is the ability to exchange their operator simply by right clicking on a math block and selecting the desired alternative, turning a "+" into a "-" etc. That way you don't have to tear apart complex block stacks just to get rid of a "wrong" block, and then reassemble the script after getting the "right" one. The same wish often occurs to me when I use other blocks as well, like wanting to turn a "broadcast" block into a "broadcast and wait" block at some later time.

I've found out, that adding such options to the right-click menu of each command block is actually rather easy using the Scratch source code, and I have just now finished a little patch for just that:

http://scratch.mit.edu/projects/Jens/103320

Thought I might share it with anybody who's interested.


Jens Mönig

Offline

 

#2 2008-02-21 05:10:12

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

I have just completed and updated my project code with additional options for stage blocks, reporter blocks and variable blocks. Now you can also:

   - change any variable "set" block to became a "change" block (and vice-versa)
   - associate any variable block (accessor or reporter) with another variable

This last feature can help you manually rename variables in your project, without having to tear apart/reassemble all of your scripts.

For those Squeakers of you with slow connections just interested in the Squeak code, I've also posted it on SqueakMap: http://map.squeak.org/package/9da38346-bfb4-4c8e-ad5d-5dcebaf12667/autoversion/2


Jens Mönig

Offline

 

#3 2008-02-21 09:50:26

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Editing Options For Blocks

If you put the first code into the Scratch Source Code, how is it possible to 'update' to the newer version?


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#4 2008-02-21 10:18:47

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

relyt12101: You can always "unlock" the application you built using the Scratch source code by shift clicking on the "Extras" button and selecting "Exit user mode". You can then file in additional patches (in Smalltalk they're called "changesets") and again save the image (your application) in user mode. If you file in the updated code from my project you will automatically get an updated version of your own Scratch-Power-Editor application.

Perhaps I should post a real "patch", i.e. an installer which would add another finalized image with my editing features (and the xml functions as well) to the Scratch folder and add an additional entry to the windows shell to load any Scratch project either into Scratch, to run it in full screen mode, or to edit it using these  "hacked" features... This installable patch would be about 2 MB in size. Problem is, my own website doesn't have that kind of capacity.


Jens Mönig

Offline

 

#5 2008-02-22 12:09:05

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Editing Options For Blocks

If I can get hold of it somehow, I can probably host it on my site.

SB


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#6 2008-02-22 12:31:25

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Editing Options For Blocks

Would this make the resultant scratch projects incompatable with Scratch 1.2.1?


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#7 2008-02-22 13:38:32

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

ScipioBellorum wrote:

If I can get hold of it somehow, I can probably host it on my site.

Good! I'll put it together as soon as I'll find some time (in the meantime you can just file in the changeset into your downloaded copy of the Scratch source code).

Mayhem wrote:

Would this make the resultant scratch projects incompatable with Scratch 1.2.1?

Absolutely not! The projects edited using these features are 100% compatible, since I'm neither introducing any new blocks nor changing the syntax of Scratch, I'm just adding some editing options for blocks, enhancing what can already be done with math blocks for other blocks as well (therefore the project itself is not *that* original after all).


Jens Mönig

Offline

 

#8 2008-02-22 13:51:52

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Editing Options For Blocks

Sweet!


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#9 2008-02-22 17:30:13

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Editing Options For Blocks

When you say:

file in the changeset into your downloaded copy of the Scratch source code

What do you mean exactly?

SB


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#10 2008-02-23 03:06:50

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

ScipioBellorum: I was suggesting to do as shown in my little project, i.e. download the Scratch source code and my little project, copy/paste the Squeak source code in the unconnected think block into a Squeak workspace and select "file it in".


Jens Mönig

Offline

 

#11 2008-02-23 07:25:27

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Editing Options For Blocks

Jens - I've downloaded it and it works really well. Great work! You can find the download page here. Should I change anything?

MIT Scratch people - Is this ok? I just want to make sure we aren't breaking any copyright rules or anything. Thanks.

SB


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#12 2008-02-23 14:45:56

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

ScipioBellorum, fantastic work! But your installation instructions are a bit scary..., and I only wrote a tiny changeset of about 12 Kb, and not the whole application, which was developed - as we all know - by MIT's LLK. Also, probably we shouldn't be naming it anything with "Scratch" and include the original license with the package. I'll work out an installation routine which will just "plug" this into the Scratch installation without harming it...


Jens Mönig

Offline

 

#13 2008-02-23 15:58:22

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Editing Options For Blocks

Sorry, I wasn't sure whether to tell people to download the scratch source code and then file in the changeset or just download the whole thing in one. I thought the later would be easier.

Just tell me waht to change and I'll do so as soon as possible.

SB


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#14 2008-02-23 18:24:21

relyt12101
Scratcher
Registered: 2007-05-19
Posts: 500+

Re: Editing Options For Blocks

SB - Also, it's Scratch 1.2.1, not 1.2.2.


http://img392.imageshack.us/img392/2860/pspbanneregg089deiy0.png

Offline

 

#15 2008-02-23 18:32:06

ScipioBellorum
Scratcher
Registered: 2007-05-15
Posts: 94

Re: Editing Options For Blocks

Oh! Thanks! It's fixed now and I've changed the name to Options Patch for now.

SB

Last edited by ScipioBellorum (2008-02-23 18:38:19)


http://img393.imageshack.us/img393/339/logory8.png
                      The word processor for Scratch

Offline

 

#16 2008-02-24 10:10:10

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Editing Options For Blocks

excellent! I'll holler once I'm ready..., thanks!


Jens Mönig

Offline

 

Board footer