Programming Guide |
Sorts the object's occurrences
int sm_obj_sort(int obj_id, int direction);
obj_id
- An integer handle that identifies the object to be sorted. For widgets, it can be obtained from sm_prop_id.
direction
- The direction for the sort:
SORT_ASCENDING
for an ascending sort orSORT_DESCENDING
for a descending sort.
- 0: Success. Target has been sorted without error.
PR_E_OBJECT
: Cannot find target object.
PR_E_NO_SORT_FUNC
: Sort order function not specified.
PR_E_SORT_FUNC
: Sort order function not found, or error reported by sort order function.
PR_E_DATA_FORMAT
: Incompatible data format for sort order.
sm_obj_sort
sorts the object's occurrences according to the rules specified in the object's Sort Order property. If the Sort Order is set toPV_CUSTOM
, then the function named in the Sort Order Function property is used.If the specified object is a member of a synchronized scrolling group, the other arrays in the group will be re-ordered to retain row integrity for the group.