Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 4 - List Manager / List Manager Reference
List Manager Routines / Determining or Changing the Selection


LGetSelect

You can use the LGetSelect function to get information about which cells are selected.

FUNCTION LGetSelect (next: Boolean; VAR theCell: Cell; 
                     lHandle: ListHandle): Boolean;
next
A Boolean value that indicates whether LGetSelect should check only the cell specified by the parameter theCell (next = FALSE), or whether it should try to find the next selected cell (next = TRUE).
theCell
On input, specifies the first cell whose selection status should be checked. If next is TRUE, then this parameter on output indicates the next selected cell greater than or equal to the cell specified on input. Otherwise, this parameter remains unchanged.
lHandle
The list in which the selection is being checked.
DESCRIPTION
The behavior of the LGetSelect function depends on the value specified in the next parameter.

If next is TRUE, then LGetSelect searches the list for the first selected cell beginning at the cell specified by theCell. (In particular, LGetSelect first checks cells in row theCell.v, and then cells in the next row, and so on.) If it finds a selected cell, LGetSelect returns TRUE and sets the parameter theCell to the coordinates of the selected cell. If it does not find a selected cell, LGetSelect returns FALSE.

If next is FALSE, then LGetSelect checks only the cell specified by the parameter theCell. If the cell is selected, LGetSelect returns TRUE. Otherwise, it returns FALSE.

SPECIAL CONSIDERATIONS
You should not call the LGetSelect function from within an interrupt, such as in a completion routine or VBL task.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the LGetSelect function are
Trap macroSelector
_Pack0$003C

SEE ALSO
For examples that determine which items are selected in a list, see "Working With List Selections" beginning on page 4-25.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996