Bixby Developer Center

References

with-strategy

optional

Choose a specific instantiation strategy for an input to utilize.

Specify a strategy using the match-mode child key with one of two modes:

  • match-mode (MostSpecific): Use only the instantiation-strategy with the most specific match pattern. If this strategy fails to return a value, the user will be prompted.
  • match-mode (All): All available instantiation strategies will be used.

Example

input (notSupported) {
type (Boolean)
default-init {
if (true) {
with-strategy {
match-mode (MostSpecific)
}
}
}
min (Optional) max (One)
validate {
if (exists(notSupported) && notSupported) {
halt {
dialog ("Nope")
}
}
}
}

If you are using runtime version 3 or later, or if you specify the use-most-specific-instantiation-strategy runtime flag, then match-mode (MostSpecific) is the default.

If you are using an older runtime version, with-strategy should behave as follows:

  • If a default-init is declared using with-strategy but no match-mode is specified, the default is MostSpecific.
  • If a Required input with no default-init specified returns no value, it will behave as though it had a default-init with a strategy of match-mode (All).

Child Keys

match-mode
optional
Specify the matching mode for choosing an instantiation strategy