Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6138 closed defect (fixed)

OMEdit gives an error when trying to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

Reported by: Andrea Bartolini Owned by: Adeel Asghar
Priority: blocker Milestone: 1.16.0
Component: OMEdit Version: v1.16.0-dev
Keywords: Cc: Francesco Casella

Description

Step to reproduce the error:
1) open the attached package Test.mo
2) open M1 model, double click on the real expression component, change parameter and press OK. Modifier is updated as expected,
3) open M2 model, double click on the real expression component, change parameter and press OK, the following error is returned

[1] 11:22:27 Scripting Error
Unable to set the component modifier value using command setElementModifierValue(Test.M2, realExpression.y, $Code(=123))

and the parameter is left unchanged.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-647-g2a078a0
Sysop: Ubuntu 18.04

Attachments (2)

Test.mo (856 bytes ) - added by Andrea Bartolini 4 years ago.
Test1.mo (1.2 KB ) - added by Andrea Bartolini 4 years ago.

Download all attachments as: .zip

Change History (10)

by Andrea Bartolini, 4 years ago

Attachment: Test.mo added

comment:1 by Andrea Bartolini, 4 years ago

UPDATE:
the problem disappears if the replaceable support is deactivated...

comment:2 by Andrea Bartolini, 4 years ago

Summary: OMEdit get error when try to set parameters if an "extends" clause is presentOMEdit get error when try to set parameters if an "extends" clause is present and replaceable support is active

comment:3 by Andrea Bartolini, 4 years ago

Summary: OMEdit get error when try to set parameters if an "extends" clause is present and replaceable support is activeOMEdit get error when try to set parameters or variable modifier if an "extends" clause is present and replaceable support is active

In attached file test1.mo both variable and parameter modifiers are tested.
Both of them get errors (parameter k in firstOrder filter, y in realExpression).

[1] 10:23:31 Scripting Error
Unable to set the component modifier value using command setElementModifierValue(Test1.M2, firstOrder.k, $Code(=123))[3] 10:23:44 Scripting Error

Unable to set the component modifier value using command setElementModifierValue(Test1.M2, realExpression.y, $Code(=123))

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-655-g93494e4
Sysop: Ubuntu 18.04

by Andrea Bartolini, 4 years ago

Attachment: Test1.mo added

comment:4 by Andrea Bartolini, 4 years ago

Summary: OMEdit get error when try to set parameters or variable modifier if an "extends" clause is present and replaceable support is activeOMEdit get error when try to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

comment:5 by Francesco Casella, 4 years ago

Summary: OMEdit get error when try to set parameter or variable modifier if an "extends" clause is present and replaceable support is activeOMEdit gives an error when trying to set parameter or variable modifier if an "extends" clause is present and replaceable support is active

comment:6 by Adrian Pop, 4 years ago

Resolution: fixed
Status: newclosed

comment:7 by Francesco Casella, 4 years ago

Looks good.

comment:8 by Andrea Bartolini, 4 years ago

Seems to work on Ubuntu 18.04

Note: See TracTickets for help on using tickets.