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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Apr 3 15:03:01 UTC 2020


Hi all! :-)


Here's a bug that still spawns endless morphic debuggers despite the patch from below:


Rotate a menu item and hover it. Your image will stop working!

[cid:decc3db2-3dce-4bf4-863e-bac20e27c36b]

(I actually fixed this bug in my image, but it requires so many redirections of #owner that I'm not sure whether this is good for Trunk.)

However, the problem is that in #processEventsSafely:, ActiveEvent does not contain the mouseOver event but still a past mouseUp event (which is not high frequent). This leads me to the following question:
Why is #becomeActiveDuring: only sent from #sendEvent:focus:clear: but not from HandMorph >> #handleEvent: directly? If mouseEnter/mouseLeave events are sent via #processMouseOver:, ActiveEvent is not updated. This feels strange to me ... Is this actually a desired behavior? :-)

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Montag, 2. März 2020 12:23:27
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Morphic-ct.1638.mcz

Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1638.mcz

==================== Summary ====================

Name: Morphic-ct.1638
Author: ct
Time: 2 March 2020, 12:23:17.762949 pm
UUID: ade6a3af-6505-5e49-816d-b9940db95e25
Ancestors: Morphic-ct.1636

Slightly refines previous commit. Depends indeed on Morphic-ct.1636.

(Sorry for all the noise! We could really need some kind of branch concept ...)

=============== Diff against Morphic-ct.1636 ===============

Item was changed:
  ----- Method: WorldState>>doSafely:onErrorThat:setErrorFlag:ifFatal:afterErrorDo: (in category 'update cycle') -----
  doSafely: aBlock onErrorThat: errorPredicate setErrorFlag: errorFlag ifFatal: fatalErrorBlock afterErrorDo: postErrorBlock
         "Evaluate aBlock and keep track of errors during morph invocations."

         | finished classesWithErrors |
         finished := false.
         classesWithErrors := IdentitySet new.
         [finished] whileFalse: [
                 [aBlock value. finished := true] on: Error, Halt, Warning do: [:ex |
                         | err rcvr errCtxt errMorph |
                         (errorPredicate cull: ex)
                                 ifFalse: [ex pass].
                         err := ex description.
                         rcvr := ex receiver.

                         errCtxt := thisContext.
                         [
                                 errCtxt := errCtxt sender.
                                 "Search the sender chain to find the morph causing the problem"
                                 [errCtxt notNil and: [(errCtxt receiver isMorph) not]]
                                         whileTrue: [errCtxt := errCtxt sender].
                                 "If we're at the root of the context chain then we have a fatal problem"
                                 errCtxt ifNil: [^ fatalErrorBlock cull: err].
                                 errMorph := errCtxt receiver.
                                 "If the morph causing the problem has already the error flag set, then search for the next morph above in the caller chain."
                                 errMorph hasProperty: errorFlag
                         ] whileTrue.
+                        errMorph
+                                setProperty: errorFlag toValue: true;
+                                changed.
-                        errMorph setProperty: errorFlag toValue: true.

                         "Catch all errors, one for each receiver class."
                         (classesWithErrors includes: rcvr class) ifFalse: [
                                 classesWithErrors add: rcvr class.
                                 ToolSet debugException: ex].

                         postErrorBlock cull: err.
                 ]].!

Item was changed:
  ----- Method: WorldState>>processEventsSafely: (in category 'update cycle') -----
  processEventsSafely: aHandMorph

         ^ self
                 doSafely: [aHandMorph processEvents]
+                onErrorThat: [:error | ActiveEvent isNil or: [ActiveEvent isHighFrequentEvent]]
-                onErrorThat: [:error | ActiveEvent isHighFrequentEvent]
                 setErrorFlag: #errorOnEvent
                 ifFatal: [:error | Project current fatalEventHandlingError: error]
                 afterErrorDo: []!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200403/c0809f90/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 10623 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200403/c0809f90/attachment.png>


More information about the Squeak-dev mailing list