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

#1351 2011-06-26 18:48:37

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

ProgrammingFreak wrote:

Move () Steps [ ]
By ProgrammingFreak
New DropDown:

Code:

$z = code ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #moveStepsMenu; choice: 'right'].

moveStepsMenu Method

Code:

moveStepsMenu
    ^ #('left' 'right' 'down' 'up')

moveDirectionStep Method

Code:

moveDirectionStep: t1 
    'right' = t1 ifTrue: [self forward].
    'left' = t1 ifTrue: [self backward].
    'up' = t1 ifTrue: [self up].
    'down' = t1 ifTrue: [self down].

backward method:

Code:

backward: t1
| t2 |
t2_  0 - t1.
self forward: t2.

down method

Code:

down: t1
    | t2|
                 t2_ self heading.
                self heading: 180.
    self forward: t1.
                self heading: t2.

up method

Code:

up: t1 
    | t2|
                 t2_ self heading.
                self heading: 0.
    self forward: t1.
                self heading: t2.

BlockSpec:

Code:

('move %n steps %z' #- #moveDirectionStep:)

Ops: Motion

This block redoes the 'Move () Steps' block.

Where do you put the top line of code?

Also, would %(number), %(shift value), or %(alt value) work for new dropdowns? Like, %ø, %9, or %@?

Last edited by TuragaTreeko (2011-06-26 18:50:41)


http://goo.gl/RDqKF

Offline

 

#1352 2011-06-26 18:54:08

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

TuragaTreeko wrote:

jslomba wrote:


No, it was %z. Maybe you could add a section to the library that has all the %somethings so nobody gets
Confused. (sent from iPhone)

That is a wonderful idea. Like, a little chart that goes

%s    string
%n   number
%g   effect
ect. ....
It would help people who are confused about which is which. (like me)

no, it's so two blocks that don't have the same dropdowns that share %z won't get glitched if someone uses both of them.

Well, yeah... but I once used %b for a dropdown list of scratch users (quite a long list - it was for my open user block). That epicly failed. Because I was confused.


http://goo.gl/RDqKF

Offline

 

#1353 2011-06-27 00:35:25

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

Re: ITopic: Welcome to your local block library!

TuragaTreeko wrote:

Would %(number), %(shift value), or %(alt value) work for new dropdowns? Like, %ø, %9, or %@?

Hmm, I wonder! I'll try that out later, when I'm back on my own comp.  smile

sparks wrote:

WindowsExplorer wrote:

This must of taken a long time to make!

It's been continuously updated with new features since it started on July 15th, 2010  smile

Actually, that makes it almost a year since the block library started! Librarians and contributors, any thoughts on something to do to commemorate/celebrate? A title competition is always fun  smile

Yeah, title competition! Do something with 1 year anniversary.  tongue  I might upload one in a project because I can't upload images to hosting sites.  sad

Last edited by scimonster (2011-06-27 00:36:56)

Offline

 

#1354 2011-06-27 05:16:26

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

Re: ITopic: Welcome to your local block library!

The list of (almost all) existing arguments and their Panther equivalents are available on the squeak tutorial Wiki page!

A 1 year themed celebratory event certainly would be fun to do, I think if possible it should be something that will attract some new visitors to the library, e.g. people make projects about the library and what they like or a "how to use the library" project or something along those lines, then the winner gets something (if it's a how-to it could be linked in the library, otherwise love - it's or some other reward could be offered). This way we'll also be attracting new visitors to the site by linking the project to the library. I bet there are loads of Scratchers who haven't heard of the library yet because they don't spend time in the fora  smile

It's the %e of the year!

Last edited by sparks (2011-06-27 05:17:08)


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

Offline

 

#1355 2011-06-27 06:48:50

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

The list of (almost all) existing arguments and their Panther equivalents are available on the squeak tutorial Wiki page!

A 1 year themed celebratory event certainly would be fun to do, I think if possible it should be something that will attract some new visitors to the library, e.g. people make projects about the library and what they like or a "how to use the library" project or something along those lines, then the winner gets something (if it's a how-to it could be linked in the library, otherwise love - it's or some other reward could be offered). This way we'll also be attracting new visitors to the site by linking the project to the library. I bet there are loads of Scratchers who haven't heard of the library yet because they don't spend time in the fora  smile

It's the %e of the year!

Events.  tongue

I like this idea!  big_smile

Offline

 

#1356 2011-06-27 08:45:09

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

I have a block!
blockspecs:

Code:

 ('Inform %s' #- #inform: 'You are probably a human being.')

ops:

Code:

 inform: t1 
    DialogBoxMorph inform: t1

This is sort of like the warn box, but it doesn't have the exclamation point, which makes it feel less urgent.


http://goo.gl/RDqKF

Offline

 

#1357 2011-06-27 09:30:23

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

Have you noticed, that no matter the code, the user block I made (as well as jslomba's) just don't work? It's because it isn't recognizing t1 as a string. So...

Code:

 doOpenUser: t1 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , t1 asString]

http://goo.gl/RDqKF

Offline

 

#1358 2011-06-27 11:04:49

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

Re: ITopic: Welcome to your local block library!

I used the block lib's weebly account 'cause I'm not allowed my own yet (:C), so here's my logo:
http://weebly.com/uploads/7/1/1/0/7110842/7339222.png
I used GIMP, and it had 22 layers! If you want, I could remove all the  big_smile s.

EDIT: 4400th post!  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  big_smile  (Same amount of  big_smile s as the image has.  tongue )

Last edited by scimonster (2011-06-27 11:07:00)

Offline

 

#1359 2011-06-27 12:32:46

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

Re: ITopic: Welcome to your local block library!

That's pretty cool Sci, We haven't actually decided on what competition we're doing or what the guidelines are yet, I also don't think it's fair for any librarians to enter whatever competition we do have either because if one of them is chosen it could look like favouritism  smile


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

Offline

 

#1360 2011-06-27 12:57:09

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

That's pretty cool Sci,

Thanks!

sparks wrote:

We haven't actually decided on what competition we're doing or what the guidelines are yet,

So let's do that.

sparks wrote:

I also don't think it's fair for any librarians to enter whatever competition we do have either because if one of them is chosen it could look like favouritism  smile

sad  Pecola1 had his chosen, but we hadn't started the new one yet.
How about we set deadline and then use sigpoll to vote on which one!  smile

Offline

 

#1361 2011-06-27 13:33:26

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

Re: ITopic: Welcome to your local block library!

I agree that everyone should be able to vote on each image, how about I set up a php voting page on the library site. If all entries are emailed to me then that means they can be displayed on the voting page without names meaning that bias is eliminated. I can use the Scratch API to make sure that Scratchers only vote once (IP based voting would mean that I could vote up to six times in my home alone!). Thoughts?


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

Offline

 

#1362 2011-06-27 13:37:45

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

I agree that everyone should be able to vote on each image, how about I set up a PHP voting page on the library site.

Sounds good!

sparks wrote:

If all entries are emailed to me then that means they can be displayed on the voting page without names meaning that bias is eliminated.

That would be good too.

sparks wrote:

I can use the Scratch API to make sure that Scratchers only vote once

Good, but what about test accounts? I could vote for mine from scimonster, sci_test, ignore_user, and comment_list.

sparks wrote:

(IP based voting would mean that I could vote up to six times in my home alone!).

yikes

sparks wrote:

Thoughts?

Just gave you some.  tongue

Offline

 

#1363 2011-06-27 14:13:05

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

So a project about this?  big_smile

Offline

 

#1364 2011-06-27 14:35:35

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

Re: ITopic: Welcome to your local block library!

We're not sure. Some sort of competition to celebrate a year of the library. A project is a nice idea because it might draw in new users whilst a special library header is always fun and we've done it before!


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

Offline

 

#1365 2011-06-27 14:45:06

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

We're not sure. Some sort of competition to celebrate a year of the library. A project is a nice idea because it might draw in new users whilst a special library header is always fun and we've done it before!

Hmm, maybe like Scratch and Google. A season thing.  smile
But you could also have a block contest. Maybe harder for newer people.  hmm

Offline

 

#1366 2011-06-27 14:59:14

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

the untested import thing currently does not work because we haven't worked out now to get our blocks to work with it yet... Sorry!

well that's pointless for now! I have it in my Scratch. I'll try to make a block file and import it. Even thought I'm not a developer, I'll help you guys out, just because.


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

 

#1367 2011-06-27 17:31:02

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Wait, are you guys going to accept http://polyeztahpuppies.webs.com/goinbetween.gif?  If not, why?

Last edited by Greenatic (2011-06-27 17:31:19)

Offline

 

#1368 2011-06-27 18:01:19

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

sparks wrote:

I agree that everyone should be able to vote on each image, how about I set up a PHP voting page on the library site.

Sounds good! Agreed

sparks wrote:

If all entries are emailed to me then that means they can be displayed on the voting page without names meaning that bias is eliminated.

That would be good too. What's wrong with the Scratch Forums?

sparks wrote:

I can use the Scratch API to make sure that Scratchers only vote once

Good, but what about test accounts? I could vote for mine from scimonster, sci_test, ignore_user, and comment_list. It's better than nothing.

sparks wrote:

(IP based voting would mean that I could vote up to six times in my home alone!).

yikes  <-- Yeah. I could vote 4 times.


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#1369 2011-06-27 18:55:22

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: ITopic: Welcome to your local block library!

heaven forbid people use the Scratch Wiki


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

#1370 2011-06-27 19:22:55

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

Re: ITopic: Welcome to your local block library!

@SSBBM, What's wrong with the Scratch fora? Well by using a seperate page we can vote anonymously and also people won't know who made the image they voted for, meaning that personal feelings towards other Scratchers will not sway your vote!


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

Offline

 

#1371 2011-06-28 01:49:55

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

Re: ITopic: Welcome to your local block library!

TVflea wrote:

heaven forbid people use the Scratch Wiki

The Wiki isn't set up for this kind of thing.  tongue

Offline

 

#1372 2011-06-28 12:11:50

TuragaTreeko
Scratcher
Registered: 2011-04-24
Posts: 100+

Re: ITopic: Welcome to your local block library!

@jslomba...

jslomba wrote:

new scratch blocks i made:http://megamod.weebly.com/uploads/7/1/5 … 588685.gif

blockspec:

Code:

('if online then stop' #- #ifOnlineThenStop)

code:

Code:

ifOnlineThenStop
| t1 t2 t3 |
t1_t2

http://newblocks.weebly.com/uploads/7/1 … 995652.gif

blockspec:

('confirm %s' #b #confirm:)

no code needed

what it does: asks the user a yes/no question and is false if the user selects no, true if he/she selects yes

http://newblocks.weebly.com/uploads/7/1 … 995652.gif

blockspec:

('alert %s' #- #inform:)

no code needed

http://newblocks.weebly.com/uploads/7/1 … 600351.gif

Scratch-Blocks->WhenHatBlockMorph->all:

stepTime
^ 0.1

and

step
self evaluateCondition ifTrue: [self start]

blockspec:

('' #W #-)

(you don't give the block a name because the WhenHatBlockMorph class automatically adds the label.)

DROPDOWN VERSION OF: http://www.weebly.com/uploads/4/0/7/6/4 … 875422.gif

Scratch blocks> commandBlockMorph> all> uncoloredArgMorphFor: add a strip:

$Q = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #dateTime;
choice: 'date'].

Scratch objects> scriptableScratchMorph> sensingOps:

dateTime
    ^ #('date' 'short date' 'time' 'seconds' 'minutes' 'hours' 'day')

new blockspec:

('get %Q' #r #getTime: 'date')

http://newblocks.weebly.com/uploads/7/1 … 459236.gif

blockspec:

(' %z as decimal' #r #decimalOf:)

code:

decimalOf: t1
'1/2' = t1 ifTrue: [^ '.5'].
'1/3' = t1 ifTrue: [^ '.333333333'].
'1/4' = t1 ifTrue: [^ '.25'].
'1/5' = t1 ifTrue: [^ '.2'].
'1/6' = t1 ifTrue: [^ '.666666666'].
'1/7' = t1 ifTrue: [^ '.1428'].
'1/8' = t1 ifTrue: [^ '.125'].
'1/9' = t1 ifTrue: [^ '.111111111'].
'1/10' = t1 ifTrue: [^ '.1'].

if you have the (1/2 of ( ) ) block already, then you don't need to make the uncoloredArgMorph.

http://megamod.weebly.com/uploads/7/1/5 … 212093.gif:

blockspec:

('if %b bounce' #- #bnceIfBoolean)

code:

bnceIfBoolean: condition
     condition ifTrue: [self turnRight: 180]

http://www.weebly.com/uploads/5/4/1/3/5 … 274704.gifdropdown:

Blockspec:

('%n %X %n' #r #workOut:with:to:)

Code:
workOut: t1 with: t2 to: t3
    t2 = '+' ifTrue: [^ t1 + t3].
    t2 = 'minus' ifTrue: [^ t1 - t3].
    t2 = '*' ifTrue: [^ t1 * t3].
    t2 = '/' ifTrue: [^t1 / t3].
    ^ 'Error!'

uncoloredArgMorph:
$X = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #opNames;
         choice: '+'].

code2:
opNames
    ^ #('+' 'minus' '*' '/' )

http://megamod.weebly.com/uploads/7/1/5 … 181233.gif

blockspec:

   
('open scratch user %s s my stuff page ' #- #Userlink: 'jslomba')

code:

   
Userlink: user
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , user]

I have found glitches (and solutions) for a couple of theese. In opNames for the dropdown %n %X %n, it can work with the other blocks code if you just use '-' instead of 'minus'. Also, 

Code:

Userlink: t1 
    Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/' , t1 asString]

works sooo much better for the open user block, it's not even funny. (By the way, the confirm block works amazingly. I hope it gets added.)

Last edited by TuragaTreeko (2011-06-28 12:12:13)


http://goo.gl/RDqKF

Offline

 

#1373 2011-06-28 12:23:57

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

TuragaTreeko wrote:

Would %(number), %(shift value), or %(alt value) work for new dropdowns? Like, %ø, %9, or %@?

Hmm, I wonder! I'll try that out later, when I'm back on my own comp.  smile

sparks wrote:

WindowsExplorer wrote:

This must of taken a long time to make!

It's been continuously updated with new features since it started on July 15th, 2010  smile

Actually, that makes it almost a year since the block library started! Librarians and contributors, any thoughts on something to do to commemorate/celebrate? A title competition is always fun  smile

Yeah, title competition! Do something with 1 year anniversary.  tongue  I might upload one in a project because I can't upload images to hosting sites.  sad

IDK, I know ' would ALMOST work, but the blockspec didn't allow it.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1374 2011-06-28 12:27:23

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

It's the %e of the year!

I see what you did there.  tongue  That is a great idea. You could hold another block library front post picture contest like the Christmas one too! (then I would have a chance to win again XD) It could be Your Local Block Library Day!


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#1375 2011-06-28 12:28:16

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

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

scimonster wrote:

TuragaTreeko wrote:

Would %(number), %(shift value), or %(alt value) work for new dropdowns? Like, %ø, %9, or %@?

Hmm, I wonder! I'll try that out later, when I'm back on my own comp.  smile

sparks wrote:


It's been continuously updated with new features since it started on July 15th, 2010  smile

Actually, that makes it almost a year since the block library started! Librarians and contributors, any thoughts on something to do to commemorate/celebrate? A title competition is always fun  smile

Yeah, title competition! Do something with 1 year anniversary.  tongue  I might upload one in a project because I can't upload images to hosting sites.  sad

IDK, I know ' would ALMOST work, but the blockspec didn't allow it.

('%1' #- #thing:) showed as http://theblocklibrary.site11.com/include/img/blocks/specparser.php?spec=%%201&amp;type=stack&amp;color=control

Offline

 

Board footer