Hello
How do I lock a Morphic GUI so that the halos do not come up anymore? I do want to prepare an image for general users where cannot bring up something unusual. Is there a preference for this? Searching for 'lock' and searching for 'halo' did not bring up anything useful. How is it done programmatically? Regards Hannes _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hi Hannes,
HH> Is there a preference for this? Searching for 'lock' and searching for HH> 'halo' did not bring up anything useful. HH> How is it done programmatically? from: Preferences>>disableProgrammerFacilities "Warning: do not call this lightly! It disables all access to menus, debuggers, halos. There is no guaranteed return from this, which is to say, you cannot necessarily reenable these things once they are disabled -- you can only use whatever the UI of the current project affords, and you cannot even snapshot -- you can only quit. You can completely reverse the work of this method by calling the dual Preferences method enableProgrammerFacilities, provided you have left yourself leeway to bring about a call to that method. To set up a system that will come up in such a state, you have to request the snapshot in the same breath as you disable the programmer facilities. To do this, put the following line into the 'do' menu and then evaluate it from that 'do' menu: Preferences disableProgrammerFacilities. You will be prompted for a new image name under which to save the resulting image." -- Cheers, Herbert _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Fine, this is the right place to look for
Preferences disableProgrammerFacilities "Warning: do not call this lightly! ...." Beeper beep. (self confirm: 'CAUTION!! This is a drastic step! Do you really want to do this?') ifFalse: [Beeper beep. ^self inform: 'whew!']. self disable: #cmdDotEnabled. "No user-interrupt-into-debugger" self compileHardCodedPref: #cmdGesturesEnabled enable: false. "No halos, etc." self compileHardCodedPref: #cmdKeysInText enable: false. "No user commands invokable via cmd-key combos in text editor" self enable: #noviceMode. "No control-menu" self disable: #warnIfNoSourcesFile. self disable: #warnIfNoChangesFile. SmalltalkImage current saveAs So I think self compileHardCodedPref: #cmdGesturesEnabled enable: false. "No halos, etc." does the job. I went to #cmdGesturesEnabled which is true and set it to false. The halos are still there if I right-click (Windows, two-button mouse, mouse buttons swapped in preferences) What am I missing? --Hannes On 11/4/10, Herbert König <[hidden email]> wrote: > Hi Hannes, > > HH> Is there a preference for this? Searching for 'lock' and searching for > HH> 'halo' did not bring up anything useful. > HH> How is it done programmatically? > from: > > Preferences>>disableProgrammerFacilities > "Warning: do not call this lightly! It disables all access to > menus, debuggers, halos. There is no guaranteed return from this, which is > to say, you cannot necessarily reenable these things once they are disabled > -- you can only use whatever the UI of the current project affords, and you > cannot even snapshot -- you can only quit. > > You can completely reverse the work of this method by calling the dual > Preferences method enableProgrammerFacilities, provided you have left > yourself leeway to bring about a call to that method. > > To set up a system that will come up in such a state, you have to > request the snapshot in the same breath as you disable the programmer > facilities. To do this, put the following line into the 'do' menu and then > evaluate it from that 'do' menu: > > Preferences disableProgrammerFacilities. > > You will be prompted for a new image name under which to save the resulting > image." > > -- > Cheers, > > Herbert > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hi Hannes,
HH> self compileHardCodedPref: #cmdGesturesEnabled enable: false. "No halos, etc." HH> does the job. haven't done this for a long time. So I looked up my ooold deployment folder and found that you had to file in the attached changeset from Squeak 3.4. Then it would work. Just checked on a trunk with cog VM after filing in the cs the magic incantation changed to: Preferences disable: #cmdGesturesEnabled. -- Cheers, Herbert _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners SqueakLockdown-nk.1.cs (15K) Download Attachment |
Free forum by Nabble | Edit this page |