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

#1 2011-08-18 14:49:34

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

What is this?????????????????

What is a special form block and how do you code it? I want a block that looks like a triangle and a triangle inserter.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#2 2011-08-18 14:52:11

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

Re: What is this?????????????????

It's extremely complicated.


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

Offline

 

#3 2011-08-18 15:18:53

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: What is this?????????????????

is that like the command inserter in byob?

Offline

 

#4 2011-08-18 16:22:41

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: What is this?????????????????

When you want to access things like the ScratchStackFrame, ScratchProcess and so on (like the if/else and C blocks do) in the selector associated to your block (that selector must be declared in ScratchProcess), you have to say that it is a special form. By declaring your block as a special form, it will be evaluated by ScratchProcess>>evaluateSpecialForm, which will call the selector you've defined in ScratchProcess. If you don't, then your block will be evaluated by evaluateWithArgs: which will call the selector you've defined in ScriptableScratchMorph or one of its subclasses. Take a look at ScratchProcess>>evaluateCommandFor: to see how it differentiates these 2 kinds of blocks.

Offline

 

#5 2011-08-18 16:22:54

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: What is this?????????????????

I know that it's complicated. Thats why I want to learn!!!!!!!


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

Board footer