<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Dave.<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">The tricky part is still there - how do you arrange for the option</span></div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> blocks to be evaluated at the earliest possible time, but no sooner?</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Oh, the semantics would stay as you proposed. But for the future, there would we a direct reference from DoItFirst to the "helper classes". At the moment, you leak the implementation details #reevaluateDebug and #reevaluateCwd outside DoItFirst. With just this little indirection, that leak would disappear:</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">DoItFirst class >> startUpFromDelay</span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">   self reevaluateDebug.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">DoItFirst class >> startUpFromFileDirectory</span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">   self reevaluateCwd.</span></span></div></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></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;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 09.12.2020 20:59:42 schrieb David T. Lewis <lewis@mail.msen.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">Hi Marcel,<br><br>On Wed, Dec 09, 2020 at 11:21:15AM +0100, Marcel Taeumel wrote:<br>> Hi David.<br>> <br>> Thanks for working on this! :-)<br>> <br>> That special case in "Delay" reminds me of the suggestion to just put "DoItFirst" at a more sensible place in the start-up list. But then it would not be "do it first" anymore. :-D Same for FileDirectory.<br>><br><br>Pretty much everything I tried needed a bit of hackery someplace,<br>and in the end it seemed simplest to do everything from the first<br>position in the startup list, with whatever minimal hacks were needed<br>to make this work.<br><br>I found that the only command option that could not be processed from<br>the first entry in the startup list was --debug. It works when run after<br>the Delay startup, but not before. So I arranged for the command "action"<br>to be registered in the DoItFirst startup, but not actually invoked until<br>the end of the Delay startup.<br><br>The FileDirectory hack is not strictly required, but without it the --cwd<br>setting gets reset to the normal default later in the startup processing.<br>Thus it would be active for e.g. any --doit options, but would be reset<br>by the time the image finishes startup processing. Arguably that behavior<br>might be considered more correct, but it would be confusing to someone<br>who specified a --cwd option and expected it to take effect for the<br>image overall. The "solution" was to add a second invocation of the<br>--cwd option at the end of the FileDirectory startup.<br> <br>> What about a little bit more "double dispatch"?<br>> <br>> (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit startUpFromDelay ].<br>> <br>> (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit startUpFromFileDirectory ].<br>> <br><br>The tricky part is still there - how do you arrange for the option<br>blocks to be evaluated at the earliest possible time, but no sooner?<br><br>Dave<br><br><br></div></blockquote></div>