From 18d8916ac7985bbdfe88e4122d76ef1173037a19 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Fri, 28 Apr 2023 12:16:10 +0200 Subject: [PATCH] The collection should have the columns sortable, and not use a sortFunction. When it is sortable, it uses the value shown in the table. --- src/NewTools-Inspector-Extensions/Bag.extension.st | 2 ++ src/NewTools-Inspector-Extensions/Collection.extension.st | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NewTools-Inspector-Extensions/Bag.extension.st b/src/NewTools-Inspector-Extensions/Bag.extension.st index a4b2596c5..d8734ee24 100644 --- a/src/NewTools-Inspector-Extensions/Bag.extension.st +++ b/src/NewTools-Inspector-Extensions/Bag.extension.st @@ -9,10 +9,12 @@ Bag >> inspectionItems: aBuilder [ title: 'Items'; evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each key ]; beNotExpandable; + beSortable; yourself); addColumn: (SpStringTableColumn new title: 'Occurences'; evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: (self occurrencesOf: each key) ]; + beSortable; yourself); items: contents associations; yourself diff --git a/src/NewTools-Inspector-Extensions/Collection.extension.st b/src/NewTools-Inspector-Extensions/Collection.extension.st index 813054ab1..ff7655c08 100644 --- a/src/NewTools-Inspector-Extensions/Collection.extension.st +++ b/src/NewTools-Inspector-Extensions/Collection.extension.st @@ -13,7 +13,7 @@ Collection >> inspectionItems: aBuilder [ addColumn: (SpStringTableColumn new title: 'Value'; evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each ]; - sortFunction: #printString ascending; + beSortable; yourself); items: self asOrderedCollection; yourself