Section 6

Better Lock-Down Steps

The deployed image still has an operational World Menu. We need to lock that down. This was not addressed prior to now but it easy to fix. The "eToys" system for Squeak has the ability to disable the World Menu. All we need to do is set the appropriate Preference when we perform our "prepare application" step.

For the class LaserGame, modify the #disableFeatures class method to include these new lines.

disableFeatures
    Preferences disable: #warnIfNoSourcesFile.
    Preferences disable: #warnIfNoChangesFile.
    Preferences disable: #cmdDotEnabled.
    Preferences enable: #eToyFriendly.
    Preferences enable: #noviceMode.
    Preferences compileHardCodedPref: #cmdGesturesEnabled enable: false.
    Preferences compileHardCodedPref: #cmdKeysInText enable: false.

By enabling "eToyFriendly" the saved deployed image will have the World Menu turned off from clicking on the desktop. "noviceMode" is supposed to disable the control menu.

We still need to turn off the halos. Change the method one more time.

disableFeatures
    Preferences disable: #warnIfNoSourcesFile.
    Preferences disable: #warnIfNoChangesFile.
    Preferences disable: #cmdDotEnabled.
    Preferences enable: #eToyFriendly.
    Preferences enable: #noviceMode.
    Preferences compileHardCodedPref: #cmdGesturesEnabled enable: false.
    Preferences compileHardCodedPref: #cmdKeysInText enable: false.
    HaloMorph compileSilently: 'addCircleHandles' classified: 'disable'.

As long as we never execute this #disableFeatures except for when we want to make a deployed image, this is safe code.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels    stevewessels@me.com