The method #difference: (line 7) return an empty collection in the example above. The line 7 should check if the new selection is different. In the example they are, but the command differnce: return an empty collection.
I suggest this solution, where we check the difference of new and old selection and the difference of old and new selection after. \ = difference:, | = union:.
Hello,
Description
I encounter a bug while using
SpTreeTablePresenter
where the selection was not the same on the model and visually.Examples:
Object
-> The transcript show: {Object}shift
Stream
-> The transcript show: {Stream. Object. Exception. Path}shift
Exception
-> The trascript should show {Exception}, but it doesn't.Possible fix
I think the bug come from the method:
#basicSelectionChanged:
in the class:SpMorphicTreeTableAdapter
The method #difference: (line 7) return an empty collection in the example above. The line 7 should check if the new selection is different. In the example they are, but the command differnce: return an empty collection.
I suggest this solution, where we check the difference of new and old selection and the difference of old and new selection after.
\
=difference:
,|
=union:
.The method
difference
is also present in otherSPEC
class. Maybe this bug is present in them too:SpMorphicTableAdapter
>>#selectionChanged:
SpAbstractMorphicListAdapter
>>#selectionChanged:
SpMorphicComponentListAdapter
>>#selectionChanged:
SkSpMorphicSeekerTableAdapter
>>#selectionChanged:
Other
Pharo 11.0.0 Build information: Pharo-11.0.0+build.700.sha.53659ed8c20ddb4b644a58135325ff84be4e063e (64 Bit)
I used the Spec package directly present in Pharo image.