Please enable JavaScript to view this site.

A-Shell 6.5 Development Notes

XTREE enhancement: new PopupMenu command $SORT triggers an internal multi-level sort. Syntax:

$SORT:#:#{:#}

where each # is replaced by a column number. Precede the column number with a minus sign to make the sort order descending rather than ascending. At least one column must be specified; the second and third column numbers are optional. For example:

PopupMenu=Sort by State/City/Population,$SORT:5:4:-7~~

This would sort by column 5 (State,ascending), 4 (City,ascending), and then 7 (Population,descending).

The motivation for this option is just to make multi-level sorting easier and quicker for the operator, who would otherwise have to use Ctrl-Click on the columns in the reverse order, possibly clicking one or move of the columns multiple times to get the right order. And compared to just exiting and re-entering with the application specifying the sort order in the XTRCTL fields, this is much faster since it doesn't require leaving the tree.

Note that since the comma and semicolon characters are delimiters in the general PopupMenu syntax, you must not include them in the description. which might otherwise be tempting when listing the columns involved in the sort.