reference
labkit.app.dialog.Choice
Represent a typed dialog choice or cancellation.
Syntax
result = labkit.app.dialog.Choice(value)
result = labkit.app.dialog.Choice(value, Cancelled=cancelled)Description
Choice separates cancellation from the chosen value so an empty string, zero, false, or empty App value is not interpreted as cancel.
Inputs
value- App-facing value returned by the dialog.
Name-Value Arguments
Cancelled- Logical scalar. Default: false.
Outputs
result- Immutable labkit.app.dialog.Choice value.
Errors
labkit:app:contract:UnknownArgument- An option is unknown, duplicated, or unpaired.
labkit:app:contract:InvalidValue- Cancelled is not logical scalar.
Example
result = labkit.app.dialog.Choice("", Cancelled=false);
assert(~result.Cancelled)Related APIs
labkit.app.CallbackContext— Provide declared App-neutral runtime capabilities.
Source
This page is generated from the MATLAB help text in +labkit/+app/+dialog/Choice.m.