[squeak-dev] Pressing Esc on empty tree morph raises MNU

Marcel Taeumel marcel.taeumel at hpi.de
Thu May 24 12:50:55 UTC 2018


Hi Jakob,

does the change in Morphic-mt.1441 work for you?

Best,
Marcel
Am 21.04.2018 13:56:35 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
Hi all,

I wanted to open the yellow button menu on an empty PluggableTreeMorph
(the SqueakMap catalog's package list to be precise, but I assume it
does not matter) and wanted to do so by pressing the escape key and
got the stack trace below.

The scroller of the PluggableTreeMorph is a TransformMorph, but it has
no submorphs if the tree is empty. Thus, in
numberOfItemsPotentiallyInView the localSubmorphBounds are nil, and
even if they were not, the next error would be a division by zero. The
TransformMorph does not expect to have no submorphs.

However, the real problem might be (or might not be) that a
PluggableTreeMorph behaves differently from a PluggableListMorph in
response to pressing Esc. The latter opens the yellow button menu,
while the tree morph does not treat Esc specially at all. It uses it
for list filtering instead, like any typed character. So effectively,
the Esc key in a tree morph is currently the "expand this node and
select the first child" key. I like the menu behavior from list morphs
better... What is your opinion?

Kind regards,
Jakob


UndefinedObject(Object)>>doesNotUnderstand: #height
TransformMorph>>numberOfItemsPotentiallyInView
PluggableTreeMorph(ScrollPane)>>numSelectionsInView
PluggableTreeMorph(SimpleHierarchicalListMorph)>>arrowKey:
PluggableTreeMorph(SimpleHierarchicalListMorph)>>specialKeyPressed:
PluggableTreeMorph>>specialKeyPressed:
PluggableTreeMorph(SimpleHierarchicalListMorph)>>keyStroke:
PluggableTreeMorph>>keyStroke:
PluggableTreeMorph(Morph)>>handleKeystroke:
KeyboardEvent>>sentTo:
PluggableTreeMorph(Morph)>>handleEvent:
PluggableTreeMorph(Morph)>>handleFocusEvent:
MorphicEventDispatcher>>doHandlingForFocusEvent:with:
MorphicEventDispatcher>>dispatchFocusEvent:with:
PluggableTreeMorph(Morph)>>processFocusEvent:using:
PluggableTreeMorph(Morph)>>processFocusEvent:
[] in [] in [] in HandMorph>>sendFocusEvent:to:clear:
BlockClosure>>ensure:
KeyboardEvent(MorphicEvent)>>becomeActiveDuring:
[] in [] in HandMorph>>sendFocusEvent:to:clear:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180524/98ddeaf9/attachment.html>


More information about the Squeak-dev mailing list