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

#1 2011-07-08 19:05:37

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

I need some help with some block code...

I am trying to make  "Turn fill screen off" and a "Turn fill screen on" blocks

So, here's my codes, and they won't work.

(fill screen off)

Code:

('turn fillscreen off' #- #fillScreenOff)

Code:

fillScreenOff
    Smalltalk fullScreenMode: false.
    World restoreDisplay.
    fillScreenFlag _ false.
    self isSticky: false.
    self extent: Display extent - 50.
    UseErrorCatcher _ false.
    Preferences disable: #noviceMode.
    Preferences enable: #warnIfNoSourcesFile.
    Preferences enable: #warnIfNoChangesFile.
    Preferences insertionPointColor: (Color
            r: 0.4
            g: 1.0
            b: 0.0).
    Preferences textHighlightColor: (Color
            r: 0.4
            g: 1.0
            b: 0.0)

(fill screen on)

Code:

('turn fillscreen on' #- #fillScreenOn)

Code:

fillScreenOn
    TakeOverScreen
        ifTrue: 
            [Smalltalk fullScreenMode: true.
            World restoreDisplay].
    fillScreenFlag _ true.
    self position: 0 @ 0.
    self isSticky: true.
    self comeToFront.
    UseErrorCatcher _ true.
    Sensor useOSEvents: true.
    Preferences enable: #noviceMode.
    Preferences disable: #warnIfNoSourcesFile.
    Preferences disable: #warnIfNoChangesFile.
    Preferences insertionPointColor: (Color
            r: 0.353
            g: 0.607
            b: 0.788).
    Preferences textHighlightColor: (Color
            r: 0.353
            g: 0.607
            b: 0.788).
    self updateProjectName.
    self step

So, can sombody help me?

Edit: Oh, by the way, I copied the code right from: Scratch-UI-Panes -> ScratchFrameMorph -> menu/button actions -> fillScreenOn & fillScreenOff

Last edited by owetre18 (2011-07-08 19:12:33)

Offline

 

#2 2011-07-08 19:54:21

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: I need some help with some block code...

Anyone?

Offline

 

#3 2011-07-10 21:14:32

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: I need some help with some block code...

Bump

Offline

 

#4 2011-07-11 16:56:05

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: I need some help with some block code...

Hello?

Offline

 

#5 2011-07-11 17:08:16

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: I need some help with some block code...

you can do for the code

t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 fillScreenOn

and

t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 fillScreenOff


the the the the the

Offline

 

#6 2011-07-11 17:13:46

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: I need some help with some block code...

jslomba wrote:

you can do for the code

t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 fillScreenOn

and

t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 fillScreenOff

OMG thank you. Time to squeak (program)

Offline

 

Board footer