Skip to content

Commit

Permalink
Specify how to handle invalid choices, modelica#3311.
Browse files Browse the repository at this point in the history
I understand that it is different from the text in modelica#3311 - but thinking about possible implementations I'm not sure which variant is best.
  • Loading branch information
HansOlsson committed Sep 12, 2023
1 parent 07bdf70 commit debb219
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chapters/inheritance.tex
Expand Up @@ -1069,6 +1069,10 @@ \subsection{Annotations for Redeclaration and Modification}\label{annotation-cho

This is a hint for users of the model, and can also be used by the user interface to suggest reasonable redeclaration, where the string comments on the choice declaration can be used as textual explanations of the choices.
The annotation is not restricted to replaceable elements but can also be applied to non-replaceable elements, enumeration types, and simple variables.
Some choices may be invalid in the current context, e.g., a value might violate the min-attribute.
\begin{nonnormative}
Tools may avoid including such choices, mark them as invalid, or detect such violations later.
\end{nonnormative}
For a \lstinline!Boolean! variable, a \lstinline!choices! annotation may contain the definition \lstinline!checkBox = true!, meaning to display a checkbox to input the values \lstinline!false! or \lstinline!true! in the graphical user interface.

The annotation \lstinline!choicesAllMatching = true!\annotationindex{choicesAllMatching} on the following kinds of elements indicates that tools should automatically construct a menu with appropriate choices.
Expand Down

0 comments on commit debb219

Please sign in to comment.