Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

on-sort-predicate

Arguments: standard-object

Returns or sets with setf the value of the on-sort-predicate event-handler property of a dialog-item. The value may be a function name or function object, which determines the ordering of items in a list-view-column, grid-column, or outline control. The value may also be nil to indicate that the control is not sortable (using its built-in sorting functionality). When the value is a function, the function should accept two arguments and return true when the first value should precede the second (as with the predicate argument to cl:sort).

For a list-view-column, where the sorted values are always strings, the default value is string-lessp (for a case-insensitive alphanumeric sort). For a grid-column or outline, the default is nil because the sortable values are arbitrary Lisp objects, and so there is no possible general default predicate that would not cons strings in many cases. For these objects, a custom on-sort-predicate must be supplied in order to use the built-in sorting behavior.

The on-sort-predicate function (if any) is used when calling sort-grid on a grid-widget, when calling add-outline-item-value (without an explicit position argument) or replace-outline-item-value on an outline control, when calling list-view-sort, (setf sort-column) or (setf sort-reverse) on a list-view control (which happens internally when clicking a list-view column header).

See cg-events.htm for information about event handling in Common Graphics.


Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.2. This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version