Opened 11 years ago

Closed 11 years ago

#2531 closed defect (fixed)

Omedit should not let the user change final parameters (r18573)

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: normal Milestone: 1.9.1
Component: OMEdit Version: trunk
Keywords: Cc:

Description

Consider the model
Modelica.Blocks.Sources.CombiTimeTable

If, while in OMEdit, the user clicks on its icon he gains access to the Parameters Window.
This window lets him change parameters "t_min", t_max", "nout" that are defined as final. This is not a good thing, since they are not intended to be modified by the user.

I think that they should either omitted from the parameters window or shown greyed (but always and unmodifiable: modification is against Modelica language and causes a "lvalue required as left operand of assignment" error at compilation time).

Whether to show these parameters grayed and unmodifiable or not show them at all is questionable.
If asked, I would prefer them not to be shown at all, since they consume valuable space on the Parameters window and do not present useful information.
Their value is correctly displayed as constant values in the OMEdit plot window.

Change History (7)

comment:1 by Adeel Asghar, 11 years ago

Resolution: fixed
Status: newclosed

I like the idea of not showing the final parameters.
Fixed in r18584.

comment:2 by massimo ceraolo, 11 years ago

Resolution: fixed
Status: closedreopened

Sorry for reopening this.

I've checked the behaviour of component Modelica.Blocks.SourcesCombiTimeTable under r18590
under Windows.

I see that the "final" variables (t_min, t_max, nout) are still visible and modifiable in the parameters window.

comment:3 by Adeel Asghar, 11 years ago

Are you sure?
I just installed r18590 on virtual box Windows 7 and I only see "nout".

nout is being declared as normal integer parameter in Modelica.Blocks.Interfaces.MO but it is marked final when Modelica.Blocks.SourcesCombiTimeTable extends Modelica.Blocks.Interfaces.MO. This should be handled but atleast t_min & t_max are not shown in nightly build r18590.

comment:4 by Adeel Asghar, 11 years ago

I have fixed the inherited parameters in r18602.
Everything should work now.

comment:5 by massimo ceraolo, 11 years ago

The check I made was under my PC working on Win8.1.
The OM version r18590 was created by first uninstalling the previous one, and then installing it. I confirm that under this configuration I see t_min, t_max and nout.
I will try again tomorrow with the latest build available .

comment:7 by massimo ceraolo, 11 years ago

Resolution: fixed
Status: reopenedclosed

I confirm that also my tests on r18607 show that this issue is fixed.

Note: See TracTickets for help on using tickets.