Hi guys, Currently I have some sorting blocks which support "nil" elements (making them go first). So here is a general nil tolerant sort block based on one field:
defaultNilTolerantSortBlock: aBlock [ :a :b | a ifNil: [ true ] ifNotNil: [ b ifNil: [ false ] ifNotNil: [ aBlock value: a value: b ] ] ] Now...imagine that now I want to first on element1, then over element2...and both could be nil...in which case should go "first". Anyway...does someone ever built some tool where you pass an ordered set of closures and it builds the super ugly resulting sort block? Cheers, -- Mariano http://marianopeck.wordpress.com