<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-28 17:02 GMT+02:00 Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi, I need to retrieve the last object put on a Stream (well SmartRefStream does).<br>
</div>This is very much like #ensureEndsWith:<br><br></div>There is back, but back leave the stream positionned before the last object.<br>
<br>((ReadWriteStream on: String new) nextPutAll: &#39;abc&#39;; back) -&gt; $c<br>((ReadWriteStream on: String new) nextPutAll: &#39;abc&#39;; back; position) -&gt; 2.<br><br></div>There is peekBack, but peekBack answers the last but one...</div>

<div><br></div>((ReadWriteStream on: String new) nextPutAll: &#39;abc&#39;; peekBack) -&gt; $b.<br>((ReadWriteStream on: String new) nextPutAll: &#39;abc&#39;; peekBack; position) -&gt; 3.<br><br><div>Note that neither back nor peekBack is understood by a WriteStream.<br>

</div>It requires a ReadWriteStream.<br><br></div>Since peekBack is the sole sender of oldBack in trunk, I wonder who is using it?<br></div>I ask because I&#39;d like to change the meaning of peekBack to that of back instead of oldBack.<br>

</div>Unless you have a better selector to propose?<br><div><div><div><br></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">More exactly, I&#39;d like to implement PositionnableStream&gt;&gt;peekBackFor: anObject to return a Boolean like peekFor: and it would be a good thing that peekBack answers the same Object.<br>
</div></div>