[Cuis-dev] Fixes for SpaceTally PluggableButtonMorph and WorldMorph
David Faitelson
davidf at afeka.ac.il
Tue Apr 7 03:55:02 PDT 2026
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260407/e11d0359/attachment.htm>
More information about the Cuis-dev
mailing list