[Cuis-dev] Fixes for SpaceTally PluggableButtonMorph and WorldMorph

Juan Vuletich juan at jvuletich.org
Tue Apr 7 07:59:37 PDT 2026


Hi David,

All three are spot on. Just pushed them to GitHub (using your author 
initials).

Thank you!

On 2026-04-07 7:55 AM, David Faitelson via Cuis-dev wrote:
> Hi all,
>
> I have stumbled upon three problems when runing the latest Cuis, two 
> simple and the third a bit more subtle.
>
> 1. SpaceTally >> spaceTally: compares the result of spaceForInstances 
> with > but spaceForInstances answers an array, so the comparison 
> should probably be something like
>
> a spaceForInstances first > b spaceForInstances first
>
> As the first member in the array is the total size.
>
> And similarly change the example in the doc for the class.
>
> 2. PluggableButtonMorph >> icon: does not handle correctly a nil 
> argument. This breaks various bits of the system after using 
> reduceCuis. A simple fix is to check that the icon is not nil,
>
> aForm notNil and:[self isRound] :: ifTrue:[ ...
>
> 3. WordMorph >> runProcess: does not  correctly restores the state of 
> alarms. It sets lastAlarmTime to 0, but does not update the schedule 
> time of existing alarms, which means that their alarm time is pushed 
> far far into the future. A possible correction is to run the following 
> code just before lastAlarmTime is set to 0:
>
> alarms do: [:alarm | alarm scheduledTime: alarm scheduleTime - 
> lastAlarmTime ].
>
> Then set lastAlarmTime to 0. This will maintain the same distance 
> between the schedule of each alarm as it was before lastAlarmTime was 
> set to 0.
>
> Cheers,
> David
>
>
> השג את Outlook עבור iOS <https://aka.ms/o0ukef>
>
> -- Cuis-dev mailing list Cuis-dev at lists.cuis.st 
> https://lists.cuis.st/mailman/listinfo/cuis-dev

-- 
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260407/efdfaed3/attachment.htm>


More information about the Cuis-dev mailing list