Replies: 3 comments
-
@tanviash did you come across this issue? |
Beta Was this translation helpful? Give feedback.
-
The effective macros are somewhat open ended. Your For existing scripts that call some 'toMap', fine, grumble, OK, maybe. |
Beta Was this translation helpful? Give feedback.
-
No, they should not... but then again what is a typical script. |
Beta Was this translation helpful? Give feedback.
-
In BOY there was a utility method to get a map of macro names and values associated with a widget.
MAP = OPIBuilderMacroUtil.getWidgetMacroMap(display.getWidget("motor%d" % i).getModel())
The return Map<String, String> could easily map to a python dict, this is used in quite a few scripts in NSLS2 opi screens
While adding a similar functionality in
org.csstudio.display.builder.model.macros.MacroXMLUtil
is trivial (not sure if below is the most efficient implementation). I am wondering if this is a good idea overall.or should we update all our script to use the interfaces already exposed.
the only draw back here is that the
Macros
do not map nicely to any python structuresBeta Was this translation helpful? Give feedback.
All reactions