Opened 14 years ago

Last modified 13 years ago

#1538 closed defect (fixed)

OMEdit: Modelica.Blocks.Sources.RealExpression is unusable

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Adeel Asghar

Description

No connector is visible

Change History (5)

comment:1 by Adeel Asghar, 13 years ago

There is a problem with getComponentAnnotations API. It returns empty string if the component annotation does not start with Placement.

In RealExpression, IntegerExpression and BooleanExpression the component annotation starts with Dialog so getComponentAnnotations fails.

comment:2 by Adrian Pop, 13 years ago

I changed now locally so we have for this script:
{{{ ann.mos
loadModel(Modelica); getErrorString();
getComponentAnnotations(Modelica.Blocks.Sources.RealExpression); getErrorString();
getComponentAnnotations(Modelica.Blocks.Sources.IntegerExpression); getErrorString();
getComponentAnnotations(Modelica.Blocks.Sources.BooleanExpression); getErrorString();
}}}
the following output:

adrpo@ida-liu050 ~/dev/OpenModelicaBackend/build/bin/ann
$ ../omc ann.mos 
true
""
{{Dialog("General","Time varying output signal",true), Placement(true,0.0,0.0,100.0,-10.0,120.0,10.0,0.0,0.0,0.0,-,-,-,-,0.0)}}
""
{{Dialog("General","Time varying output signal",true), Placement(true,0.0,0.0,100.0,-10.0,120.0,10.0,0.0,0.0,0.0,-,-,-,-,0.0)}}
""
{{Dialog("General","Time varying output signal",true), Placement(true,0.0,0.0,100.0,-10.0,120.0,10.0,0.0,0.0,0.0,-,-,-,-,0.0)}}
""

Note that this is a change in API, all getComponentAnnotations output will change\\
Is that OK with you, can you change OMEdit easily to handle this kind of change?
Let me know if this is OK with you so I can push it in.

comment:3 by Adeel Asghar, 13 years ago

Its OK. I just have to make some updates in one class and hopefully everything will work.

comment:4 by Adrian Pop, 13 years ago

Good, before you only got what is inside Placement now.
I run the testsuite now and push it in.

comment:5 by Adrian Pop, 13 years ago

fixed it and changed the API in revision 9522.

Note: See TracTickets for help on using tickets.