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

#26 2009-08-11 11:18:24

pinochio
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: Altering the source code: Questions Welcome!

billyedward wrote:

If I am correct, you use Jens' method:
Find a bug, type Preferences enableProgrammerFacilities into the walkback, etc.
And, the problem in 1.4 is, you can't find any bugs, right!
Well, here's what I use:
In the default cat sprite, make another costume to be a single pixel (the colour doesn't matter).
Then, set the sprite to be 54000% in size.
Now, just switch to the cat costume...
You will see a red walkback window entitled 'space is low'
Be sure to delete that offending cat sprite and then set it to 100% soon; those errors are there for a reason.

If by chance it causes a squeak memory dump (denounced by an unflattering text-filled white rectangle in the top left corner) then try it again with a smaller size. (ie: 2000%, etc. 54000 is the largest it will allow for a single pixel)

Please do not advertise this method outside this forum, because if the scratch team gets wind of it, they will be sure to fix it. And we all know how precious these bugs can be.

worked perfexctly


Flat Out G

Offline

 

#27 2009-08-11 12:55:46

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: Altering the source code: Questions Welcome!

dav09 wrote:

songhead95 wrote:

no they aren't, I know how to do THAT part. I was looking into defining a new method for show/hideList:

that is the method !

No that's altering the class method called blockSpecs. in the Instance section there is no definition for showList: or hideList:. so far the blocks would not do anything. Jens/ Paddle2See/ johnm/ JSO/ (Anyone who knows smalltalk), any ideas?

Offline

 

#28 2009-08-11 13:57:16

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Altering the source code: Questions Welcome!

You could check how variable watchers are hidden and shown. There are two methods on the instance side of class ScriptableScratchMorph accomplishing this, they're a bit hairy, but I'm sure you'll find a way  smile


Jens Mönig

Offline

 

#29 2009-08-11 19:56:34

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Altering the source code: Questions Welcome!

anybody know how AFTER hacking 1.4, the code to get back to the way it was b4 it was hacked? (full window and stuff.) and does anybody have any blocks they would want me to add to my limited edited scratch.( I stupidly edited my only 1.4 image)


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#30 2009-08-11 21:24:04

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: Altering the source code: Questions Welcome!

cds56 wrote:

anybody know how AFTER hacking 1.4, the code to get back to the way it was b4 it was hacked? (full window and stuff.) and does anybody have any blocks they would want me to add to my limited edited scratch.( I stupidly edited my only 1.4 image)

open a workspace and execute

Code:

ScratchFrameMorph new openInWorld; saveImageForEndUser

Offline

 

#31 2009-08-12 08:50:33

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: Altering the source code: Questions Welcome!

thank you.

this helps a lot.


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#32 2009-08-18 18:54:22

ealbers
Scratcher
Registered: 2009-02-16
Posts: 10

Re: Altering the source code: Questions Welcome!

Is there some kind of high level layout of the source structure anywhere?   or an example of something, say adding a block in the motion blocks say?

Or a description of where the Motion/Looks/Sound etc blocks are defined and how to write one?

Thanks!
Eric

Offline

 

#33 2009-08-18 19:08:17

ealbers
Scratcher
Registered: 2009-02-16
Posts: 10

Re: Altering the source code: Questions Welcome!

A potentially naive question, but all languages have a 'start' location, and proceed in a linear fashion, (until threads get spawned), where does Scratch 'start'?  I see lots of initialization's for the various classes, they can't all happen at once...which starts 'first'?

How do you single step though the program? I see debug when I right click in the squeak environment, but it only brings up a few options...

Thanks!
Eric

Offline

 

#34 2009-08-18 19:11:28

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Altering the source code: Questions Welcome!

Hi Eric, I once posted a little primer for this: http://scratch.mit.edu/projects/Jens/75626


Jens Mönig

Offline

 

#35 2009-08-18 19:14:24

ealbers
Scratcher
Registered: 2009-02-16
Posts: 10

Re: Altering the source code: Questions Welcome!

Thanks Jens, that looks like exactly what I was looking for

Thanks!
Eric

Offline

 

#36 2009-08-27 12:07:36

HungryDragon
Scratcher
Registered: 2008-04-09
Posts: 10

Re: Altering the source code: Questions Welcome!

Where or how can I get the scratch 1.4 skin  already hacked 1.4 and would like to alter the way scratch looks. f I can't get the skin is the 1.3.1 skin compatable?

Offline

 

#37 2009-09-01 17:01:51

Rich_Goyette
Scratcher
Registered: 2009-06-24
Posts: 9

Re: Altering the source code: Questions Welcome!

ealbers wrote:

Is there some kind of high level layout of the source structure anywhere?   or an example of something, say adding a block in the motion blocks say?

Or a description of where the Motion/Looks/Sound etc blocks are defined and how to write one?

Thanks!
Eric

Eric:

I've been hacking away at the code for some time and pasting my results to a web site.  I was totally new to smalltalk and squeak (two months or so ago) so I think you might find some of the things you're looking for.

http://www.richardgoyette.com/ItchBotsMain.html

Some of the earlier pages are pretty lame because I was essentially just banging around lost in the squeak woods.  However, after some time, I started getting "a feel" for where to find things that I was looking for.

As an aside, if anyone knows how to make the scratch source work with a new (or newer) version of Squeak, I'd love to know.  The search facilities in the Squeak used in SBE are great and would be very handy.

Rich

Offline

 

#38 2009-09-08 08:41:23

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

bendad wrote:

How do you change the default sprite?

That is easy, no coding required!
First make the sprite you want to use.
Then export it into the costumes directory, under the name default.sprite.
Read the 'scratchreference.pdf' for more information.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#39 2009-09-08 08:48:48

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

songhead95 wrote:

no they aren't, I know how to do THAT part. I was looking into defining a new method for show/hideList:

Off the top of my head, I can think of a code for hiding ALL list watchers:

Code:

ScratchListMorph allInstances do: [ :each | each delete ].

I'll have to experiment to get the rest.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#40 2009-09-08 08:53:48

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

filo5 wrote:

Hi, billyedward

Do you know some tutorials on Squeak Smalltalk (which you've used to learn it)?

Actually, I learned all I know from browsing through the scratch source code...
But there is a tutorial: http://www.dmu.com/squeak/sq1.html
as well, you can look at the official ones: http://wiki.squeak.org/squeak/792#Beginner


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#41 2009-09-08 09:01:00

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

songhead95 wrote:

cds56 wrote:

anybody know how AFTER hacking 1.4, the code to get back to the way it was b4 it was hacked? (full window and stuff.) and does anybody have any blocks they would want me to add to my limited edited scratch.( I stupidly edited my only 1.4 image)

open a workspace and execute

Code:

ScratchFrameMorph new openInWorld; saveImageForEndUser

To get rid of ALL changes, choose 'open' from the world menu, and then 'simple change sorter'. From here, you can see and delete any changes you've made.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#42 2009-09-08 09:11:43

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

Rich_Goyette wrote:

ealbers wrote:

Is there some kind of high level layout of the source structure anywhere?   or an example of something, say adding a block in the motion blocks say?

Or a description of where the Motion/Looks/Sound etc blocks are defined and how to write one?

Thanks!
Eric

Eric:

I've been hacking away at the code for some time and pasting my results to a web site.  I was totally new to smalltalk and squeak (two months or so ago) so I think you might find some of the things you're looking for.

http://www.richardgoyette.com/ItchBotsMain.html

Some of the earlier pages are pretty lame because I was essentially just banging around lost in the squeak woods.  However, after some time, I started getting "a feel" for where to find things that I was looking for.

As an aside, if anyone knows how to make the scratch source work with a new (or newer) version of Squeak, I'd love to know.  The search facilities in the Squeak used in SBE are great and would be very handy.

Rich

I believe that you can get the whole cs file from the open source scratch page...
Just press Control+a, then Control+c. Now, open a workspace in smalltalk, and paste it in. Now press Alternate+a, right click on it, choose 'more' then 'file it in'.
I am not 100% sure if the cs file is  there, but this will work if it is.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#43 2009-09-08 09:15:03

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

Jens wrote:

Hi Eric, I once posted a little primer for this: http://scratch.mit.edu/projects/Jens/75626

If you guys like this, my 'how to make a new block' projects may also be of interest:
http://scratch.mit.edu/users/billyedward


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#44 2009-09-08 17:37:03

Mike16112
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Altering the source code: Questions Welcome!

Uhhh. What is this forum for?  hmm


The programmer has a nap. HOLD OUT! PROGRAMMER!

Offline

 

#45 2009-09-10 17:02:38

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

Mike16112 wrote:

Uhhh. What is this forum for?  hmm

For working with the source code of scratch. It is where you can ask a question, and anyone with experience can answer it.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#46 2009-09-13 12:34:11

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: Altering the source code: Questions Welcome!

This is a little off topic, but after squeak, does anyone know of a mac/unix smalltalk 80 compiler/IDE?

Offline

 

#47 2009-09-13 18:08:41

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Altering the source code: Questions Welcome!

Hi songhead, There is the original big Visual Works Smalltalk maintained by Cincom (you can download and use a non-commercial version from their site for free), And there is the new, open Source Pharo Smalltalk project (a branch of Squeak with full closure support and a very nice morphic GUI). Besides there is an even more interesting fork of Squeak by Juan Vuletich called Cuis. Then there is Gnu Smalltalk and a couple of other Smalltalk implementations which also support Mac/Unix, and a very new promising upcoming version of Dolphin Smalltalk (only for Windows). The hottest open-source ticket right now is probably Pharo, especially if you're into Web-Development with Seaside. The fastest and most professional Smalltalk is surely VisualWorks.


Jens Mönig

Offline

 

#48 2009-09-14 14:30:54

dav09
Scratcher
Registered: 2009-03-25
Posts: 1000+

Re: Altering the source code: Questions Welcome!

Jens will there be byob 2 source released ?

Offline

 

#49 2009-09-15 18:00:01

HungryDragon
Scratcher
Registered: 2008-04-09
Posts: 10

Re: Altering the source code: Questions Welcome!

Where or how can I get the scratch 1.4 skin  already hacked 1.4 and would like to alter the way scratch looks. f I can't get the skin is the 1.3.1 skin compatable?

Oh, By the way please someone respond, I already posted this once and go no answer    } sad

Offline

 

#50 2009-09-15 19:50:28

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Altering the source code: Questions Welcome!

HungryDragon wrote:

Where or how can I get the scratch 1.4 skin  already hacked 1.4 and would like to alter the way scratch looks. f I can't get the skin is the 1.3.1 skin compatable?

Oh, By the way please someone respond, I already posted this once and go no answer    } sad

What I'd most recommend is to wait until the scratch team releases the 1.4 source code. However, it may be possible... The long, painstaking way is to print screen it and edit the images to include only the ones you want... or it may be possible to write a code to do that for you.
P.s. the 1.3.1 images will not work. (there will be a whole whack of 'key not found' errors if you try it).


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

Board footer