[squeak-dev] The Inbox: Morphic-ct.1787.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Oct 21 08:29:38 UTC 2021


Thank you for the clarification!

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 21. Oktober 2021 09:36:16
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1787.mcz

Hi Christoph --

> Correct me if I am wrong, but in the second case, the event would be propagated further to the next interested parent morph.
> In my opinion, the latter would be rather confusing in this situation.

Ah, right. I forgot about the dispatch. Yes, it makes sense to have this check in #mouseDown:/#keyStroke: then. Not #handles*:, because it checks its own state, not the event object's state.

Best,
Marcel

Am 20.10.2021 15:57:51 schrieb christoph.thiede at student.hpi.uni-potsdam.de <christoph.thiede at student.hpi.uni-potsdam.de>:

Another argument is that an early exit in a handle method (#keyStroke: etc.) is conceptually different from returning false in a #handles... method, isn't it? Correct me if I am wrong, but in the second case, the event would be propagated further to the next interested parent morph.

In my opinion, the latter would be rather confusing in this situation. (As opposed to Morphic-ct.1777.mcz where I actually wanted to enable it.)

Best,
Christoph

---
Sent from Squeak Inbox Talk<https://github.com/hpi-swa-lab/squeak-inbox-talk>

On 2021-10-20T09:09:46+02:00, marcel.taeumel at hpi.de wrote:

> Hi Christoph --
>
> Sure, if it makes sense to you, do it. :-) Well, Morphic's #handles* methods don't scale-up too well. For short implementations of #mouseDown:/#keyStroke: etc., it makes sense to separate such conditions, though.
>
> Best,
> Marcel
> Am 19.10.2021 19:34:55 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
> Hi Marcel,
>
> I was trying to replicate the style from #mouseDown: & Co. Shall I also move the checks there into the relevant #handlesMouse...: selectors?
>
> Best,
> Christoph
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
> Gesendet: Dienstag, 19. Oktober 2021 15:39:41
> An: squeak-dev
> Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1787.mcz
>
> This check should be implemented via #handlesKeyboard:, not in #keyStroke:.
>
> Best,
> Marcel
> Am 18.10.2021 18:00:38 schrieb commits at source.squeak.org <commits at source.squeak.org>:
> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/Morphic-ct.1787.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-ct.1787
> Author: ct
> Time: 18 October 2021, 6:00:19.065559 pm
> UUID: 5a7cd867-c35a-bf4a-9f21-4f51eae8b612
> Ancestors: Morphic-ul.1780
>
> Don't raise an error when pressing a key while focusing an empty scroll bar (such as the main panel in a freshly opened preference browser).
>
> =============== Diff against Morphic-ul.1780 ===============
>
> Item was changed:
> ----- Method: ScrollPane>>keyStroke: (in category 'event handling') -----
> keyStroke: evt
> "If pane is not empty, pass the event to the last submorph,
>  assuming it is the most appropriate recipient (!!)"
>
> + scroller hasSubmorphs ifTrue:
> + [scroller lastSubmorph keyStroke: evt].!
> - scroller submorphs last keyStroke: evt!
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211020/d19e6fcb/attachment.html>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211021/10853547/attachment-0001.html>


More information about the Squeak-dev mailing list