[squeak-dev] The Inbox: Morphic-ct.1605.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sun Dec 8 18:39:34 UTC 2019
Hi Marcel,
I'm not sure about this, but #closeDialog appears to perform the buttonAction on the currently selected button. #cancelDialog should match even better here. But in general, do we want so much action just in an ensure routine?
If not #abandon, then I would rather call "self closeDialog: nil", and this only sets result before calling #delete.
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Sonntag, 8. Dezember 2019 15:49:10
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1605.mcz
Hi Christoph,
why did you change "self closeDialog" to "self abandon"?
Best,
Marcel
Am 07.12.2019 16:21:22 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.1605.mcz
==================== Summary ====================
Name: Morphic-ct.1605
Author: ct
Time: 7 December 2019, 4:21:04.854219 pm
UUID: 3c7d5454-0b60-2a47-91fd-51d333eeeb3b
Ancestors: Morphic-mt.1604
Delete dialog windows if curtailed
This can happen when the user debugs its invocation and then abandons the debugger, but also in the following example:
[self inform: 'Carpe Squeak!'] valueWithin: 2 seconds onTimeout: []
Imho, it would be a bad idea to keep such a dialog window open if nothing will happen after you react on it.
=============== Diff against Morphic-mt.1604 ===============
Item was changed:
----- Method: DialogWindow>>debugInvocation (in category 'running') -----
debugInvocation
+ Processor activeProcess
- [Processor activeProcess
debug: self findInvocationContext
+ title: 'Dialog invocation'!
- title: 'Dialog invocation']
- ifCurtailed: [self closeDialog].!
Item was changed:
----- Method: DialogWindow>>getUserResponse (in category 'running') -----
getUserResponse
| hand world |
self message ifEmpty: [messageMorph delete]. "Do not waste space."
self paneMorph submorphs
ifEmpty: ["Do not waste space and avoid strange button-row wraps."
self paneMorph delete.
self buttonRowMorph wrapDirection: #none].
hand := self currentHand.
world := self currentWorld.
self fullBounds.
self moveToPreferredPosition.
self openInWorld: world.
hand showTemporaryCursor: nil. "Since we are out of context, reset the cursor."
hand keyboardFocus in: [:priorKeyboardFocus |
hand mouseFocus in: [:priorMouseFocus |
self exclusive ifTrue: [hand newMouseFocus: self].
hand newKeyboardFocus: self.
+ [[self isInWorld] whileTrue: [world doOneSubCycle]]
+ ifCurtailed: [self abandon].
- [self isInWorld] whileTrue:[world doOneSubCycle].
hand newKeyboardFocus: priorKeyboardFocus.
hand newMouseFocus: priorMouseFocus]].
^ result!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191208/b8b29338/attachment.html>
More information about the Squeak-dev
mailing list
|