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

#2776 2012-04-22 12:04:01

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

Re: ITopic: Welcome to your local block library!

dreamod wrote:

Greenatic wrote:

dreamod wrote:


It worked for me. sorry.

Looks like there's a typo:

Code:

| t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.

Try this (I haven't tested it):

Code:

dreamod (improved by Greenatic)
save project at directory $String$
-
#E6A822
    |t1 t2 t3|
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

That wasn't a typo. t3 is supposed to store a string with text that is going to be interpreted as code for a ScratchFrameMorph, The string quotes are supposed to be there.

Alright then, I think you're missing a quote and a period at the end.

Code:

t3 _ '| t1 t2 t3 |

Offline

 

#2777 2012-04-23 15:45:02

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

dreamod wrote:

Greenatic wrote:


Looks like there's a typo:

Code:

| t2 t3 |
    t3 _ '| t1 t2 t3 |
    t1 _ ''' , t1 , '''.

Try this (I haven't tested it):

Code:

dreamod (improved by Greenatic)
save project at directory $String$
-
#E6A822
    |t1 t2 t3|
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

That wasn't a typo. t3 is supposed to store a string with text that is going to be interpreted as code for a ScratchFrameMorph, The string quotes are supposed to be there.

Alright then, I think you're missing a quote and a period at the end.

Code:

t3 _ '| t1 t2 t3 |

That one just came up with a "Syntax Error"


I'm back.
Maybe.

Offline

 

#2778 2012-04-23 17:18:11

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

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

Greenatic wrote:

dreamod wrote:


That wasn't a typo. t3 is supposed to store a string with text that is going to be interpreted as code for a ScratchFrameMorph, The string quotes are supposed to be there.

Alright then, I think you're missing a quote and a period at the end.

Code:

t3 _ '| t1 t2 t3 |

That one just came up with a "Syntax Error"

Did you add '. to the end of that part, then put the rest back in?

Offline

 

#2779 2012-04-23 17:43:36

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

Re: ITopic: Welcome to your local block library!

Hey Greenatic, so what are you thinking for the downloadable Scratch files? Are we going with the same [v] download arrow image as in the BYOB section with a "block number" and a "view source" link like Panther?


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

Offline

 

#2780 2012-04-23 18:26:55

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

Hey Greenatic, so what are you thinking for the downloadable Scratch files? Are we going with the same [v] download arrow image as in the BYOB section with a "block number" and a "view source" link like Panther?

I honestly hadn't given it much thought.  tongue   That sounds good, although I've never understood the usefulness of a "block number"...

Offline

 

#2781 2012-04-23 20:08:39

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

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

sparks wrote:

Hey Greenatic, so what are you thinking for the downloadable Scratch files? Are we going with the same [v] download arrow image as in the BYOB section with a "block number" and a "view source" link like Panther?

I honestly hadn't given it much thought.  tongue   That sounds good, although I've never understood the usefulness of a "block number"...

The block number just lets you easily use the import block block. It's probably not necessary for the Scratch section.


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

Offline

 

#2782 2012-04-23 20:14:12

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Greenatic wrote:

sparks wrote:

Hey Greenatic, so what are you thinking for the downloadable Scratch files? Are we going with the same [v] download arrow image as in the BYOB section with a "block number" and a "view source" link like Panther?

I honestly hadn't given it much thought.  tongue   That sounds good, although I've never understood the usefulness of a "block number"...

The block number just lets you easily use the import block block. It's probably not necessary for the Scratch section.

Or..
A Download link. (This takes you to the front page.) It would be easier for people...


Get ready for domination of:  tongue

Offline

 

#2783 2012-04-23 20:26:26

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

Re: ITopic: Welcome to your local block library!

coolhogs wrote:

sparks wrote:

Greenatic wrote:


I honestly hadn't given it much thought.  tongue   That sounds good, although I've never understood the usefulness of a "block number"...

The block number just lets you easily use the import block block. It's probably not necessary for the Scratch section.

Or..
A Download link. (This takes you to the front page.) It would be easier for people...

What sparks is proposing is:

a download link image (as seen in the BYOB section)
a "view source" link

Sounds great!   smile

Offline

 

#2784 2012-04-24 09:18:39

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

coolhogs wrote:

sparks wrote:

The block number just lets you easily use the import block block. It's probably not necessary for the Scratch section.

Or..
A ]Download link. (This takes you to the front page.) It would be easier for people...

What sparks is proposing is:

a download link image (as seen in the BYOB section)
a "view source" link

Sounds great!   smile

That's what I hade in mind.

Offline

 

#2785 2012-04-24 09:57:38

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

Re: ITopic: Welcome to your local block library!

dreamod wrote:

Greenatic wrote:

coolhogs wrote:


Or..
A ]Download link. (This takes you to the front page.) It would be easier for people...

What sparks is proposing is:

a download link image (as seen in the BYOB section)
a "view source" link

Sounds great!   smile

That's what I hade in mind.

Me too.

Offline

 

#2786 2012-04-24 10:28:35

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

DigiTechs wrote:

Greenatic wrote:

Alright then, I think you're missing a quote and a period at the end.

Code:

t3 _ '| t1 t2 t3 |

That one just came up with a "Syntax Error"

Did you add '. to the end of that part, then put the rest back in?

I don't know what you mean (Since I have no IDEA about Squeak)
Wait - in the Syntax error window I got this:

Code:

t3 _ '| t1t1 t2 t3|
t1 _ 'C:Argument expected ->\Users\*Me*\My Documents\Scratch Projects\Somthing.pt'.
    self closeMediaEditorsAndDialogs ifFalse: [^ self].
    self stopAll.
    t1 size = 0 ifTrue: [^ self].
    self updateLastHistoryEntryIfNeeded.
    t3 _ (self nameFromFileName: t1)
                , ''.pt''.
    projectDirectory _ FileDirectory on: (FileDirectory dirPathFor: t3).
    projectName _ FileDirectory localNameFor: t3.
    projectInfo at: ''author'' put: author.
    self updateHistoryProjectName: projectName op: ''save''.
    self writeScratchProject'.
    t2 _ self ownerThatIsA: ScratchFrameMorph.
    t2
        ifNotNil: [Compiler
                evaluate: t3
                for: t2
                notifying: nil
                logged: false]

EDIT: Ok. I got it. Cut and Paste to the rescue. tongue
EDIT 2: WAIT! I think I might have fixed it - I was tinkering around with the code.
EDIT 3: Yeah. I fixed it. I modified Dreamod's coding and it seems to work fine now. I changed a t2 somwhere into a t3 and it works fine  tongue

Last edited by DigiTechs (2012-04-24 10:56:37)


I'm back.
Maybe.

Offline

 

#2787 2012-04-24 12:44:17

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

Re: ITopic: Welcome to your local block library!

The image renderer will hopefully be updated soon, but I'm using the current version now to update the Scratch > motion section of the library, ready to test out adding downloadable Scratch blocks!


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

Offline

 

#2788 2012-04-24 13:35:25

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

So. People should be able to see that the Scratch Motion section of the library now has the new block renderer in place, and all the images have been moved to the blocks.scratchr.org site. It took me a long time. Why? (These are tips, btw)

1) Scratch won't allow an image to be displayed from blocks.scratchr.org if the http:// isn't present. So it'll display http://www.blocks.scratchr.org/images/blocks/someImage.png but won't display www.blocks.scratchr.org/images/blocks/someImage.png. I found this out right at the end and had to go back and add it everywhere.

2)Scratch won't display an image that has spaces in its url. Rather annoyingly this means you have to use %20 instead. So it will accept http://blocks.scratchr.org/images/blocks/spec.php?s=move%20%n%6010%60%20steps%20towards%20%d%60sprite1%60&type=-&color=motion but won't accept http://blocks.scratchr.org/images/blocks/spec.php?s=move n%6010%60 steps towards %d%60sprite1%60&type=-&color=motion. Notpad ++ helped me replace all spaces in these urls with %20.

3) A word to the wise, Notepad ++, in the settings I have, at least, can't display the █ character, replacing it with ¦...

~Sparks

Last edited by YourLocalBlockLib (2012-04-24 13:36:10)


http://dl.dropbox.com/u/6273449/BlockLibraryTitle.png

Offline

 

#2789 2012-04-24 19:08:55

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

Re: ITopic: Welcome to your local block library!

YourLocalBlockLib wrote:

So. People should be able to see that the Scratch Motion section of the library now has the new block renderer in place, and all the images have been moved to the blocks.scratchr.org site. It took me a long time. Why? (These are tips, btw)

1) Scratch won't allow an image to be displayed from blocks.scratchr.org if the http:// isn't present. So it'll display http://www.blocks.scratchr.org/images/blocks/someImage.png but won't display www.blocks.scratchr.org/images/blocks/someImage.png. I found this out right at the end and had to go back and add it everywhere.

2)Scratch won't display an image that has spaces in its url. Rather annoyingly this means you have to use %20 instead. So it will accept http://blocks.scratchr.org/images/blocks/spec.php?s=move%20%n%6010%60%20steps%20towards%20%d%60sprite1%60&type=-&color=motion but won't accept http://blocks.scratchr.org/images/blocks/spec.php?s=move n%6010%60 steps towards %d%60sprite1%60&type=-&color=motion. Notpad ++ helped me replace all spaces in these urls with %20.

3) A word to the wise, Notepad ++, in the settings I have, at least, can't display the █ character, replacing it with ¦...

~Sparks

Woah, did nXIII do the block renderer?  Or TheSuccessor?  Whoever did, thanks!!!   big_smile

Offline

 

#2790 2012-04-24 19:26:06

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I got a question, how did you post all those topics before anybody else posted.

Offline

 

#2791 2012-04-24 19:32:17

danwoodski
Scratcher
Registered: 2009-12-23
Posts: 100+

Re: ITopic: Welcome to your local block library!

joletole wrote:

I got a question, how did you post all those topics before anybody else posted.

They probably posted them all right away, aware that they would need them later. If anyone did post, they probably asked the user to delete their post  smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://dl.dropbox.com/u/12506914/Pics/p2e-2.png&link2=http://dl.dropbox.com/u/12506914/Pics/ms.png&link3=http://dl.dropbox.com/u/12506914/Pics/block%20lib.png
Starting to move on to other languages, but I'll still be around from time to time  smile

Offline

 

#2792 2012-04-24 19:35:26

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

Re: ITopic: Welcome to your local block library!

That's right. I basically posted about 20 posts, all with a message asking people not to post yet. I was very lucky really, considering how people love to post  tongue

@Greenatic, yes, nXIII did the renderer, he says he'll improve the quality this weekend  smile


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

Offline

 

#2793 2012-04-24 20:03:21

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

Re: ITopic: Welcome to your local block library!

sparks wrote:

That's right. I basically posted about 20 posts, all with a message asking people not to post yet. I was very lucky really, considering how people love to post  tongue

@Greenatic, yes, nXIII did the renderer, he says he'll improve the quality this weekend  smile

It's stellar as it is right now!  I can only imagine what it will be like in a week...   big_smile

Offline

 

#2794 2012-04-25 04:25:41

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

Re: ITopic: Welcome to your local block library!

W00t! Thanks so much for your hard work, Sparks and nXIII!

Offline

 

#2795 2012-04-25 13:33:28

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

So no one has made a block for the last event recieved block? I've tried to make one in Panther but failed.


I'm back.
Maybe.

Offline

 

#2796 2012-04-25 20:02:37

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

The block renderer is great! But the color 'variable' is green. Is that a bug or am I wrong?


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#2797 2012-04-26 17:59:28

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

I converted the go to url [url]prefix included? < > block into a panther block  big_smile
Name:

Code:

go to url $String$ prefix included? $Boolean$

Code:

Code:

t2 ifTrue: [url _ 'http://', t1].
Cursor wait showWhile: [ScratchPlugin primOpenURL: url]

I just wanted to point out that I knew that there was already a block of this, but since it's my first block (edits here) that worked (edits end) i'm really proud of it ;P

Last edited by DigiTechs (2012-04-26 18:00:42)


I'm back.
Maybe.

Offline

 

#2798 2012-04-27 19:03:27

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Is something wrong with the blocks.scratchr.org site? My computer came up with an error when I went to it, and all the images are gone.


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#2799 2012-04-27 19:10:08

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

Re: ITopic: Welcome to your local block library!

technoboy10 wrote:

Is something wrong with the blocks.scratchr.org site? My computer came up with an error when I went to it, and all the images are gone.

No, I think everything is fine. I noticed the site had some down time a few hours ago, but the images are all still there  smile


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

Offline

 

#2800 2012-04-27 19:26:31

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

technoboy10 wrote:

Is something wrong with the blocks.scratchr.org site? My computer came up with an error when I went to it, and all the images are gone.

No, I think everything is fine. I noticed the site had some down time a few hours ago, but the images are all still there  smile

Hmm, I still get the broken image picture on all the block renderer created pics.  hmm


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

Board footer