Squeak newbie trying disableProgrammerFacilities

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Squeak newbie trying disableProgrammerFacilities

RichWhite
I have an image I am trying to lock down and have followed this process -
http://wiki.squeak.org/squeak/786 .

I get the "Caution this is a drastic step etc." .. I select "Yes" ... when I
restart I still can access halos, debugger, everything I would expect not to be
able to access after locking the image down?

I assume I am missing a step?


Thanks for any help you can offer !

===========
Reply | Threaded
Open this post in threaded view
|

Re: Squeak newbie trying disableProgrammerFacilities

Darius Clarke
It really doesn't seem to work, does it. :)

It successfully executes the command:
>      self compileHardCodedPref: #cmdGesturesEnabled enable: false.    "No halos, etc."

so that
> Preferences cmdGesturesEnabled

will return false.

And,
> handleMouseDown: anEvent

continues to get called.

I'm still looking into what actually triggers a morph to reveal it's halos.

Cheers,
Darius
Reply | Threaded
Open this post in threaded view
|

Re: Squeak newbie trying disableProgrammerFacilities

Darius Clarke
Hi Rich,

If you make this change to the Morph class, you might be closer to the
effect you want.

In Morph class, in the blueButtonDown: method, add this line:

true ifTrue:[^ self].

as demonstrated below:

blueButtonDown: anEvent
        "Special gestures (cmd-mouse on the Macintosh; Alt-mouse on Windows
and Unix) allow a mouse-sensitive morph to be moved or bring up a halo
for the morph."
        | h tfm doNotDrag |
true ifTrue:[^ self].
        h := anEvent hand halo.
        "Prevent wrap around halo transfers originating from throwing the
event back in"
        doNotDrag := false.
[...rest of method clipped...]

It eliminates the "blue button" behavior completely, but leaves most
of the code in place in case you want to change it.

Cheers,
Darius