Hello,
http://wiki.squeak.org/squeak/2332 'Mouse button tester' has m := Morph new. m on: #mouseDown send: #value: to:[:evt| evt redButtonPressed ifTrue:[m color: Color red]. evt yellowButtonPressed ifTrue:[m color: Color yellow]. evt blueButtonPressed ifTrue:[m color: Color blue] ]. m openInWorld. red and yellow button work, but the blue button brings up the halo as it is noted on the wiki page (tested with a three button mouse). I wonder if there is a way to make the change of the button to blue possible? --Hannes |
Hannes, you may find the attached useful. File it in and do "SensorReporter setupAndDisplay". While using it, you will see other artifacts which occur as a result of the key press e.g. halo behavior, but the reporting is accurate. - jrm On Tue, Apr 4, 2017 at 7:04 AM, H. Hirzel <[hidden email]> wrote: Hello, SensorReporter.st (2K) Download Attachment |
In reply to this post by Hannes Hirzel
Did you want to change it to blue AND the
halo appears? Or just go to blue and no halo? On 4/3/17 2:19 PM, H. Hirzel wrote:
Hello, http://wiki.squeak.org/squeak/2332 'Mouse button tester' has m := Morph new. m on: #mouseDown send: #value: to:[:evt| evt redButtonPressed ifTrue:[m color: Color red]. evt yellowButtonPressed ifTrue:[m color: Color yellow]. evt blueButtonPressed ifTrue:[m color: Color blue] ]. m openInWorld. red and yellow button work, but the blue button brings up the halo as it is noted on the wiki page (tested with a three button mouse). I wonder if there is a way to make the change of the button to blue possible? --Hannes |
In reply to this post by jrm
Thank you John.
This is useful. SensorReporter Code added here http://wiki.squeak.org/squeak/2330 --Hannes On 4/4/17, John-Reed Maffeo <[hidden email]> wrote: > Hannes, you may find the attached useful. File it in and do "SensorReporter > setupAndDisplay". While using it, you will see other artifacts which occur > as a result of the key press e.g. halo behavior, but the reporting is > accurate. > > - jrm > > > On Tue, Apr 4, 2017 at 7:04 AM, H. Hirzel <[hidden email]> wrote: > >> Hello, >> >> http://wiki.squeak.org/squeak/2332 'Mouse button tester' >> >> has >> >> m := Morph new. >> m on: #mouseDown send: #value: to:[:evt| >> evt redButtonPressed ifTrue:[m color: Color red]. >> evt yellowButtonPressed ifTrue:[m color: Color yellow]. >> evt blueButtonPressed ifTrue:[m color: Color blue] >> ]. >> m openInWorld. >> >> red and yellow button work, but the blue button brings up the halo as >> it is noted on the wiki page (tested with a three button mouse). >> >> I wonder if there is a way to make the change of the button to blue >> possible? >> >> --Hannes >> >> > |
In reply to this post by Bob Arning-2
On 4/4/17, Bob Arning <[hidden email]> wrote:
> Did you want to change it to blue AND the halo appears? Or just go to > blue and no halo? Whatever is easier. If it does not matter than change to blue only. --Hannes > > On 4/3/17 2:19 PM, H. Hirzel wrote: >> Hello, >> >> http://wiki.squeak.org/squeak/2332 'Mouse button tester' >> >> has >> >> m := Morph new. >> m on: #mouseDown send: #value: to:[:evt| >> evt redButtonPressed ifTrue:[m color: Color red]. >> evt yellowButtonPressed ifTrue:[m color: Color yellow]. >> evt blueButtonPressed ifTrue:[m color: Color blue] >> ]. >> m openInWorld. >> >> red and yellow button work, but the blue button brings up the halo as >> it is noted on the wiki page (tested with a three button mouse). >> >> I wonder if there is a way to make the change of the button to blue >> possible? >> >> --Hannes >> > > |
I definitively prefer the blue only solution. No halos.
On 4/4/17, H. Hirzel <[hidden email]> wrote: > On 4/4/17, Bob Arning <[hidden email]> wrote: >> Did you want to change it to blue AND the halo appears? Or just go to >> blue and no halo? > > Whatever is easier. If it does not matter than change to blue only. > > --Hannes > >> >> On 4/3/17 2:19 PM, H. Hirzel wrote: >>> Hello, >>> >>> http://wiki.squeak.org/squeak/2332 'Mouse button tester' >>> >>> has >>> >>> m := Morph new. >>> m on: #mouseDown send: #value: to:[:evt| >>> evt redButtonPressed ifTrue:[m color: Color red]. >>> evt yellowButtonPressed ifTrue:[m color: Color yellow]. >>> evt blueButtonPressed ifTrue:[m color: Color blue] >>> ]. >>> m openInWorld. >>> >>> red and yellow button work, but the blue button brings up the halo as >>> it is noted on the wiki page (tested with a three button mouse). >>> >>> I wonder if there is a way to make the change of the button to blue >>> possible? >>> >>> --Hannes >>> >> >> > |
I'm guessing you want something simple and
non-invasive. Not sure there is such a thing. You could just nuke all halos: 'From Squeak5.1 of 23 August 2016 [latest
update: #16548] on 4 April 2017 at 12:15:16 pm'! On 4/4/17 12:03 PM, H. Hirzel wrote:
I definitively prefer the blue only solution. No halos. On 4/4/17, H. Hirzel [hidden email] wrote:On 4/4/17, Bob Arning [hidden email] wrote:Did you want to change it to blue AND the halo appears? Or just go to blue and no halo?Whatever is easier. If it does not matter than change to blue only. --HannesOn 4/3/17 2:19 PM, H. Hirzel wrote:Hello, http://wiki.squeak.org/squeak/2332 'Mouse button tester' has m := Morph new. m on: #mouseDown send: #value: to:[:evt| evt redButtonPressed ifTrue:[m color: Color red]. evt yellowButtonPressed ifTrue:[m color: Color yellow]. evt blueButtonPressed ifTrue:[m color: Color blue] ]. m openInWorld. red and yellow button work, but the blue button brings up the halo as it is noted on the wiki page (tested with a three button mouse). I wonder if there is a way to make the change of the button to blue possible? --Hannes |
In reply to this post by Hannes Hirzel
Hi, Hannes.
The generic event handler, which can be configured via #on:send:to:, kicks in at the level of Morph >> #mouseDown: here. For historic reasons, the halo invocation kicks in earlier at the level of Morph >> #handleMouseDown:. Well, since #handleMouseDown: is considerend framework code and #mouseDown: application code, this is a good thing because applications cannot easily overwrite the halo functionality. However, we should, for the future, make the means of interaction for halo invocation configurable so that there is a chance for applications to make use of the blue button at all. For example, if you do not need [CMD]+[SHIFT]+[B] in your application, you may want to re-map halo invocation to that. :-) An event filter could be used to achieve this. Best, Marcel |
Hi, there. Please find attached a change set that extracts the global interaction mechanisms "halo" and "meta menu" as event filters into PasteUpMorph (i.e. the world morph). alternate-halo-invocation.cs This change makes some Morph code cleaner and the following example work as expected: m := Morph new. m wantsHaloFromClick: false. m wantsYellowButtonMenu: false. m wantsMetaMenu: false. m on: #mouseDown send: #value: to:[:evt| evt redButtonPressed ifTrue:[m color: Color red]. evt yellowButtonPressed ifTrue:[m color: Color yellow]. evt blueButtonPressed ifTrue:[m color: Color blue] ]. Best, Marcel |
Free forum by Nabble | Edit this page |