<div dir="ltr"><div>There was a typo. Here's the corrected version.<br><br>-- <br></div>Eze</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, 7 Mar 2025 at 16:24, Ezequiel Birman <<a href="mailto:ebirman77@gmail.com">ebirman77@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello<br><br><div>I wanted a <b>reject:thenDo:</b>. so instead of:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">| taskbar userInterface |<br><br>"If we were to ommit this, the taskbar wouldn't exist yet, and therefore taskbar would be initialized to nil"<br><b>self runningWorld doOneCycleNow.</b><br><b><br>userInterface := UISupervisor ui.<br>taskbar := userInterface taskbar.</b><br><br>"Remove all morphs except for the taskbar. We also leave code windows intact in case we are recovering from a crash."<br><b>userInterface submorphs</b><br><b> select: [ :morph | (morph isKindOf: CodeWindow) not and: [ morph ~= taskbar ]]</b><br><b> thenDo: #delete.</b></blockquote><br></div><div>I can rewrite:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">"Remove all morphs except for the taskbar. We also leave code windows intact in case we are recovering from a crash."<br><b>userInterface submorphs</b><br><b> reject: [ :morph | (morph isKindOf: CodeWindow) or: [ morph = taskbar ]]</b><br><b> thenDo: #delete.</b></blockquote></div><div><br>While I was at it, I refactored <b>select:ThenCollect:</b> to avoid iterating twice, then added a <b>reject:thenCollect:</b> just for the sake of symmetry.<br><br></div><div>I attach the changeset in case you find it useful; but I wanted to know what is your opinion on adding tests that exercise higher-level messages like these. If they are needed or wanted, I can also add them to BaseImageTests.<br><br>-- <br></div><div>Eze</div></div>
</blockquote></div>