<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>We could define even more of these fallback methods. However, I'm not sure how we should choose the kernel methods we could fall back to:</p>
<p>For example, in #multilineRequest:..., we could fall back to #request:.... However, wouldn't it be easier for a lazy subclass implementor that only wants to implement a single one method if we fell back just the other way around and called #multilineRequest:...
 from #request:...? On the other hand, multiline requests might be a rather rare use case.</p>
<p>To demonstrate the relevance of this design problem, I would like to ask the same question for #<span>confirm:title: vs. #<span>confirm:title:trueChoice:falseChoice:. Actually, the short version is only an edge case of the long version. But would we really want
 to require each possible subclass to implement the long and complex version?</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>And just another question:</span></span></p>
<p><span><span>Would it be okay to add further fallbacks for #chooseDirectory:from: and the #chooseFileMatching: versions? Basically, they can be implemented via simple #request: ("enter a filepath"), but to ensure that the path is valid, we would need to depend
 on Files. At the moment, we require each concrete subclass of UIManager to depend so.</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>Tricky questions (at least for me) ... I am looking forward to your help!</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>Best,</span></span></p>
<p><span><span>Christoph</span></span></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Freitag, 24. Januar 2020 18:34:44<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: ToolBuilder-Kernel-ct.135.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of ToolBuilder-Kernel to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.135.mcz">http://source.squeak.org/inbox/ToolBuilder-Kernel-ct.135.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: ToolBuilder-Kernel-ct.135<br>
Author: ct<br>
Time: 24 January 2020, 6:34:43.604574 pm<br>
UUID: 3ec2613e-56d3-2d41-b5c3-799a66a986e9<br>
Ancestors: ToolBuilder-Kernel-mt.134<br>
<br>
Provides fallback implementations for some UIManager messages<br>
<br>
=============== Diff against ToolBuilder-Kernel-mt.134 ===============<br>
<br>
Item was changed:<br>
  ----- Method: UIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----<br>
  chooseFrom: labelList values: valueList lines: linesArray title: aString<br>
+        "Choose an item from the given list. Answer the corresponding value."<br>
+        | result |<br>
+        result := self chooseFrom: labelList lines: linesArray title: aString.<br>
+        (result isNil or: [result isZero]) ifTrue: [^ nil].<br>
+        ^ valueList at: result!<br>
-        "Choose an item from the given list. Answer the selected item."<br>
-        ^self subclassResponsibility!<br>
<br>
Item was changed:<br>
  ----- Method: UIManager>>confirm:orCancel: (in category 'ui requests') -----<br>
  confirm: aString orCancel: cancelBlock<br>
+        "Put up a yes/no/cancel menu with caption aString. Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. This is a modal question--the user must respond yes or no."<br>
+        ^ (self confirm: aString)<br>
+                ifFalse: [cancelBlock value];<br>
+                yourself!<br>
-        "Put up a yes/no/cancel menu with caption aString. Answer true if  <br>
-        the response is yes, false if no. If cancel is chosen, evaluate  <br>
-        cancelBlock. This is a modal question--the user must respond yes or no."<br>
-        ^self subclassResponsibility!<br>
<br>
Item was changed:<br>
  ----- Method: UIManager>>confirm:orCancel:title: (in category 'ui requests') -----<br>
  confirm: aString orCancel: cancelBlock title: titleString<br>
+        "Put up a yes/no/cancel menu with caption aString, and titleString to label the dialog. Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. This is a modal question--the user must respond yes or no."<br>
+        ^ (self confirm: aString title: titleString)<br>
+                ifFalse: [cancelBlock value];<br>
+                yourself!<br>
-        "Put up a yes/no/cancel menu with caption aString, and titleString to label the dialog.<br>
-        Answer true if  the response is yes, false if no. If cancel is chosen, evaluate cancelBlock.<br>
-        This is a modal question--the user must respond yes or no."<br>
-        ^self subclassResponsibility!<br>
<br>
Item was changed:<br>
  ----- Method: UIManager>>request:initialAnswer:centerAt: (in category 'ui requests - text') -----<br>
  request: queryString initialAnswer: defaultAnswer centerAt: aPoint <br>
+        "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the string the user accepts. Answer the empty string if the user cancels."<br>
-        "Create an instance of me whose question is queryString with the given<br>
-        initial answer. Invoke it centered at the given point, and answer the<br>
-        string the user accepts. Answer the empty string if the user cancels."<br>
  <br>
+        ^ self request: queryString initialAnswer: defaultAnswer!<br>
-        ^self subclassResponsibility!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>