#cp.dialog
A collection of handy Dialog tools for CommandPost.
Where possible, hs.dialog
should be used instead of cp.dialog
- however, there are still some instances where cp.dialog
is preferred (i.e. if you want a dialog box to appear as if it's been generated by Final Cut Pro).
#API Overview
Functions - API calls offered directly by the extension
- displayAlertMessage
- displayChooseFile
- displayChooseFolder
- displayChooseFromList
- displayErrorMessage
- displayMessage
- displayNotification
- displaySmallNumberTextBoxMessage
- displayTextBoxMessage
- displayYesNoQuestion
#API Documentation
#Functions
Signature | cp.dialog.displayAlertMessage(message) -> none |
Type | Function |
Description | Display an Alert Dialog (with stop icon). |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 238 |
Signature | cp.dialog.displayChooseFile(whatMessage, fileType[, defaultLocation]) -> boolean or string |
Type | Function |
Description | Display a Choose File Dialog Box. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 165 |
Signature | cp.dialog.displayChooseFolder(whatMessage[, defaultLocation]) -> boolean or string |
Type | Function |
Description | Display a Choose Folder Dialog Box. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 207 |
Signature | cp.dialog.displayChooseFromList(dialogPrompt, listOptions, defaultItems) -> table |
Type | Function |
Description | Displays a list that the user can select items from. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 367 |
Signature | cp.dialog.displayErrorMessage(whatError) -> none |
Type | Function |
Description | Display an Error Message Dialog, given the user the option to submit feedback. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 262 |
Signature | cp.dialog.displayMessage(whatMessage, optionalButtons) -> object |
Type | Function |
Description | Display an Error Message Dialog, given the user the option to submit feedback. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 297 |
Signature | cp.dialog.displayNotification(whatMessage) -> none |
Type | Function |
Description | Display's an alert on the screen. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 398 |
Signature | cp.dialog.displaySmallNumberTextBoxMessage(whatMessage, whatErrorMessage, defaultAnswer) -> boolean or string |
Type | Function |
Description | Display a dialog box prompting the user for a number input. It accepts only entries that coerce directly to class integer. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 78 |
Signature | cp.dialog.displayTextBoxMessage(whatMessage, whatErrorMessage, defaultAnswer, validationFn) -> boolean or string |
Type | Function |
Description | Display a dialog box prompting the user for a text input. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 119 |
Signature | cp.dialog.displayYesNoQuestion(message, informativeText) -> boolean |
Type | Function |
Description | Displays a "Yes" or "No" question. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/dialog/init.lua line 336 |