The Trunk: Tools-mt.910.mcz

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

The Trunk: Tools-mt.910.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.910.mcz

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

Name: Tools-mt.910
Author: mt
Time: 29 October 2019, 12:39:01.998604 pm
UUID: 981eb775-0636-d744-b7bf-8f13d72351b1
Ancestors: Tools-mt.909

Fixes (a regression in) list selection in change-list tool. It is not the job of the model to implement toggle in a multi-selection setting. The model only has to react to index selector and selection-list selectors.

=============== Diff against Tools-mt.909 ===============

Item was changed:
  ----- Method: ChangeList>>listSelectionAt:put: (in category 'viewing access') -----
  listSelectionAt: index put: value
 
+ listSelections at: index put: value.
+ self changed: #listIndex.!
- ^ listSelections at: index put: value!

Item was changed:
  ----- Method: ChangeList>>toggleListIndex: (in category 'viewing access') -----
  toggleListIndex: newListIndex
 
+ listIndex = newListIndex ifTrue: [^ self].
- listIndex ~= 0 ifTrue: [listSelections at: listIndex put: false].
- newListIndex ~= 0 ifTrue: [listSelections at: newListIndex put: true].
  listIndex := newListIndex.
+
  self changed: #listIndex.
  self contentsChanged!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.910.mcz

Levente Uzonyi
On Tue, 29 Oct 2019, [hidden email] wrote:

> Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-mt.910.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.910
> Author: mt
> Time: 29 October 2019, 12:39:01.998604 pm
> UUID: 981eb775-0636-d744-b7bf-8f13d72351b1
> Ancestors: Tools-mt.909
>
> Fixes (a regression in) list selection in change-list tool. It is not the job of the model to implement toggle in a multi-selection setting. The model only has to react to index selector and selection-list selectors.
>
> =============== Diff against Tools-mt.909 ===============
>
> Item was changed:
>  ----- Method: ChangeList>>listSelectionAt:put: (in category 'viewing access') -----
>  listSelectionAt: index put: value
>
> + listSelections at: index put: value.
> + self changed: #listIndex.!
> - ^ listSelections at: index put: value!

This breaks the convention that *at:put: returns the stored value.

Levente

>
> Item was changed:
>  ----- Method: ChangeList>>toggleListIndex: (in category 'viewing access') -----
>  toggleListIndex: newListIndex
>
> + listIndex = newListIndex ifTrue: [^ self].
> - listIndex ~= 0 ifTrue: [listSelections at: listIndex put: false].
> - newListIndex ~= 0 ifTrue: [listSelections at: newListIndex put: true].
>   listIndex := newListIndex.
> +
>   self changed: #listIndex.
>   self contentsChanged!

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.910.mcz

marcel.taeumel
Fixed in Tools-mt.911

Best,
Marcel

Am 29.10.2019 16:00:52 schrieb Levente Uzonyi <[hidden email]>:

On Tue, 29 Oct 2019, [hidden email] wrote:

> Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-mt.910.mcz
>
> ==================== Summary ====================
>
> Name: Tools-mt.910
> Author: mt
> Time: 29 October 2019, 12:39:01.998604 pm
> UUID: 981eb775-0636-d744-b7bf-8f13d72351b1
> Ancestors: Tools-mt.909
>
> Fixes (a regression in) list selection in change-list tool. It is not the job of the model to implement toggle in a multi-selection setting. The model only has to react to index selector and selection-list selectors.
>
> =============== Diff against Tools-mt.909 ===============
>
> Item was changed:
> ----- Method: ChangeList>>listSelectionAt:put: (in category 'viewing access') -----
> listSelectionAt: index put: value
>
> + listSelections at: index put: value.
> + self changed: #listIndex.!
> - ^ listSelections at: index put: value!

This breaks the convention that *at:put: returns the stored value.

Levente

>
> Item was changed:
> ----- Method: ChangeList>>toggleListIndex: (in category 'viewing access') -----
> toggleListIndex: newListIndex
>
> + listIndex = newListIndex ifTrue: [^ self].
> - listIndex ~= 0 ifTrue: [listSelections at: listIndex put: false].
> - newListIndex ~= 0 ifTrue: [listSelections at: newListIndex put: true].
> listIndex := newListIndex.
> +
> self changed: #listIndex.
> self contentsChanged!