<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>it's just harder to use in scripting.</p>
<p><br>
</p>
<p>Basically, I think we would need composition to integrate the progress-reporting concern into Collections. I've already tried in the past to write a proxy ProgressReadStream, but our streams do not have an execute-around semantics, making it hard to close
 the progress bar again ...</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
</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> Donnerstag, 27. Januar 2022 11:17:04<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Collections-ct.979.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
-1 Next thing would be #reject: then ... then .. ;-)
<div><br>
</div>
<div>I think that the alternative is okay-ish:</div>
<div><br>
</div>
<div>Array streamContents: [:s |</div>
<div>  (1 to: 5000) do: [:i | s nextPut: i factorial] displayingProgress: [:i | ...]].</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 26.01.2022 21:42:24 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">A new version of Collections was added to project The Inbox:<br>
http://source.squeak.org/inbox/Collections-ct.979.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Collections-ct.979<br>
Author: ct<br>
Time: 26 January 2022, 9:42:12.334407 pm<br>
UUID: 3ddfcc79-b9c2-504e-bd97-f5ec888dee08<br>
Ancestors: Collections-mt.978<br>
<br>
Proposal: Add #collect:displayingProgress: to the enumerating protocol. Especially useful during scripting.<br>
<br>
(1 to: 5000) asArray collect: [:i | i factorial] displayingProgress: [:i | 'Computing factorial for ' , i]<br>
<br>
=============== Diff against Collections-mt.978 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Collection>>collect:displayingProgress: (in category 'enumerating') -----<br>
+ collect: aBlock displayingProgress: aStringOrBlock<br>
+ <br>
+ | newCollection |<br>
+ newCollection := OrderedCollection new.<br>
+ self<br>
+ do: [:each | newCollection add: (aBlock value: each)]<br>
+ displayingProgress: aStringOrBlock.<br>
+ ^ newCollection!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>