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

#1 2011-05-08 16:52:41

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Initialize

EDIT:

PLEASE CLOSE

So me getting frustrated with having to return on scratch everytime I made a new menu (don't ask), I decided to try adding an initialize button to the file menu.  I aadded this to the filemenu code.

Code:

    t2 add: 'Restart' action: #initialize.

It sort of works, but there is a few weird bugs.  There is a picture of the old scratch in the back, and you have to enter/exit user mode to fix it.  It also has a few other bugs, any help?

Last edited by gbear605 (2011-05-09 16:58:46)


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#2 2011-05-09 09:27:50

Jwosty
Scratcher
Registered: 2009-12-19
Posts: 500+

Re: Initialize

Well, those so called "bugs" probably aren't bugs at all! Look at the actual initialize method that you are calling, and see if there is a different function that does what you want.
Tip: Also, you should probably quit using the compiled code. Head on over to http://info.scratch.mit.edu/Source_Code to get the beautiful, clean source! If you'd like to find out what this is, check out this article. Hope this helps!  wink


http://i39.tinypic.com/18ert5.png Google it.  smile

Offline

 

#3 2011-05-09 14:31:31

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Initialize

Jwosty wrote:

Well, those so called "bugs" probably aren't bugs at all! Look at the actual initialize method that you are calling, and see if there is a different function that does what you want.
Tip: Also, you should probably quit using the compiled code. Head on over to http://info.scratch.mit.edu/Source_Code to get the beautiful, clean source! If you'd like to find out what this is, check out this article. Hope this helps!  wink

I do use the source code, I was just hoping that this would work.


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#4 2011-05-09 16:32:57

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

Re: Initialize

Try doing this:

Code:

restart
     self owner replaceSubmorph: self by:  ((ScratchFrameMorph new) fillScreenOn)

and in your menu:

Code:

t2 add: 'Restart' action: #restart.

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

Offline

 

#5 2011-05-09 16:40:05

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

Re: Initialize

MathWizz wrote:

Try doing this:

Code:

restart
     self owner replaceSubmorph: self by:  ((ScratchFrameMorph new) fillScreenOn)

and in your menu:

Code:

t2 add: 'Restart' action: #restart.

hat is good, however, you might want it to delete the old frameMorph. Let me see what I can do...


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

 

#6 2011-05-09 16:40:49

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Initialize

MathWizz wrote:

Try doing this:

Code:

restart
     self owner replaceSubmorph: self by:  ((ScratchFrameMorph new) fillScreenOn)

and in your menu:

Code:

t2 add: 'Restart' action: #restart.

Thanks, it worked.

CLOSING TOPIC


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

Board footer