Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1497.mcz==================== Summary ====================
Name: Morphic-mt.1497
Author: mt
Time: 4 August 2019, 11:15:17.459314 am
UUID: 83af2cfd-497d-164d-a5bf-38988041a7f9
Ancestors: Morphic-mt.1496
Merges Morphic-ct.1496 (moved to treated inbox due to incompatible ancestry).
Introduce 'debug invocation' of DialogWindow
Also refine context search to reduce displayed stack size.
(After opening debugger, useful applications might be: step over, answer the dialog and continue debugging; return entered value to fake user's response)
=============== Diff against Morphic-mt.1496 ===============
Item was added:
+ ----- Method: DialogWindow>>debugInvocation (in category 'running') -----
+ debugInvocation
+
+ [Processor activeProcess
+ debug: self findInvocationContext
+ title: 'Dialog invocation']
+ ifCurtailed: [self closeDialog].!
Item was changed:
----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
exploreInvocation
| result context |
self exclusive: false. "We want to explore."
result := OrderedCollection new.
+ context := self findInvocationContext.
- context := thisContext.
- [context method selector = #getUserResponse]
- whileFalse: [context := context sender].
-
[context sender] whileNotNil: [
result add: context method.
context := context sender].
result add: context method.
result explore.!
Item was added:
+ ----- Method: DialogWindow>>findInvocationContext (in category 'running') -----
+ findInvocationContext
+
+ | context |
+ context := thisContext.
+ [context method selector = #getUserResponse and: [context isMethodContext]]
+ whileFalse: [context := context sender].
+ ^ context!
Item was changed:
----- Method: DialogWindow>>offerDialogMenu (in category 'running') -----
offerDialogMenu
| menu |
menu := MenuMorph new defaultTarget: self.
menu
add: (exclusive == true ifTrue: ['<yes>'] ifFalse: ['<no>']), 'be modally exclusive' translated
+ action: #toggleExclusive;
- action: #toggleExclusive;
addLine;
add: 'explore dialog invocation' translated
+ action: #exploreInvocation;
+ add: 'debug dialog invocation' translated
+ action: #debugInvocation.
- action: #exploreInvocation.
menu popUpEvent: self currentEvent in: self world.
[menu isInWorld] whileTrue: [self world doOneSubCycle].
self exclusive ifTrue: [self activeHand newMouseFocus: self].!