Opened 13 years ago
Closed 12 years ago
#1714 closed defect (fixed)
OMEdit does not show inherited parameter choises?
Reported by: | perob88 | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: | perob88 |
Description
I find that OMEdit does not show all available parameters as per default in the gui.
Example:
Add Modelica.Blocks.Sources.IntergerStep to a model, the only available parameter is "Integer height=1". There are however inherited parameters, namely "offset" and "startTime" which are inherited from Modelica.Blocks.Interfaces.IntergerSignalSource.
Manually setting these parameters in the code makes OMEdit aware of them and shows the parameters in the GUI.
Change History (3)
comment:1 by , 12 years ago
Cc: | perob88, → perob88 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 12 years ago
Priority: | high → critical |
---|
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Inherited parameters are shown now.
Note:
See TracTickets
for help on using tickets.
This issue has been around for a very long time, since the old days of SimForge, that had the same problem. IMO, this should be fixed with very high priority: the MSL is heavily based on inheritance, so it is basically unusable with OMEdit until this is fixed.
The root cause is that the API function called to get the parameter names of the instance of a certain class only returns the parameters defined in that class, and not those defined within its ancestors.
One option is that OMEdit enquires for base classes and recursively collects parameters from all the inheritance tree, but this would be a waste of time, since this operation is already carried out by the front end when flattening. I would suggest to modify the code of the API instead.