mobilePick | |||||||||||||||||||||||||
Type | command | ||||||||||||||||||||||||
Dictionary | LCS | ||||||||||||||||||||||||
Library | LiveCode Script | ||||||||||||||||||||||||
Syntax |
| ||||||||||||||||||||||||
Synonyms | iphonepick | ||||||||||||||||||||||||
Summary | Presents the user with a native list picker dialog. | ||||||||||||||||||||||||
Introduced | 4.5.3 | ||||||||||||||||||||||||
OS | ios, android | ||||||||||||||||||||||||
Platforms | mobile | ||||||||||||||||||||||||
Parameters |
| ||||||||||||||||||||||||
Example |
| ||||||||||||||||||||||||
Values |
| ||||||||||||||||||||||||
Related | Command: mobilePickDate, mobilePickPhoto | ||||||||||||||||||||||||
Description | Use the mobilePick command to display a native list picker that allows the user to select from one or multiple (iOS Only) lists of options. A standard action-sheet pops up on the iPhone, containing the standard picker-wheel user interface element. On the iPad, a standard pop-over is presented to display a single column of data or a picker-wheel to display multiple columns of data. On Android, the default pop-up is presented to display a single option picker. iOS BehaviorThere are three modes of operation for mobilePick, depending on the values for initialIndex. If all initialIndex values are non-zero, the operation acts as a way to change an existing selection. The items specified by the initial index are selected (checked or hilited on iPad if a single column is specified). If all initialIndex values are zero, the operation acts as a way to select from lists of options with no items selected. The user is able to cancel the operation by clicking 'Cancel' (iPhone) or touching outside of the popover (iPad). If the operation is canceled, 0 is returned; otherwise the indexes to the selected items are returned. Any picker-wheels that remain untouched by the user, in a group of picker-wheels are set to 1, indicating that the defaults have been accepted. If some initialIndex values are zero and others are non-zero, the operation acts in the same way as if all values are non-zero on the iPhone. Once the user selects the 'Done' button, all values that were set to 0 and were not updated by the users are automatically set to 1. On the iPad values that were initially set to 0 and were not altered by the user are automatically set to 1 if at least one picker-wheel was altered. If the user does not alter the state of any picker-wheel on the iPad, then the initial settings are returned without alteration. This includes any zeros that were initially set. If the 'Cancel' button is displayed, then any selection made by the user can be canceled, returning 0. If the 'Done' button is displayed, then all 0's are returned if no default values were specified and the user did not make any selections on the pickers. Android Behavior
|