<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>Just interested, what is the benefit of [Error signal: 'foo'] against [self error: 'foo']? :)</p>
<p><br>
</p>
<p>Christoph</p>
<div id="x_Signature">
<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>
<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> Dienstag, 15. Oktober 2019 13:58:28<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: Morphic-mt.1577.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Marcel Taeumel uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-mt.1577.mcz">http://source.squeak.org/trunk/Morphic-mt.1577.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-mt.1577<br>
Author: mt<br>
Time: 15 October 2019, 1:58:16.523992 pm<br>
UUID: 1d4a5d6b-aeee-5242-b9ef-d2c81fedd846<br>
Ancestors: Morphic-mt.1576<br>
<br>
Better error message in pluggable lists for misbehaving models. :-)<br>
<br>
=============== Diff against Morphic-mt.1576 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PluggableListMorph>>getFullList (in category 'model access - cached') -----<br>
  getFullList<br>
         "The full, unfiltered list. Cached result, see #updateList. Prefer getListSelector over getListElementSelector if both a set."<br>
         <br>
         ^ fullList ifNil: [<br>
                 fullList := getListSelector<br>
                         ifNotNil: [:sel | model perform: sel]<br>
                         ifNil: [(getListSizeSelector notNil and: [getListElementSelector notNil])<br>
                                 ifTrue: [       (1 to: self getListSize) collect: [:index | self getListItem: index]]<br>
+                                ifFalse: [#() "We cannot get the full list."]].<br>
+                fullList ifNil: [Error signal: 'The model must never provide ''nil'' as a list but only a collection.'].<br>
+                fullList]!<br>
-                                ifFalse: [#() "We cannot get the full list."]]]!<br>
<br>
Item was changed:<br>
  ----- Method: PluggableListMorph>>updateListFilter (in category 'updating') -----<br>
  updateListFilter<br>
  <br>
         | selection |<br>
+        selection := self selectionIndex = 0 "Avoid fetching #getList here."<br>
+                ifTrue: [nil]<br>
+                ifFalse: [self selection].<br>
-        selection := self selection.<br>
  <br>
         list := nil.<br>
         modelToView := nil.<br>
         viewToModel := nil.<br>
  <br>
         self getList.<br>
         <br>
         "Try to restore the last selection."<br>
         selection ifNotNil: [self selection: selection].!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>