The Trunk: Morphic-fbs.659.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-fbs.659.mcz

commits-2
Frank Shearar uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-fbs.659.mcz

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

Name: Morphic-fbs.659
Author: fbs
Time: 15 June 2013, 3:25:34.535 pm
UUID: eebc0854-52d0-4ebc-8b78-85597450927e
Ancestors: Morphic-eem.658, Morphic-kb.657

Balázs Kósi's un-futuring of PluggableListMorph's preselection:

Do not defer the model selection action in PluggableListMorph, instead step the World on cycle so the pre selection highlight can take effect, but avoid the timing issue, which broke MorphicToolBuilderTest >> #testSetListIndex.

=============== Diff against Morphic-eem.658 ===============

Item was changed:
  ----- Method: PluggableListMorph>>changeModelSelection: (in category 'model access') -----
  changeModelSelection: anInteger
+ " Change the model's selected item index to be anInteger. Enable the pre selection highlight. Step the World forward to let the pre selection highlight take effect. "
- " Change the model's selected item index to be anInteger. Enable the pre selection highlight. Deferring the model's selection action, to let the pre selection highlight take effect. "
 
  self rowAboutToBecomeSelected: (self uiIndexFor: anInteger).
+ World doOneCycle.
  setIndexSelector ifNotNil: [
+ model perform: setIndexSelector with: anInteger ].!
- ([ model perform: setIndexSelector with: anInteger ] future: 1) value ].!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-fbs.659.mcz

Frank Shearar-3
On 15 June 2013 15:25,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-fbs.659.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-fbs.659
> Author: fbs
> Time: 15 June 2013, 3:25:34.535 pm
> UUID: eebc0854-52d0-4ebc-8b78-85597450927e
> Ancestors: Morphic-eem.658, Morphic-kb.657
>
> Balázs Kósi's un-futuring of PluggableListMorph's preselection:
>
> Do not defer the model selection action in PluggableListMorph, instead step the World on cycle so the pre selection highlight can take effect, but avoid the timing issue, which broke MorphicToolBuilderTest >> #testSetListIndex.
>
> =============== Diff against Morphic-eem.658 ===============

This work's definitely better now that the future's gone. (Where
"better" means "all the tests pass". I'm happy to see futures being
used (especially since Promises are now composable) as long as someone
rewrites those tests that break.)

Open up something with a long list, like a Browser. Select the top
system category, and then hold the down arrow for a while. You'll see
the preselection blue move down the list, as expected. And then when
you lift your finger off the down arrow, you'll see this weird
going-back-up behaviour, and you'll end up actually selecting an item
far above where you thought you were. Presumably that's because of the
high number of keyboard events and the World doOneCycle or something.

frank