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

Parameter prefix is neglected by GUI although it is defined in choice #11708

Closed
mpradovelasco opened this issue Dec 10, 2023 · 5 comments · Fixed by #11711
Closed

Parameter prefix is neglected by GUI although it is defined in choice #11708

mpradovelasco opened this issue Dec 10, 2023 · 5 comments · Fixed by #11711
Assignees
Labels
COMP/OMC/Frontend Issue and pull request related to the frontend
Milestone

Comments

@mpradovelasco
Copy link

Hi,
I have tested the issue #11665 (closed) with the same minimal example (and in other more complex situations) and it works fine for the input prefix but it does not for the parameter prefix, which is neglected.

I have used the latest nightly build OM 1.23-dev in Windows 11.

Thanks!

@adeas31
Copy link
Member

adeas31 commented Dec 10, 2023

Can you please provide a MWE?

@mpradovelasco
Copy link
Author

Yes, the same MWE of #11665 may be used. I repeat it here with the response on current OM 1.23-dev.
This is the MWE:

package inputInchoices
  import Modelica.Units.SI;
  model A
    replaceable type typeCustom = input SI.VolumeFlowRate "Description" annotation(
      Dialog(enable = true),
      choices(choice(redeclare type typeCustom = parameter SI.VolumeFlowRate "parameter"), 
        choice(redeclare type typeCustom = input SI.VolumeFlowRate "input")));
    typeCustom var = 1 
      annotation(Dialog(enable = true));
    annotation(
      Icon(graphics = {Rectangle(origin = {9, 7}, extent = {{-51, 47}, {51, -47}})}));
  end A;
  model Top 
   A a annotation(
      Placement(transformation(origin = {-2, 10}, extent = {{-10, -10}, {10, 10}})));
  end Top;
end inputInchoices;

And the parameters dialog showing properly the input but not the parameter prefix.
image

Thank you!

@adeas31
Copy link
Member

adeas31 commented Dec 10, 2023

@perost can you please take care of it.

@perost
Copy link
Member

perost commented Dec 11, 2023

Fixed in #11711.

When I fixed the previous issue I was looking at the latest Modelica specification where short class declarations are only allowed to have the input/output prefixes, and missed that more prefixes were allowed in Modelica 3.3 and earlier.

@mpradovelasco
Copy link
Author

I did not know such a detail. Thank you for the information @perost and excuse me then for open again this issue.

@casella casella added the COMP/OMC/Frontend Issue and pull request related to the frontend label Dec 11, 2023
@casella casella added this to the 1.23.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/OMC/Frontend Issue and pull request related to the frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants