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

#1 2011-08-22 16:16:25

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Run Method Block?

How do I make that block?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-08-22 16:24:27

jordach
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Run Method Block?

WindowsExplorer wrote:

How do I make that block?

I think you were looking at the Block Library, I think I can help.

Offline

 

#3 2011-08-22 16:28:12

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Run Method Block?

compiler run: or something  hmm

Offline

 

#4 2011-08-22 16:29:01

jordach
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Run Method Block?

I think you mean If <x=x> do option 1 or <x=y> do option 2? On those lines?

Offline

 

#5 2011-08-22 16:29:26

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

Wha?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#6 2011-08-22 16:31:43

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

no, heres what I've done:

Blockspec:

('run %s' #- #run: 'method')

Code:

run: t1
     self t1 asString.

Last edited by WindowsExplorer (2011-08-22 16:31:53)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#7 2011-08-22 16:33:38

jordach
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Run Method Block?

Like so?

http://i34.tinypic.com/2d18yua.jpg

Offline

 

#8 2011-08-22 16:34:49

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

no, I just need help debugging teh code above.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#9 2011-08-22 16:36:58

jordach
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Run Method Block?

Its source can be found here.

http://totalconcat.org/BYOB%20block%20library%20sprites/if,%20elif.ysp

Offline

 

#10 2011-08-22 16:38:10

jordach
Scratcher
Registered: 2010-03-12
Posts: 23

Re: Run Method Block?

Wait, you mean putting a block in another block?

Offline

 

#11 2011-08-22 16:39:44

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

no. I just need help debugging the code in my second post on this topic.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#12 2011-08-22 16:40:54

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Run Method Block?

WindowsExplorer wrote:

no, I just need help debugging teh code above.

It doesn't work, because what you're asking there is passing t1 onto 'self', and t1 is a method. You'll need a pointer if you want to do that, and I don't think Squeak supports pointers.

But that doesn't matter since we've got easy methods to do that anyway.
Try
compiler execute: for:
or execute: for:

meh i forget  hmm

Offline

 

#13 2011-08-22 16:42:40

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

but other mods did it. I just want to code to run code with a block.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#14 2011-08-23 03:21:12

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Run Method Block?

hack the mods and find the code in it


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#15 2011-08-23 03:54:28

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Run Method Block?

Finally dug up the code from Bingo 1.2!
it's Compiler evaluate: aString for: self logged: false

Offline

 

#16 2011-08-23 04:19:55

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: Run Method Block?

Thank you! I may be releasing a beta version of gopher soon  roll


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

Board footer