<p>I am using a Flex dataGrid, and need to sort some of my columns numerically.<br>
Looking at the sortCompareFunction, it seems like i need to create a different function for each column that i want to sort, because my sort function has to know what field it is sorting on.  </p>

<p>Is there any way that I can pass the field to be sorted on into the function? so that I only need one numeric sorting function.</p>

I did it using this function:
```
function fieldNumericSorter(field:String):Function {
    return function (obj1:Object, obj2:Object):int {
        return sign( int(obj1[field]) - int(obj2[field]) );
    }
}
```
and for each column that needed sorting set
```
colToBeSorted.sortCompareFunction = fieldNumericSorter("fieldname");
```