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

rabbit rabbit at callistohouse.org
Tue Mar 21 16:16:12 PDT 2023


For that matter, I’ve been contemplating how useful it would be to have inline initializers for method variables, like:

| arg1<#fortyTwo> arg2<42> arg3 <[6*7]> |

—
Have a good one; keep it, light.
Kindly, rabbit . .. … ‘…^,^ 🐇🐇🐇

Sent from Callisto House mobile - Ganymede
:: decentralized mobile homeless solutions ::

On Tue, Mar 21, 2023 at 18:13, rabbit via Cuis-dev <cuis-dev at lists.cuis.st> wrote:

> Would it be possible to install a block in the variable, on compilation, when undefined to auto-do during evaluation access to that variable…
>
> [thisContext
> setVariable: #varName
> put: (Smalltalk at: #varName).
> Smalltalk at: #varName]
>
> …for purposes of intuition.
> 🐰
>
>> Have a good one; keep it, light.
> Kindly, rabbit . .. … ‘…^,^ 🐇🐇🐇
>
> Sent from Callisto House mobile - Ganymede
> :: decentralized mobile homeless solutions ::
>
> On Tue, Mar 21, 2023 at 17:41, ken.dickey--- via Cuis-dev <cuis-dev at lists.cuis.st> wrote:
>
>> On 2023-03-21 12:57, Alexandre Rousseau via Cuis-dev wrote:
>>
>>> My point was the system complained that "MyTheme beCurrent " , scripted
>>> after the loading of said packaged theme, was pointing to a non
>>> existent class ... i.e., the loading was not complete when the
>>> "beCurrent" message was sent. Which makes the loading of packages
>>> asynchronous, does it not?
>>
>> Actually, not. It is a processing time problem.
>>
>> The code is first compiled as _a block_ and when that happens
>> #ClassicTheme is undefined, so nil.
>>
>> If you initially type
>> Feature require: #'Theme-Themes'.
>> ClassicTheme beCurrent.
>> into a workspace, you will see #ClassicTheme in RED because it is yet
>> undefined.
>>
>> If you select both lines and DoIt, you will get the #ClassicTheme
>> undefined exception, but if you select the first line and DoIt, then you
>> will note #ClassicTheme has turned BLUE as it is now defined. You can
>> select the 2nd line and DoIt, AOK.
>>
>> Since you are sending a block of text to be compiled at one time, you
>> have to deal with undefined values _at the time the text is compiled_.
>>
>> The easy fix in this case is to compile-in the explicit code to do the
>> lookup:
>> Feature require: #'Theme-Themes'.
>> (Smalltalk at: #ClassicTheme) beCurrent.
>>
>> Note that I do not find this very intuitive either.
>>
>> HTH,
>> -KenD
>>
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230321/c1267585/attachment-0001.htm>


More information about the Cuis-dev mailing list