[squeak-dev] The Inbox: Morphic-kfr.731.mcz

Eliot Miranda eliot.miranda at gmail.com
Tue Jul 8 12:38:59 UTC 2014


Hi Chris,

On Jul 7, 2014, at 5:42 PM, Chris Muller <asqueaker at gmail.com> wrote:

> 
> I think forcing a double-blink for every possible use-case for #flash won't work.  Plus, an arbitrary 50ms delay will not let anyone be happy because some want absolutely no blockage while others wanted more than 50ms..
> 
> #flashStyle or #flashIntensity preference would be one way to address those differences.


It's a hack.  It complicates without adding anything.  Perceptually, a flash needs to last something like a 1/10th if a second to be easily visible.  Clearly a simple reverse won't work.  Bert has explained that using alarms, rather than delays, can implement flash without blocking.  Surely we can do the right thing here and implement flash having a consistent duration and not blocking?


> On Thu, Jul 3, 2014 at 7:29 AM, <commits at source.squeak.org> wrote:
>> A new version of Morphic was added to project The Inbox:
>> http://source.squeak.org/inbox/Morphic-kfr.731.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Morphic-kfr.731
>> Author: kfr
>> Time: 3 July 2014, 2:28:57.179 pm
>> UUID: 05ec5d84-8101-f94b-847f-d4e467ddeead
>> Ancestors: Morphic-kfr.730
>> 
>> Small fix for keyboard focus.
>> Double flash for morph implementation
>> 
>> =============== Diff against Morphic-cmm.729 ===============
>> 
>> Item was changed:
>>   ----- Method: AlternatePluggableListMorphOfMany>>mouseUp: (in category 'event handling') -----
>>   mouseUp: event
>> +
>> +       event hand newKeyboardFocus: self.
>> +       hasFocus := true.
>> +       ^self!
>> -       "Not needed.  Overridden to do nothing."!
>> 
>> Item was changed:
>>   ----- Method: Morph>>flash (in category 'macpal') -----
>>   flash
>> +       "Flash me"
>>         | originalColor |
>>         originalColor := self color.
>> +       1
>> +               to: 2
>> +               do: [:i | [self
>> +                               color: (originalColor
>> +                                               ifNil: [Color black]
>> +                                               ifNotNil: [((originalColor alpha: 1)
>> +                                                               adjustSaturation: 0.8
>> +                                                               brightness: 0) negated])]
>> +                               ensure: [self world
>> +                                               ifNotNil: [:w | w displayWorldSafely].
>> +                                       (Delay forMilliseconds: 50) wait.
>> +                                       [self color: originalColor]
>> +                                               ensure: [self world
>> +                                                               ifNotNil: [:w | w displayWorldSafely].
>> +                                                       (Delay forMilliseconds: 50) wait]]]!
>> -       [ self color:
>> -               (originalColor
>> -                       ifNil: [ Color black ]
>> -                       ifNotNil: [( (originalColor alpha: 1) adjustSaturation: 0.8 brightness: 0) negated ]) ]
>> -               ensure:
>> -                       [ self world ifNotNil: [ : w | w displayWorldSafely ].
>> -                       self color: originalColor ]!
>> 
>> Item was changed:
>>   ----- Method: TextMorphForEditView>>mouseDown: (in category 'event handling') -----
>>   mouseDown: event
>> 
>>         event yellowButtonPressed ifTrue: [
>> +               (self editor yellowButtonDown: event) ifTrue:[^self].
>> -               (editor yellowButtonDown: event) ifTrue:[^self].
>>                 ^ editView yellowButtonActivity: event shiftPressed].
>>         ^ super mouseDown: event
>>   !
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140708/7e9c4753/attachment.htm


More information about the Squeak-dev mailing list