Squeak
  QotD    "To be or not to be" – Shakespeare
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
PasteUpMorph tryInvokeMetaMenu
Last updated at 1:24 pm UTC on 11 May 2018
Marcel Taeumel<marcel.taeumel@hpi.de>	Fri, May 11, 2018 at 3:03 PM
Reply-To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>
To: Benoit St-Jean via Squeak-dev <squeak-dev@lists.squeakfoundation.org>
Reply | Reply to all | Forward | Print | Delete | Show original
Hi Stef,

First, let me acknowledge that this is kind of a regression. :-)

Now, what is the situation here:

 1) Morphs used to be in control by overwriting #handleMouseDown: to avoid the invocation of the meta menu. I changed this by moving 
the code to PasteUpMorph >> #tryInvokeMetaMenu:. My intention is still to increase the robustness of the system in the face of erroneous morphs.

2) The check for #wantsMetaMenu is not sufficient in this case because you have to control the entire ownership of a morph to avoid the meta menu. At least the (Morphic) world will give you its meta menu.

3) It would be nice to only invoke the meta menu for CTRL+YELLOW so that CTRL+RED could be used for something different. This is not possible due to automatic conversions in the VM. So, at the moment the code fires on CTRL+ANYTHING. This is bad because it wastes user-input gestures as you discovered in your code.

4) The preference "cmdGesturesEnabled" is rather misleading. It looks like we need a "morphicMetaMenuEnabled" preference, which works system wide but can be disabled for muO or other applications.

5) If we, as you proposed, would add code that allows individual morphs to bypass this generic development tool (i.e. the meta menu), we would decrease the robustness of the system again. That's why I disagree with your change.

***

The bottom line is that you should disable the command gestures via "Preferences disable: #cmdGesturesEnabled". I think we should split up this preference into "morphicHaloEnabled" and "morphicMetaMenuEnabled". By disabling #cmdGesturesEnabled, your morphs need to open their halo manually such as via #mouseDown: calling #invokeHaloOrMove:. :-)

If you have more questions, keep on asking. The meta menu is a dev tool, which must work under any circumstances.

Further readings:
 http://forum.world.st/Please-Review-Map-CTRL-red-to-CTRL-yellow-and-CMD-red-to-CMD-blue-td4913716.html
 http://forum.world.st/How-to-yellow-click-with-two-buttons-without-changing-mouse-settings-tp5074670p5074775.html
 http://forum.world.st/How-to-yellow-click-with-two-buttons-without-changing-mouse-settings-tp5074670p5075027.html

Sorry for any inconveniences...

Best,
Marcel