[Cuis-dev] Feature #require: completion event or test?

ken.dickey at whidbey.com ken.dickey at whidbey.com
Tue Mar 21 12:02:25 PDT 2023


On 2023-03-19 16:19, Alexandre Rousseau via Cuis-dev wrote:

> My startup configuration script (thanks Hilaire) includes these lines:
> 
>> Feature require: #'Theme-Themes'.
>> ClassicTheme beCurrent.
> 
> Command line launching of Squeak and image + script reports this error:
> 
>> 2023-03-19T19:10:00.886 process:40 709851 UndefinedObject>>DoIt 
>> (ClassicTheme is Undeclared)
>> 2023-03-19T19:10:00.886 process:40 709851 Package Theme-Themes 
>> successfully installed
> 
> Clearly, the feature is not yet loaded when I attempt to send a message 
> to ClassicTheme.
> 
> Feature doesn't seem to dispatch events when it is done "requiring" a 
> package, so I am wondering how you would address this.

Alexandre,

Not sure what your context is, but note that you can subclass 
CodePackage and define #postPackageInstall (and/or prePackageInstall) to 
do pre-install checks and post-install actions.

Browse code for example usage in:
  EnhancedText/Unicode/UniCodesTrueType.pck.st

HTH,
-KenD


More information about the Cuis-dev mailing list