July 26, 2017
6:28 p.m.
Hey, I have a simple dictionary with class as the key and a number as value. In the inspector I try to sort it by the value. But it is doing an alphabetical sort and not numerical? I can change Dictionary>>#gtInspectorItemsIn: to pass a sortedBy: block when adding the value column but is "<" a general usable protocol? How would one specialize the sort depending on the data in the dictionary? Any ideas how to get numbers sorted intuitively without adding too much magic (trying to convert the string representation back to a number, custom GTTablePresentation, using "a value < b value" and use the string representation if that fails..)? cheers holger