<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 15, 2014 at 2:58 AM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On Thu, 14 Aug 2014, Chris Muller wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
In trying to review this, I see that Behavior>>#startUp: simply says ^self startUp and there are dozens of implementors of #startUp (ugh).<br>
So, I tried evaluating "FileStream halt startUp" to see where the debugger takes me. Can't step into it, which means its a no-op.<br>
<br>
Are you sure the super call is doing something?<br>
</blockquote>
<br></div>
This solution works in the sense that it'll evaluate MultiByteFileStream class >> #startUp at startup, but it'll still evaluate it whenever the image is saved, and keep the double initialization of the stdioFiles.<br>
IMHO the right solution is to implement MultiByteFileStream class >> #startUp: as<br>
<br>
resuming ifTrue: [ self guessDefaultLineEndConvention ]<br>
<br>
And remove MultiByteFileStream class >> #startUp.<br>
Also it's time to remove CrLfFileStream from the startup list, because it also triggers another initialization of the stdioFiles.<br>
We should also revisit all implementors of #startUp, and probably change them to #startUp:, because changing the implementation in the superclass can have side effects like this.</blockquote><div><br></div><div><br class="">
+1</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888"><br>
<br>
<br>
Levente</font></span><div class=""><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
<br>
On Thu, Aug 14, 2014 at 2:58 PM, <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br>
A new version of Files was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Files-cbc.137.mcz" target="_blank">http://source.squeak.org/<u></u>inbox/Files-cbc.137.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Files-cbc.137<br>
Author: cbc<br>
Time: 14 August 2014, 12:58:30.28 pm<br>
UUID: d0cae3e8-88fc-db40-a2ee-<u></u>05ccc2714789<br>
Ancestors: Files-eem.136<br>
<br>
Fix FileStream class>>startUp: to call super startUp:. This allows normal startup routines (such as MutliByteFileStream) to determine what kind of line endings the platform uses at startup time<br>
(in other words, normal startup activities).<br>
<br>
=============== Diff against Files-eem.136 ===============<br>
<br>
Item was changed:<br>
----- Method: FileStream class>>startUp: (in category 'system startup') -----<br>
startUp: resuming<br>
<br>
resuming ifTrue: [<br>
self voidStdioFiles.<br>
[ TheStdioHandles := self stdioHandles ]<br>
on: Error<br>
do: [:ex|<br>
TheStdioHandles isArray ifFalse: [<br>
+ TheStdioHandles := Array new: 3 ] ] ].<br>
+ "Allow regular #startUp activity as well"<br>
+ super startUp: resuming!<br>
- TheStdioHandles := Array new: 3 ] ] ]!<br>
<br>
<br>
<br>
<br>
</blockquote>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>