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

#776 2010-04-11 10:23:51

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

How do you copy in the Squeak browser? I'll post it when I learn how.


http://i46.tinypic.com/dw7zft.png

Offline

 

#777 2010-04-11 10:24:56

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Panther development thread

SeptimusHeap wrote:

Is there any way to make a repeat command in Smalltalk?

I found out how to do repeats!

Code:

10 timesRepeat: [Transcript show: 'hi']

NOTE: You will nead to open the transcript to see the result.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#778 2010-04-11 10:29:18

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

Re: Panther development thread

SeptimusHeap wrote:

Math, do you know of a smalltalk repeat command?

either do: or whileTrue: are the most useful
do syntax:

| someTemp |
someTemp _ Dictionary new.
someTemp at: 'a' put: 1.
someTemp at: 'b' put: 2.
someTemp do: [:tempItem |
someCodeOrSomething].

whileTrue syntax:

| someTemp |
someTemp _ 10.
(someTemp >= 0) whileTrue: [someCodeOrSomething].

Sperry wrote:

I thought of something while looking at the source code:

I found an old hat block and for some things I thought it might be useful. The block is:
('When' #W #-) OR ('When W -)<-(for source code users). It displays "When <> is true"

I am adding this in my 'Roar' and I thought you might like to know about it to. I don't think anybodys ever mentioned anything about this block before!  big_smile

Yea, I found that buried in the source, too. Did you notice the commented block spec in the Stage's blockSpecs with x's next to it? It has a VERY strange function.... try it out.

I'm not sure I like that hat block, because you can accomplish it with a forever if, and it's also supposedly obsolete.

sparks wrote:

Sperry wrote:

Are you going to use it though?

Dunno, it would be useful, I'm sure, and even if it wasn't used, I've never EVER used the "forever if" block, so it might as well be there. nXIII's putting the blocks in, so I'll try and grab his attention and see what NXIII thinks.

I was .... asleep. I can't read stuff while sleeping.

SeptimusHeap wrote:

How do you copy in the Squeak browser? I'll post it when I learn how.

Alt + normalKey (as in Alt+S = save, Alt+C = copy, Alt+V = paste, etc.)

Sorry about missed suggestions... I was working on this:
http://i44.tinypic.com/2j4yjrc.jpg
And trying to solve the presentation mode problem....
The main problem is that the ScratchFrameMorph deletes itself in presentation mode and nothing ScratchFrame-related works (basically, everything)

Last edited by nXIII (2010-04-11 10:34:16)


nXIII

Offline

 

#779 2010-04-11 10:46:07

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

Re: Panther development thread

*whistles... wow.


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

Offline

 

#780 2010-04-11 10:48:54

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

Re: Panther development thread

guys, the panther zip file is updated! (new password I handed out) quick link to save you gonig back:Panther


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

Offline

 

#781 2010-04-11 10:50:26

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

nXIII wrote:

Sperry wrote:

I thought of something while looking at the source code:

I found an old hat block and for some things I thought it might be useful. The block is:
('When' #W #-) OR ('When W -)<-(for source code users). It displays "When <> is true"

I am adding this in my 'Roar' and I thought you might like to know about it to. I don't think anybodys ever mentioned anything about this block before!  big_smile

Yea, I found that buried in the source, too. Did you notice the commented block spec in the Stage's blockSpecs with x's next to it? It has a VERY strange function.... try it out.

I'm not sure I like that hat block, because you can accomplish it with a forever if, and it's also supposedly obsolete.

I see your point, and I did find that in the source but havent tried it. Will do soon though! Thanks for that!

Old question: Wheres ScratchSkin located?


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#782 2010-04-11 10:51:55

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

sparks wrote:

guys, the panther zip file is updated! (new password I handed out) quick link to save you gonig back:Panther

Could I have a copy please? I have helped a lot - im stuck with a abeta copy - the very first one."

Thanks


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#783 2010-04-11 11:51:00

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

nXIII, did you get my new blocks added?


http://i46.tinypic.com/dw7zft.png

Offline

 

#784 2010-04-11 11:53:59

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

I get this error from whiletrue.

Code:

    (t2 >= 0) whileTrue: [^t2 _ t2 - 1 <- receiver of whileTrue: must be a block or variable ->].

http://i46.tinypic.com/dw7zft.png

Offline

 

#785 2010-04-11 11:57:09

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

Re: Panther development thread

@Everyone - I changed the custom link on mediafire to 'http://mediafire.com/panther' now. (That's the base folder)


nXIII

Offline

 

#786 2010-04-11 11:58:34

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

Re: Panther development thread

SeptimusHeap wrote:

I get this error from whiletrue.

Code:

    (t2 >= 0) whileTrue: [^t2 _ t2 - 1 <- receiver of whileTrue: must be a block or variable ->].

Sorry, my mistake; it should be:

[t2 >= 0] whileTrue: []

but you do realize that the ^ returns a value and ends the code, right? You can't loop with it >.>


nXIII

Offline

 

#787 2010-04-11 11:59:07

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

I get this error from whiletrue.

Code:

    (t2 >= 0) whileTrue: [^t2 _ t2 - 1 <- receiver of whileTrue: must be a block or variable ->].

I think it's trying to tell you that the -1 needs to be a variable e.g: ^t2 _ t2 - t3.

Try declaring a temp variable and then putting that in. Set the variable to 1.

Hope this helps!


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#788 2010-04-11 12:01:46

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

Ok... whats changed?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#789 2010-04-11 12:02:42

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

markyparky56 wrote:

Ok... whats changed?

Look up at nXIII's very long post. It should explain everythings that you've missed.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#790 2010-04-11 12:03:24

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Help with this:

Code:

 listaverage: t1 
    | t2 t3 t4 |
    t2 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: [t2 _ t2 - 1. t3 _ t3 + lineAt: (self lineNum: t4 forList: t3). t4 _ t4 + 1.]

http://i46.tinypic.com/dw7zft.png

Offline

 

#791 2010-04-11 12:03:57

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

Re: Panther development thread

NXIIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXII er, you know that's not password protected, right?NXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXIINXII


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

Offline

 

#792 2010-04-11 12:04:33

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

nXIII: Did you get my new blocks?
R
E
A
D

T
H
I
S
!


http://i46.tinypic.com/dw7zft.png

Offline

 

#793 2010-04-11 12:05:18

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Help with this:

Code:

 listaverage: t1 
    | t2 t3 t4 |
    t2 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: [t2 _ t2 - 1. t3 _ t3 + lineAt: (self lineNum: t4 forList: t3). t4 _ t4 + 1.]

Is it something to do with the blocks I suggested earlier?


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#794 2010-04-11 12:06:43

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

Two things: Found an error/glitch
1. When you try to open more than 1 panther you get this error:
http://img121.imageshack.us/img121/713/panthererror.png
And
2. Whats the point of all those colour blocks? (P.s. you spelt colour wrong on the tabs.  wink  )


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#795 2010-04-11 12:07:31

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Sperry wrote:

SeptimusHeap wrote:

Help with this:

Code:

 listaverage: t1 
    | t2 t3 t4 |
    t2 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: [t2 _ t2 - 1. t3 _ t3 + lineAt: (self lineNum: t4 forList: t3). t4 _ t4 + 1.]

Is it something to do with the blocks I suggested earlier?

Yes. It SHOULD add all numbers in a list.

Then I'm going to divide it by the list length. DUHDUH! Average!


http://i46.tinypic.com/dw7zft.png

Offline

 

#796 2010-04-11 12:08:40

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

SeptimusHeap wrote:

nXIII: Did you get my new blocks?
R
E
A
D

T
H
I
S
!

Bee U Em. Pea?


http://i46.tinypic.com/dw7zft.png

Offline

 

#797 2010-04-11 12:10:08

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

SeptimusHeap wrote:

Sperry wrote:

SeptimusHeap wrote:

Help with this:

Code:

 listaverage: t1 
    | t2 t3 t4 |
    t2 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: [t2 _ t2 - 1. t3 _ t3 + lineAt: (self lineNum: t4 forList: t3). t4 _ t4 + 1.]

Is it something to do with the blocks I suggested earlier?

Yes. It SHOULD add all numbers in a list.

Then I'm going to divide it by the list length. DUHDUH! Average!

And it'll be an error is there is a letter in that list. Plus, i thought it was a
average of _ to _ in [list↓] was it not? So it has to work out the average of the amount of items i.e. the difference between start and finish.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#798 2010-04-11 12:13:06

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Sperry wrote:

SeptimusHeap wrote:

Help with this:

Code:

 listaverage: t1 
    | t2 t3 t4 |
    t2 _ t1 lineCount.
    t3 _ 0.
    t4 _ 1.
    [t2 >= 0]
        whileTrue: [t2 _ t2 - 1. t3 _ t3 + lineAt: (self lineNum: t4 forList: t3). t4 _ t4 + 1.]

Is it something to do with the blocks I suggested earlier?

Yes. It SHOULD add all numbers in a list.

Then I'm going to divide it by the list length. DUHDUH! Average!

Can you run me through what it does? Then I'll understand it better and be able to help you.

@markyparky:
Yes, but there was also "average of items in list [list]"


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#799 2010-04-11 12:13:08

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

markyparky56 wrote:

SeptimusHeap wrote:

Sperry wrote:


Is it something to do with the blocks I suggested earlier?

Yes. It SHOULD add all numbers in a list.

Then I'm going to divide it by the list length. DUHDUH! Average!

And it'll be an error is there is a letter in that list. Plus, i thought it was a
average of _ to _ in [list↓] was it not? So it has to work out the average of the amount of items i.e. the difference between start and finish.

Well, this will let you find the mean of any size data set.


http://i46.tinypic.com/dw7zft.png

Offline

 

#800 2010-04-11 12:13:57

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

Sperry wrote:

@markyparky:
Yes, but there was also "average of items in list [list]"

So there is going to be both...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer