[squeak-dev] The Inbox: Morphic-ct.1859.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Jan 27 16:38:49 UTC 2022

Hi Marcel,

#flash is broadcasted by some models to possibly many morphs, so I think a synchronous call comes with the drawback of unnecessarily slowing down the system for each invocation. How would you think of a separate new #flashAsync for this use case? :-)



Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 27. Januar 2022 11:09:28
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1859.mcz

Hi Christoph --


Please don't make a synchronous call async like this. Add a busyWait if you like, but no Morphic alarm.


Am 26.01.2022 21:50:31 schrieb commits at source.squeak.org <commits at source.squeak.org>:

A new version of Morphic was added to project The Inbox:

==================== Summary ====================

Name: Morphic-ct.1859
Author: ct
Time: 26 January 2022, 9:50:11.019407 pm
UUID: 83e57c24-b685-2a4a-ac5a-ad0df51bba9d
Ancestors: Morphic-mt.1858

Proposal: Makes #flash more visible by
a) using a morphic alarm to ensure that the flash also appears on fast machines (on my machine, it did not always appear before else)
b) having system windows participate in a flash requested by a model too.

=============== Diff against Morphic-mt.1858 ===============

Item was changed:
----- Method: Morph>>flash (in category 'macpal') -----
| originalColor |
originalColor := self color.
+ self color:
- [ self color:
ifNil: [ Color black ]
+ ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]).
+ self refreshWorld.
+ self addAlarm: #color: with: originalColor after: 20 "milliSeconds".!
- ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]) ]
- ensure:
- [ self refreshWorld.
- self color: originalColor ]!

Item was changed:
----- Method: SystemWindow>>update: (in category 'label') -----
update: aSymbol
aSymbol = #relabel
ifTrue: [^ model ifNotNil: [ self setLabel: model labelString ] ].
aSymbol = #close
+ ifTrue: [self delete].
+ aSymbol = #flash
+ ifTrue: [self flash].!
- ifTrue: [self delete]!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220127/b4494eac/attachment.html>

More information about the Squeak-dev mailing list