EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificaciones Pagina 74

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 304
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 73
CHAPTER 4: User-Interface Tools Types of controls 74
Notice that the columns have headers, and the label in the second column of the second row has both text
and an image.
Prompts and alerts
Static functions on the Window class are globally available to display short messages in standard dialogs.
The host application controls the appearance of these simple dialogs, so they are consistent with other
alert and message boxes displayed by the application. You can often use these standard dialogs for simple
interactions with your users, rather than designing special-purpose dialogs of your own.
Use the static functions
alert, confirm, and prompt on the Window class to invoke these dialogs with your
own messages. You do not need to create a
Window object to call these functions.
Modal dialogs
A modal dialog is initially invisible. Your script invokes it using the show method, which does not return
until the dialog has been dismissed. The user can dismiss it by using a platform-specific window gesture,
or by using one of the dialog controls that you supply, typically an OK or Cancel button. The
onClick
method of such a button must call the
close or hide method to close the dialog. The close method
allows you to pass a value to be returned by the
show method.
For an example of how to define such buttons and their behavior, see
Defining behavior with event
callbacks and listeners” on page 80.
Creating and using modal dialogs
A dialog typically contains some controls that the user must interact with, to make selections or enter
values that your script will use. In some cases, the result of the user action is stored in the object, and you
can retrieve it after the dialog has been dismissed. For example, if the user changes the state of a
Checkbox
or
RadioButton, the new state is found in the control’s value property.
However, if you need to respond to a user action while the dialog is still active, you must assign the control
a callback function for the interaction event, either
onClick or onChange. The callback function is the
value of the
onClick or onChange property of the control.
For example, if you need to validate a value that the user enters in a
edittext control, you can do so in an
onChange callback handler function for that control. The callback can perform the validation, and perhaps
display an alert to inform the user of errors.
Sometimes, a modal dialog presents choices to the user that must be correct before your script allows the
dialog to be dismissed. If your script needs to validate the state of a dialog after the user clicks OK, you can
define an
onClose event handler for the dialog. This callback function is invoked whenever a window is
Vista de pagina 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 303 304

Comentarios a estos manuales

Sin comentarios