Hi Marcel,<br>
<br>
what issues would you be thinking of? There might be visual glitches in a few senders that relied on a short delay by #flash, but I would consider the current implementation a visual glitch anyway. ;-) Other than that, there is the hypothetical possibility that a sender would invalidate itself right after #flash, this would hurt indeed. I am open to introduce my change in a new selector #flushAsync if you think this is an issue.<br>
<br>
Regarding the future send: Ah, I just learned that this will still make sure that the promise is only resolved on the UI process. Sounds like a nice application example for promises then. :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
PS: What do you think, should we also override Object >> #flash on Model to do "self changed: #flash"? :-)<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-01-28T08:36:14+01:00, marcel.taeumel@hpi.de wrote:<br>
<br>
> Hi Christoph --<br>
> <br>
> I am aware of the current drawbacks of #flash. If you want to change it's behavior, please elaborate on the possible issues first. If the worst that might happen is a single debugger, then we are fine.<br>
> <br>
> Still, instead of <br>
> <br>
> self addAlarm: #color: with: originalColor after: 20 "milliSeconds"<br>
> <br>
> <br>
> I would write:<br>
> <br>
> (self future: 20 "milliseconds") color: originalColor.<br>
> <br>
> But any way is okay, I suppose.<br>
> <br>
> Best,<br>
> <br>
> Marcel<br>
> Am 27.01.2022 17:38:57 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:<br>
> Hi Marcel,<br>
> <br>
> #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? :-)<br>
> <br>
> Best,<br>
> Christoph<br>
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
> Gesendet: Donnerstag, 27. Januar 2022 11:09:28<br>
> An: squeak-dev<br>
> Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1859.mcz<br>
>  <br>
> Hi Christoph --<br>
> <br>
> -1<br>
> <br>
> Please don't make a synchronous call async like this. Add a busyWait if you like, but no Morphic alarm.<br>
> <br>
> Best,<br>
> Marcel<br>
> Am 26.01.2022 21:50:31 schrieb commits at source.squeak.org <commits at source.squeak.org>:<br>
> A new version of Morphic was added to project The Inbox:<br>
> http://source.squeak.org/inbox/Morphic-ct.1859.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Morphic-ct.1859<br>
> Author: ct<br>
> Time: 26 January 2022, 9:50:11.019407 pm<br>
> UUID: 83e57c24-b685-2a4a-ac5a-ad0df51bba9d<br>
> Ancestors: Morphic-mt.1858<br>
> <br>
> Proposal: Makes #flash more visible by<br>
> 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)<br>
> b) having system windows participate in a flash requested by a model too.<br>
> <br>
> =============== Diff against Morphic-mt.1858 ===============<br>
> <br>
> Item was changed:<br>
> ----- Method: Morph>>flash (in category 'macpal') -----<br>
> flash<br>
> | originalColor |<br>
> originalColor := self color.<br>
> + self color:<br>
> - [ self color:<br>
> (originalColor<br>
> ifNil: [ Color black ]<br>
> + ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]).<br>
> + self refreshWorld.<br>
> + self addAlarm: #color: with: originalColor after: 20 "milliSeconds".!<br>
> - ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]) ]<br>
> - ensure:<br>
> - [ self refreshWorld.<br>
> - self color: originalColor ]!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemWindow>>update: (in category 'label') -----<br>
> update: aSymbol<br>
> aSymbol = #relabel<br>
> ifTrue: [^ model ifNotNil: [ self setLabel: model labelString ] ].<br>
> aSymbol = #close<br>
> + ifTrue: [self delete].<br>
> + aSymbol = #flash<br>
> + ifTrue: [self flash].!<br>
> - ifTrue: [self delete]!<br>
> <br>
> <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220128/d97198d7/attachment.html><br>
> <br>