<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>Thank you for the explanation, I see my mistake. Would you still consider some method such as Process>>#runUntilMethod: or #runUntilClass:selector:? I think that only checking the selector is not really the desired behavior here, is it?</p>
<p><br>
</p>
<p>And even though this is a very minor point, I do not really like the "triangle layout" of these debug methods. Wouldn't the following <span>variant</span> provide a better rectangular layout? Just curious how patterns are applied here the best way :-)</p>
<p><br>
</p>
<p><img size="72727" contenttype="image/png" id="img318012" style="max-width: 99.9%; user-select: none;" aria-expanded="false" contextid="img872915" tabindex="0" src="cid:be4bfc68-d213-4744-8768-c2fd5bca6280"><br>
</p>
<p><br>
</p>
<p>Aside from this, would you like me to upload the "debug accept action" again in a separate commit or is this easier to do for the merger? :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 18. November 2019 09:28:23<br>
<b>An:</b> John Pfersich via Squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Morphic-ct.1590.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Hi, Christoph.
<div><br>
</div>
<div>-1 for the refactoring of all "debug action". </div>
<div><br>
</div>
<div>The use of ToolSet here feels less object-oriented than working with an actual process object, which is easy to create.</div>
<div><br>
</div>
<div>Also, #debugWithTitle: ends up nicely in ToolSet already. No benefit in expanding the interface of ToolSet any further for this scenario.</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 15.11.2019 19:55:36 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">A new version of Morphic was added to project The Inbox:<br>
http://source.squeak.org/inbox/Morphic-ct.1590.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ct.1590<br>
Author: ct<br>
Time: 15 November 2019, 7:55:13.975005 pm<br>
UUID: 1f877d26-b019-fb45-9020-7c902b002b46<br>
Ancestors: Morphic-mt.1588<br>
<br>
Add "debug accept action" into debug menu of PluggableTextMorph. Furthermore, refactor all "debug action" code in this package by using ToolSet>>#debugBlock:runUntilMethod:withTitle:.<br>
<br>
Complements System-ct.1121.<br>
<br>
=============== Diff against Morphic-mt.1588 ===============<br>
<br>
Item was added:<br>
+ ----- Method: MenuItemMorph>>actionMethod (in category 'browse') -----<br>
+ actionMethod<br>
+ <br>
+ ^ (target class lookupSelector: selector) methodReference!<br>
<br>
Item was changed:<br>
----- Method: MenuItemMorph>>browseImplementationOfActionSelector (in category 'browse') -----<br>
browseImplementationOfActionSelector<br>
<br>
+ ^ self actionMethod browse!<br>
- | method |<br>
- method := target class lookupSelector: selector.<br>
- ToolSet browse: method methodClass selector: method selector.!<br>
<br>
Item was changed:<br>
----- Method: MenuItemMorph>>debugAction (in category 'browse') -----<br>
debugAction<br>
<br>
+ ^ ToolSet<br>
+ debugBlock: [self doButtonAction]<br>
+ runUntilMethod: self actionMethod<br>
+ withTitle: ('Debug menu action "{1}" in model "{2}"' format: {self contents. self target printString})!<br>
- (Process<br>
- forBlock: [self doButtonAction]<br>
- runUntil: [:context | context selector = self selector])<br>
- debugWithTitle: ('Debug menu action "{1}" in model "{2}"' format: {self contents. self target printString}).!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableButtonMorph>>actionMethod (in category 'debug menu') -----<br>
+ actionMethod<br>
+ <br>
+ ^ (model class lookupSelector: actionSelector) methodReference!<br>
<br>
Item was changed:<br>
----- Method: PluggableButtonMorph>>browseImplementationOfActionSelector (in category 'debug menu') -----<br>
browseImplementationOfActionSelector<br>
<br>
+ ^ self actionMethod browse!<br>
- | method |<br>
- method := model class lookupSelector: actionSelector.<br>
- ToolSet browse: method methodClass selector: method selector.!<br>
<br>
Item was changed:<br>
----- Method: PluggableButtonMorph>>debugAction (in category 'debug menu') -----<br>
debugAction<br>
<br>
+ ^ ToolSet<br>
+ debugBlock: [self performAction]<br>
+ runUntilMethod: self actionMethod<br>
+ withTitle: ('Debug button action "{1}" in model "{2}"' format: {self label. self target printString})!<br>
- (Process<br>
- forBlock: [self performAction]<br>
- runUntil: [:context | context selector = self actionSelector])<br>
- debugWithTitle: ('Debug button action "{1}" in model "{2}"' format: {self label. self target printString}).!<br>
<br>
Item was changed:<br>
----- Method: PluggableListMorph>>browseImplementationOfGetListSelector (in category 'debug and other') -----<br>
browseImplementationOfGetListSelector<br>
<br>
+ ^ self getListMethod browse!<br>
- | method |<br>
- method := model class lookupSelector: getListSelector.<br>
- ToolSet browse: method methodClass selector: method selector.!<br>
<br>
Item was changed:<br>
----- Method: PluggableListMorph>>debugGetList (in category 'debug and other') -----<br>
debugGetList<br>
<br>
+ ^ ToolSet<br>
+ debugBlock: [model perform: getListSelector]<br>
+ runUntilMethod: self getListMethod<br>
+ withTitle: ('Debug get-list invocation in model "{1}"' format: {model printString})!<br>
- (Process<br>
- forBlock: [model perform: getListSelector]<br>
- runUntil: [:context | context selector = getListSelector])<br>
- debugWithTitle: ('Debug get-list invocation in model "{1}"' format: {model printString}).!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableListMorph>>getListMethod (in category 'debug and other') -----<br>
+ getListMethod<br>
+ <br>
+ ^ (self model class lookupSelector: self getListSelector) methodReference!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableTextMorph>>acceptMethod (in category 'debug and other') -----<br>
+ acceptMethod<br>
+ <br>
+ ^ (self model class lookupSelector: self setTextSelector) methodReference!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableTextMorph>>browseImplementationOfAcceptSelector (in category 'debug and other') -----<br>
+ browseImplementationOfAcceptSelector<br>
+ <br>
+ ^ self acceptMethod browse!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableTextMorph>>buildDebugMenu: (in category 'debug and other') -----<br>
+ buildDebugMenu: aHandMorph<br>
+ <br>
+ | aMenu |<br>
+ aMenu := super buildDebugMenu: aHandMorph.<br>
+ aMenu addLine.<br>
+ aMenu add: 'browse accept action' translated target: self action: #browseImplementationOfAcceptSelector.<br>
+ aMenu add: 'debug accept action' translated target: self action: #debugAccept.<br>
+ ^ aMenu!<br>
<br>
Item was added:<br>
+ ----- Method: PluggableTextMorph>>debugAccept (in category 'debug and other') -----<br>
+ debugAccept<br>
+ <br>
+ ^ ToolSet<br>
+ debugBlock: [self acceptTextInModel]<br>
+ runUntilMethod: self acceptMethod<br>
+ withTitle: ('Debug accept action in model "{1}"' format: {self model})!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>