Discuz! Board's Archiver

Rabbit posted on 2011-7-22 16:54

sort array

In the Papaya sdk there is a functionality to sort an array of basic data types using the arrayName.sort() function. I have an array of objects and I need to sort based on one of the fields of the objects. I've tried arrayName.sort( fieldName ) or the arrayName.sortOn( fieldName ) function available in as3. Neither one works. I was wondering if there was any way, besides writing a custom function, that I could sort my array of objects.

赵韬 posted on 2011-7-22 16:55

right, we don't support arrayName.sort( fieldName ). We cannot refer to a field using a String of the field name.

We will look into it
Page: [1]

Powered by Discuz! X1.5 Archiver   © 2001-2010 Comsenz Inc.