Report Sorter
Keith Hodges
keith_hodges at yahoo.co.uk
Tue Apr 28 00:55:03 MEST 2009
Hello Lukas,
Is the report column sorter supposed to be able to handle nil values?
This code (below) looks like it is trying to be tolerant But what if
one= 'string'.
two = nil.
thanks in advance
Keith
====
sort: aFirstObject and: aSecondObject
| one two |
one := self valueFor: aFirstObject.
two := self valueFor: aSecondObject.
(one respondsTo: #<=) ifFalse: [
one := self formatter value: one.
two := self formatter value: two ].
^ one <= two
More information about the smallwiki
mailing list