[Cuis-dev] [Cuis 6] Startup script

Juan Vuletich JuanVuletich at zoho.com
Tue Jan 4 11:46:36 PST 2022


On 1/4/2022 4:37 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> I updated and saved the image, and it is working now. Strange.
>
> Hilaire
>

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.

A possible way is to do the morph deletion in a #whenUIinSafeState: 
block, or a lower priority forked process.

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.

Cheers,

> Le 03/01/2022 à 21:46, Hilaire Fernandes a écrit :
>>
>> This is run as described in the Cuis Book 
>> (https://cuis-smalltalk.github.io/TheCuisBook/Daily-Workflow.html).
>>
>> I tried the third option for a startup script:
>>
>> | list  |
>> "Delete all windows but the taskbar"
>> WorldMorph allInstancesDo: [:w | list := w submorphs reject: [:aMorph 
>> | aMorph is: #TaskbarMorph]].
>> list do: [:each | each delete].
>>
>> 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.
>>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu


-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220104/6e5e840f/attachment.htm>


More information about the Cuis-dev mailing list