Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting each and final prefixes via the API #5489

Closed
OpenModelica-TracImporter opened this issue Jun 27, 2020 · 3 comments
Closed

Allow setting each and final prefixes via the API #5489

OpenModelica-TracImporter opened this issue Jun 27, 2020 · 3 comments
Assignees
Labels
COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature COMP/GUI/OMEdit Issue and pull request related to OMEdit
Milestone

Comments

@OpenModelica-TracImporter
Copy link
Member

No description provided.

@casella casella added COMP/GUI/OMEdit Issue and pull request related to OMEdit COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature labels May 16, 2023
@casella casella added this to the 1.22.0 milestone May 16, 2023
@casella
Copy link
Contributor

casella commented May 16, 2023

This issue has been pending for a while, it's time to fix it in the new inst-based interface

adeas31 added a commit to adeas31/OpenModelica that referenced this issue Nov 2, 2023
Fixes OpenModelica#5395, Fixes OpenModelica#5405, Fixes OpenModelica#5489, Fixes OpenModelica#5737, Fixes OpenModelica#7750 and Fixes OpenModelica#10226

Apply the modifiers with one call of `setElementModifierValue`.
Added a new button for final and each context menu.
Improved the handling of modifiers.
@adeas31
Copy link
Member

adeas31 commented Nov 2, 2023

when changing the unit, the displayUnit modifier should get the each prefix automatically if the parameter is an array, otherwise the model is invalid (#5395).

With PR #11019 the user can set each. OMEdit doesn't automatically add it. We had a discussion about it https://trac.openmodelica.org/OpenModelica/ticket/5405#comment:5 and decided to leave it to user to select it or not.

@casella
Copy link
Contributor

casella commented Nov 2, 2023

With PR #11019 the user can set each. OMEdit doesn't automatically add it. We had a discussion about it https://trac.openmodelica.org/OpenModelica/ticket/5405#comment:5 and decided to leave it to user to select it or not.

I agree that the user should have the freedom to choose. That said, I wonder, could we make some analysis on the input and refuse to accept a wrong modifier right away, instead of accepting it and then getting an error from the compiler later on?

I guess it's a fairly typical error for beginners (and not only for them) to forget each when applying a scalar modifier to an array parameter, we should try to prevent this a priori if possible.

adeas31 added a commit to adeas31/OpenModelica that referenced this issue Nov 14, 2023
…odelica#11019)

Fixes OpenModelica#5395, Fixes OpenModelica#5405, Fixes OpenModelica#5489, Fixes OpenModelica#5737, Fixes OpenModelica#7750 and Fixes OpenModelica#10226

Apply the modifiers with one call of `setElementModifierValue`.
Added a new button for final and each context menu.
Improved the handling of modifiers.
adeas31 added a commit that referenced this issue Nov 14, 2023
Fixes #5395, Fixes #5405, Fixes #5489, Fixes #5737, Fixes #7750 and Fixes #10226

Apply the modifiers with one call of `setElementModifierValue`.
Added a new button for final and each context menu.
Improved the handling of modifiers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature COMP/GUI/OMEdit Issue and pull request related to OMEdit
Projects
None yet
Development

No branches or pull requests

4 participants