PromptStatus
elements.PromptStatus (Abstract)
Abstract type for tracking the completion status of prompt dialogs.
PromptStatus provides a type-safe way to represent and check the state of prompt dialogs, including whether they are pending, completed, or canceled. It uses integer values internally with specific meanings:
- Negative values indicate special states (-1 = pending, -2 = canceled)
- Zero or positive values indicate completion with the chosen button index
The type provides implicit conversion to Bool, returning true when the prompt is complete (not pending).
Example usage:
var status:PromptStatus = -1; // Pending
if (status.complete) {
// Handle completion
}
if (status.canceled) {
// Handle cancellation
}
if (status) {
// Equivalent to status.complete
}
See: PendingDialog
Type Conversions
From:
[Int](/api-docs/clay-native/Int/)
To:
[Int](/api-docs/clay-native/Int/)