<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 1/4/2022 4:37 AM, Hilaire Fernandes via Cuis-dev wrote:
    <blockquote cite="mid:92a9f241-a695-81a9-7993-cf1cd99dfb81@drgeo.eu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p><font size="+1">I updated and saved the image, and it is
          working now. Strange.</font></p>
      <p><font size="+1">Hilaire</font><br>
      </p>
    </blockquote>
    <br>
    This is (I'm pretty sure) because the "Save Release and Quit" option
    kills the existing world, that is re created on startup. By the time
    the script is run, the world doesn't exist. But after re-saving the
    image, the world is preserved.<br>
    <br>
    A possible way is to do the morph deletion in a #whenUIinSafeState:
    block, or a lower priority forked process.<br>
    <br>
    An alternative is to use app specific code to build your world, and
    install it. Any old world would be just forgotten. See implementors
    and senders of #recreateDefaultDesktop.<br>
    <br>
    Cheers,<br>
    <br>
    <blockquote cite="mid:92a9f241-a695-81a9-7993-cf1cd99dfb81@drgeo.eu"
      type="cite">
      <p> </p>
      <div class="moz-cite-prefix">Le 03/01/2022 à 21:46, Hilaire
        Fernandes a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:a92c064d-0a5d-47bd-fed6-730004a8e5b5@drgeo.eu">
        <p><font size="+1">This is run as described in the Cuis Book (<a
              class="moz-txt-link-freetext"
              href="https://cuis-smalltalk.github.io/TheCuisBook/Daily-Workflow.html"
              moz-do-not-send="true">https://cuis-smalltalk.github.io/TheCuisBook/Daily-Workflow.html</a>).</font></p>
        <p><font size="+1">I tried the third option for a startup
            script:</font></p>
        <p><font size="+1">| list  |<br>
            "Delete all windows but the taskbar"<br>
            WorldMorph allInstancesDo: [:w | list := w submorphs reject:
            [:aMorph | aMorph is: #TaskbarMorph]].<br>
            list do: [:each | each delete].<br>
          </font></p>
        <p><font size="+1">It does not work when invoked at startup as
            the argument of the -s option. When copied and pasted in
            Cuis6 Workspace, it works though.</font></p>
      </blockquote>
      <pre class="moz-signature" cols="72">-- 
GNU Dr. Geo
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.researchgate.net/profile/Juan-Vuletich">https://www.researchgate.net/profile/Juan-Vuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
<a class="moz-txt-link-freetext" href="https://independent.academia.edu/JuanVuletich">https://independent.academia.edu/JuanVuletich</a>
@JuanVuletich</pre>
  </body>
</html>