#4295 closed defect (fixed)
new "checkbox" annotation is ignored if combined with any other choices annotation
| Reported by: | Dietmar Winkler | Owned by: | Adeel Asghar |
|---|---|---|---|
| Priority: | high | Milestone: | 1.12.0 |
| Component: | OMEdit | Version: | |
| Keywords: | Cc: |
Description
The implementation of enabling the checkbox=true feature in OMEdit does not work when also any other annotation is present as part of choices().
So this works:
model test parameter Boolean foo=true "Activate foo" annotation (Dialog(group="bar"), choices(checkbox=true)); end test;
and this does not (but should really).
model test parameter Boolean foo=true "Activate foo" annotation (Dialog(group="bar"), choices(checkbox=true,foo=true)); end test;
This is important for example when creating a tool independent library. For example in order to have this feature work in Dymola(which up to at least version 2017FD01 does not support the standard checkbox) and OMEdit:
model test parameter Boolean foo=true "Activate foo" annotation (Dialog(group="bar"), choices(checkbox=true,__Dymola_checkBox=true)); end test;
Change History (3)
comment:2 by , 9 years ago
Turns out (DS support came back to me) that checkbox is a typo in the specifications.
https://trac.modelica.org/Modelica/ticket/1770
This means you only need to fix the spelling and can forget about the warnings. Well maybe is __Dymola_checkBox is used instead of checkBox.
comment:3 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fixed in 2d2b491/OMCompiler & a2c3963/OMEdit.
__Dymola_checkBox is also considered now.

As an addition to make live for users easier and to improve support for older Dymola style libraries it would be nice if OMEdit would also support the following Dymola annoation with some warning messages:
__Dymola_checkBox=truepresent: Accept but display "Warning: Non-standard annotation__Dymola_checkBoxused in xxx, use standard-compliant annotationcheckboxinstead."checkBox=truepresent: Accept but display "Warning: Non-standard annotationcheckBoxused in xxx, use standard-compliant annotationcheckboxinstead."__Dymola_checkBox=trueandcheckbox=true: Accept but no need to display anything since the presence of boths seems to indicate this was done on purpose for backward compatibility.