<div dir="ltr">Thanks Ken. Makes sense. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 21, 2023 at 5:41 PM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2023-03-21 12:57, Alexandre Rousseau via Cuis-dev wrote:<br>
<br>
> My point was the system complained that "MyTheme beCurrent " , scripted <br>
> after the loading of said packaged theme, was pointing to a non <br>
> existent class ... i.e., the loading was not complete when the <br>
> "beCurrent" message was sent.    Which makes the loading of packages <br>
> asynchronous, does it not?<br>
<br>
Actually, not.  It is a processing time problem.<br>
<br>
The code is first compiled as _a block_ and when that happens <br>
#ClassicTheme is undefined, so nil.<br>
<br>
If you initially type<br>
    Feature require: #'Theme-Themes'.<br>
    ClassicTheme beCurrent.<br>
into a workspace, you will see #ClassicTheme in RED because it is yet <br>
undefined.<br>
<br>
If you select both lines and DoIt, you will get the #ClassicTheme <br>
undefined exception, but if you select the first line and DoIt, then you <br>
will note #ClassicTheme has turned BLUE as it is now defined.  You can <br>
select the 2nd line and DoIt, AOK.<br>
<br>
Since you are sending a block of text to be compiled at one time, you <br>
have to deal with undefined values _at the time the text is compiled_.<br>
<br>
The easy fix in this case is to compile-in the explicit code to do the <br>
lookup:<br>
   Feature require: #'Theme-Themes'.<br>
   (Smalltalk at: #ClassicTheme) beCurrent.<br>
<br>
Note that I do not find this very intuitive either.<br>
<br>
HTH,<br>
-KenD<br>
<br>
</blockquote></div>