kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Macros are not resolved in the value field of Write PV actions. #504

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

See the following OPI:

CSSTUDIO-965.zip

$(MACRO) is set to 99 inside the display, and the 2nd buttons uses $(MACRO) in the Value field of its Write actions. It is to be noted that the same macro is used in the Description field of the same action and here it's working fine.

2019-03-11 15:10:52.958 WARNING [Thread 122] org.csstudio.display.builder.runtime.ActionUtil (writePV) - Cannot write loc://pv = $(MACRO)
java.lang.Exception: Failed to write $(MACRO) to PV loc://pv
    at org.csstudio.display.builder.runtime.WidgetRuntime.writePV(WidgetRuntime.java:402)
    at org.csstudio.display.builder.runtime.ActionUtil.writePV(ActionUtil.java:228)
    at org.csstudio.display.builder.runtime.ActionUtil.lambda$1(ActionUtil.java:60)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.Exception: Cannot write $(MACRO) to PV loc://pv
    at org.csstudio.display.builder.runtime.pv.vtype_pv.VTypePV.write(VTypePV.java:77)
    at org.csstudio.display.builder.runtime.WidgetRuntime.writePV(WidgetRuntime.java:398)
    ... 5 more
Caused by: java.lang.Exception: Failed to write '$(MACRO)' to LocalPV 'loc://pv' = VDouble[0.0, 2019/03/11 15:08:23.745]
    at org.csstudio.vtype.pv.local.LocalPV.write(LocalPV.java:110)
    at org.csstudio.display.builder.runtime.pv.vtype_pv.VTypePV.write(VTypePV.java:73)
    ... 6 more
Caused by: java.lang.Exception: Cannot parse number from '$(MACRO)'
    at org.csstudio.vtype.pv.local.ValueHelper.adapt(ValueHelper.java:327)
    at org.csstudio.vtype.pv.local.LocalPV.write(LocalPV.java:91)
    ... 7 more
kasemir commented 5 years ago

Try now

claudio-rosati commented 5 years ago

It works now. Thank you Kay.