Opened 9 years ago
Closed 9 years ago
#4303 closed enhancement (fixed)
Support the Dialog(loadSelector|saveSelector) annotations
| Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.12.0 |
| Component: | OMEdit | Version: | |
| Keywords: | Cc: | alberto.leva@… |
Description
The Dialog(loadSelector) annotation, defined in Modelica 3.3r1, is used 15 times in the MSL, mainly to support opening data files for signal generators.
It is currently not yet supported by OMC, which means that the file name string has to be input manually. This is quite inconvenient and error-prone.
I guess implementing it using QT is trivial, so I would recommend to do so ASAP. While we're at it, it would be good to also support Dialog(saveSelector), which is very similar.
Change History (4)
comment:1 by , 9 years ago
| Status: | new → accepted |
|---|
comment:2 by , 9 years ago
In fact, I am still wondering why the spec defines two different selectors. IMHO just one, named fileSelector, would have been fine. We should open a ticket on the Modelica issue tracker, but I'm afraid I don't have time to do so now.
In the meantime, please proceed with just loadSelector.
Thanks!
comment:3 by , 9 years ago
loadSelector is now supported in a8fcac3/OMEdit.
They both are quite similar in a sense that they just provide a file path. However, Dymola handles them bit differently for the GUI. The loadSelector produces a open file dialog which lets you select existing file and saveSelector produces a save file dialog which allows you to select location and write a new file name. I also noticed that you can't use both of them at the same time (of course you can write them in the Modelica code there is no restriction at the language level but Dymola only picks one if both are there and it seems like saveSelector is given precedence over loadSelector).
comment:4 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
saveSelector is now supported in fba26f7/OMEdit.
If both loadSelector & saveSelector are present then saveSelector is given preference.

Yeah it seems handling
loadSelectorshould be easy.I am not sure what the GUI should do for
saveSelector.