Opened 7 years ago

Closed 7 years ago

#4572 closed defect (fixed)

OMEdit allows illegal instance names through GUI

Reported by: dr.christian.kral@… Owned by: Adeel Asghar
Priority: blocker Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc:

Description

There are two issues on illegal names in OMEdit:

1) Drag new component to Diagram View:

Create a new model and switch to the Diagram view. Drag any components (from Modelica.Blocks.Sources, for example) into the new model. A dialog "Enter Component Name" pops up: I am then allowed to enter illegal names, e.g.,

  • 33 (illegal numbers in the beginning of the class names)
  • öö (illegal German umlaut)
  • s-d# (illegal dash, illegal #)
  • a.b (illegal dot)
  • c,d (illegal semicolon)

The components with the illegal instance names are not shown in the Text View, but are always displayed in the Diagram View.

2) Renaming of class names

In an existing model make a right click and pick "Attributes" to change the name of an instance. Then, similarly to 1), illegal class names can be entered in the "Name" field. The illegal names are shown both in the Text and Diagram View.

This ticket seems to be related with #4186.

Change History (5)

comment:1 by dr.christian.kral@…, 7 years ago

This issue applies to

OMEdit 1.13.0~dev-18-gf627d10
Connected to OpenModelica 1.13.0~dev-192-gd3b895d

It is a typical error of students to pick wrong names for classes and instances. So when ever the GUI can help avoiding such issues it shall be done. Therefore, I would highly appreciate it if this issue could be fixed for the upcoming OM version 1.12.

comment:2 by dr.christian.kral@…, 7 years ago

Even worse the wrong instance names may cause that a package or model cannot not be loaded again after unloading it in OMEdit.

comment:3 by Christian Kral <dr.christian.kral@…>, 7 years ago

Could someone please change the ticket subject from "class" to "instance". Thanks.

comment:4 by Adeel Asghar, 7 years ago

Milestone: Future1.12.0
Status: newaccepted
Summary: OMEdit allows illegal class names through GUIOMEdit allows illegal instance names through GUI

comment:5 by Adeel Asghar, 7 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in 785126/OMEdit.

Note: See TracTickets for help on using tickets.