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

#1 2011-07-18 13:19:12

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Developing BLOCK files.

nXIII made Scratch Patches.
Someone at the block library decided to make a block patch.
You would import a block, easy shmeezy.
But we need help making BLOCK files.
Several times people have posted saying that it doesn't work.
I want to fix that.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We have to create a BLOCK file, which contains the blockspec and code for the block, as well as where it goes.
That's pretty much it.  tongue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whizzer has been a big help, creating the first prototype for us to work off of.

Last edited by scimonster (2011-09-07 15:00:06)

Offline

 

#2 2011-07-18 13:24:10

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: Developing BLOCK files.

I'll help!


the the the the the

Offline

 

#3 2011-07-18 13:25:16

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Developing BLOCK files.

I just added a devs list.  smile

Offline

 

#4 2011-07-18 13:35:39

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: Developing BLOCK files.

Possibly LiquidMetal.

Offline

 

#5 2011-07-18 14:05:44

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Developing BLOCK files.

If Squeak has proper string finding stuff, you could just find the proper block category in the blockspecs area and add the blockspec at the end (by the closing parentheses). Then simply use the regular patcher system to put a new method for the block in the proper ops are. Adding additional code would just be a little trickier.


Yawn.

Offline

 

#6 2011-07-18 14:14:20

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Developing BLOCK files.

meowmeow55 wrote:

If Squeak has proper string finding stuff, you could just find the proper block category in the blockspecs area and add the blockspec at the end (by the closing parentheses). Then simply use the regular patcher system to put a new method for the block in the proper ops are. Adding additional code would just be a little trickier.

Probably...

Offline

 

#7 2011-07-19 15:20:03

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: Developing BLOCK files.

bump


the the the the the

Offline

 

#8 2011-07-20 02:50:19

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Developing BLOCK files.

i will try but i wont gurantee i will succeed


http://i47.tinypic.com/rrqe13.gif

Offline

 

#9 2011-07-20 03:26:36

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Developing BLOCK files.

ok so we type the code and change the extension to .BLOCK?


http://i47.tinypic.com/rrqe13.gif

Offline

 

#10 2011-07-20 03:32:29

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Developing BLOCK files.

That's not just it. It also has to specify where the code goes.
And you need to specify the image locations in your sig.  wink

Offline

 

#11 2011-07-20 05:28:22

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Developing BLOCK files.

Panther has block adding capabilities. nXIII programmed that and it goes waaaay beyond my understanding of smalltalk but if you can find it in the Panther browser we might be able to find a way to "file in" the code responsible for it, then use the code for the panther "import block $Number$ from the library" block to react to a .BLOCK file you choose with a file browser?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#12 2011-07-20 05:59:47

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Developing BLOCK files.

sparks wrote:

Panther has block adding capabilities. nXIII programmed that and it goes waaaay beyond my understanding of smalltalk but if you can find it in the Panther browser we might be able to find a way to "file in" the code responsible for it, then use the code for the panther "import block $Number$ from the library" block to react to a .BLOCK file you choose with a file browser?

I know about Panther.  tongue
I'll try... but I'm sure it's waaaaaay beyond my understanding of Smalltalk!

Offline

 

#13 2011-07-21 21:56:45

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: Developing BLOCK files.

Still lost here.

Offline

 

#14 2011-07-22 01:05:33

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Developing BLOCK files.

...you can't export as XML and rename it with the code?


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#15 2011-07-22 07:14:18

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Developing BLOCK files.

I'll help


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#16 2011-07-22 08:39:18

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: Developing BLOCK files.

hey people, why don't we just use the code from the script importer/exporter in Chirp?


the the the the the

Offline

 

#17 2011-07-22 11:39:59

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: Developing BLOCK files.

bbbeb wrote:

...you can't export as XML and rename it with the code?

You could save a animated gif as a .exe if you wanted to, it just wouldn't run, so you shouldn't even need two steps.

Offline

 

#18 2011-07-22 18:58:04

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Developing BLOCK files.

is there any way to copy the code from panther "the download block $number$" code and paste it into the workspace? will that work?


http://i47.tinypic.com/rrqe13.gif

Offline

 

#19 2011-07-22 19:16:22

poemon1
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Developing BLOCK files.

ok so i got it so it does not say "syntax error" but it wont show the block


http://i47.tinypic.com/rrqe13.gif

Offline

 

#20 2011-07-25 12:31:29

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Developing BLOCK files.

*Laughs* I think the code is like when you put stuff in the workspace and file-it-in. Just put the code in and save it as a .block file!


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#21 2011-07-25 12:40:19

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

Re: Developing BLOCK files.

ill help, this rocks!

I was thinking of making importable scripts, but this is close enough!

Offline

 

#22 2011-08-14 09:23:32

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Developing BLOCK files.

How do we do it? I wanna help!

Offline

 

#23 2011-08-14 09:40:52

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Developing BLOCK files.

Ill start delving into Panther, and start to understand it....

LS97 should be able to help...


And where is nXIII these days?


You can now reach me on Twitter @johnnydean1_

Offline

 

#24 2011-08-14 09:46:20

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Developing BLOCK files.

Panther does it by:
Having an array of blockspecs, which render themselves into the variable tab when requested. Much like adding a variable. Then when run it looks for the saved code (which I think is stored in another array)

By array I mean an OrderedCollection.


You can now reach me on Twitter @johnnydean1_

Offline

 

#25 2011-08-14 10:41:12

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Developing BLOCK files.

whizzer wrote:

*Laughs* I think the code is like when you put stuff in the workspace and file-it-in. Just put the code in and save it as a .block file!

Does anyone value my opinion?


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

Board footer