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

David T. Lewis lewis at mail.msen.com
Tue Jul 8 03:09:02 UTC 2014


On Mon, Jul 07, 2014 at 07:42:28PM -0500, Chris Muller 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..

OK, I'll bite. What exactly was wrong with the original implementation of
Morph>>flash dated 10/10/1999 by Scott Wallace? It seems to do a very nice
job of flashing the morph, and it plays nicely with the "Reuse Windows" preference.
What's not to like?

The cmm 8/22/2013 version does not flash nicely, and the kfr 7/3/2014 version
uses delays, which may be problematic. The sw 10/10/1999 version works well and
does not have either problem. How about just using the one the works?

> 
> #flashStyle or #flashIntensity preference would be one way to address those
> differences.
> 

We have enough obscure preferences that have entered the system for reasons
that nobody can even remember. Let's not add another.

Dave


> 
> 
> 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
> >   !
> >
> >
> >

> 



More information about the Squeak-dev mailing list