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

#1 2010-08-10 09:07:12

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Making an Advanced squeak block.

I am trying to make a few advanced squeak blocks,

[run code [   ] ]

(run code [   ] )

[ScratchFrameMorph run code [   ] ]

(ScratchFrameMorph run code [   ] )

but I need to know two things:

How can I add Enter to the ExpressionArgMorph?

How can I make something run code given through a textbox?

Offline

 

#2 2010-08-10 09:14:27

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

Re: Making an Advanced squeak block.

Billybob-Mario wrote:

I am trying to make a few advanced squeak blocks,

[run code [   ] ]
Compiler evaluate: t1 for: self logged: false

(run code [   ] )
^ Compiler evaluate: t1 for: self logged: false

[ScratchFrameMorph run code [   ] ]
Compiler evaluate: t1 for: ScratchFrameMorph logged: false

(ScratchFrameMorph run code [   ] )
^ Compiler evaluate: t1 for: ScratchFrameMorph logged: false

but I need to know two things:

How can I add Enter to the ExpressionArgMorph?
i'll need to investigate. you don't need it anyway.

How can I make something run code given through a textbox?
no clue what you're talking about

Offline

 

#3 2010-08-10 10:06:51

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

LS97 wrote:

Billybob-Mario wrote:

I am trying to make a few advanced squeak blocks,

[run code [   ] ]
Compiler evaluate: t1 for: self logged: false

(run code [   ] )
^ Compiler evaluate: t1 for: self logged: false

[ScratchFrameMorph run code [   ] ]
Compiler evaluate: t1 for: ScratchFrameMorph logged: false

(ScratchFrameMorph run code [   ] )
^ Compiler evaluate: t1 for: ScratchFrameMorph logged: false

but I need to know two things:

How can I add Enter to the ExpressionArgMorph?
i'll need to investigate. you don't need it anyway.

How can I make something run code given through a textbox?
no clue what you're talking about
You solved this above.

Thank you.

Offline

 

#4 2010-08-10 10:32:09

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

Re: Making an Advanced squeak block.

you're welcome. happy to help  smile

Offline

 

#5 2010-08-10 10:48:19

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

I need enter because it makes you able to write long commands.

Offline

 

#6 2010-08-10 10:51:15

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

Re: Making an Advanced squeak block.

The flag is already designed for enter. Press enter and the flags pressed!


You can now reach me on Twitter @johnnydean1_

Offline

 

#7 2010-08-10 10:54:15

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

Re: Making an Advanced squeak block.

johnnydean1 wrote:

The flag is already designed for enter. Press enter and the flags pressed!

- . -
that's not what b-m meant

Offline

 

#8 2010-08-10 10:55:36

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

Re: Making an Advanced squeak block.

Billybob-Mario wrote:

I need enter because it makes you able to write long commands.

you don't really need enter, the commands are separated by a dot anyway. in fact,

self action. self beep. ^ 12.

is the same as

self action.
self beep.
^ 12.

Offline

 

#9 2010-08-10 10:58:29

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

LS97 wrote:

Billybob-Mario wrote:

I need enter because it makes you able to write long commands.

you don't really need enter, the commands are separated by a dot anyway. in fact,

self action. self beep. ^ 12.

is the same as

self action.
self beep.
^ 12.

Someone might want to make a long command. Also, it could be useful in other places.

Offline

 

#10 2010-08-10 11:17:57

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

I think that I'm done, and thanks for all the help, but if someone finds how to add enter, let me know.

Offline

 

#11 2010-08-10 13:25:44

celloguy123
Scratcher
Registered: 2009-01-15
Posts: 100+

Re: Making an Advanced squeak block.

I know what you mean, Billybob-Mario. You want to be able to do
[blocks] <key[ enter  ]pressed?> [/blocks]
right? As far as I know, you can't.

Last edited by celloguy123 (2010-08-10 13:27:24)


http://internetometer.com/image/33068.png

Offline

 

#12 2010-08-10 13:35:37

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Making an Advanced squeak block.

celloguy123 wrote:

I know what you mean, Billybob-Mario. You want to be able to do
[blocks] <key[ enter  ]pressed?> [/blocks]
right? As far as I know, you can't.

NO.

This person wants to be able to have an enter to type multiple lines of code. You need to read the posts above....


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#13 2010-08-10 16:57:00

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Making an Advanced squeak block.

Billybob-Mario wrote:

LS97 wrote:

Billybob-Mario wrote:

I am trying to make a few advanced squeak blocks,

[run code [   ] ]
Compiler evaluate: t1 for: self logged: false

(run code [   ] )
^ Compiler evaluate: t1 for: self logged: false

[ScratchFrameMorph run code [   ] ]
Compiler evaluate: t1 for: ScratchFrameMorph logged: false

(ScratchFrameMorph run code [   ] )
^ Compiler evaluate: t1 for: ScratchFrameMorph logged: false

but I need to know two things:

How can I add Enter to the ExpressionArgMorph?
i'll need to investigate. you don't need it anyway.

How can I make something run code given through a textbox?
no clue what you're talking about
You solved this above.

Thank you.

Glad to help the person who helped you! :D

Oh, and, you can make an ExpressionArgMorph subclass which uses MultilineSctringMorphs or ScrollingStringMorphs instead of StringFieldMorphs.

Come to think of it, this isn't really an advanced Squeak block. And advanced Squeak block wouldusually have something to do with the creation of classes from your code.... >:D
(I think I've ended every post today with that smiley)


nXIII

Offline

 

#14 2010-08-10 16:59:23

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

nXIII wrote:

Billybob-Mario wrote:

LS97 wrote:

Thank you.

Glad to help the person who helped you!  big_smile

Oh, and, you can make an ExpressionArgMorph subclass which uses MultilineSctringMorphs or ScrollingStringMorphs instead of StringFieldMorphs.

Come to think of it, this isn't really an advanced Squeak block. And advanced Squeak block wouldusually have something to do with the creation of classes from your code.... > big_smile
(I think I've ended every post today with that smiley)

The first thing I tried was adding a subclass called LongExpressionArgMorph (it's still there) from MultiLineStringMorph, but it didn't work. I moved one method and a few variables over to ExpressionArgMorph to see if that would work. That didn't work either.

I view these blocks as advanced because they let the user input and run squeak.

Last edited by Billybob-Mario (2010-08-10 17:00:03)

Offline

 

#15 2010-08-10 17:26:56

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Making an Advanced squeak block.

Make an ExpressionArgMorph subclass
----------
60 seconds
-0 seconds
-- seconds
---seconds
----econds
-----conds
------onds
-------nds
--------ds
---------s
----------


nXIII

Offline

 

#16 2010-08-10 17:32:48

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Making an Advanced squeak block.

nXIII wrote:

Make an ExpressionArgMorph subclass
----------
60 seconds
-0 seconds
-- seconds
---seconds
----econds
-----conds
------onds
-------nds
--------ds
---------s
----------

I did and I gave it the stuff that MultiLineStringMorph had and put it in a block, then I couldn't even view the category.

Offline

 

#17 2010-08-10 17:43:41

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Making an Advanced squeak block.

Then you did it wrong. I've already done it for Panther.


nXIII

Offline

 

#18 2010-08-11 05:25:54

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

Re: Making an Advanced squeak block.

i'm trying to make it before panther gets released so that it doesnt seem i copied  smile

Offline

 

#19 2010-08-11 16:47:13

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Making an Advanced squeak block.

big_smile

...

Wait, I thought Billybob-Mario was making it!  yikes


nXIII

Offline

 

#20 2010-08-12 05:13:34

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

Re: Making an Advanced squeak block.

i'm trying to make it too

Offline

 

#21 2010-08-12 16:00:07

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Making an Advanced squeak block.

Ah. Well. Okay! Good luck!  smile


nXIII

Offline

 

Board footer