Note that the online help for BOY, Scripts, Access Widget lists this method:
public java.lang.String getMacroValue(java.lang.String macroName)
Get macro value from the widget.
Parameters: macroName - The name of the macro.
Returns: the value of the macro. null if no such macro exist.
Example: var macroValue = widget.getMacroValue("m1"); //get the macro value of "m1"
That would be the suggested way to read the value of a macro.
If you directly read the widget.getPropertyValue("macros"), as you noticed the result is of type MacrosInput.
It's not part of the script API which is documented, so you should try to avoid that, but if you insist, check its source code, https://github.com/ControlSystemStudio/cs-studio/blob/master/applications/plugins/org.csstudio.opibuilder/src/org/csstudio/opibuilder/util/MacrosInput.java:
value = parentMacros. getMacrosMap().get("name-of-macro")
Thanks,
Kay
On Jul 2, 2014, at 3:48 PM, Márcio Paduan Donadio <[email protected]>
wrote:
> Dear all,
>
> I couldn't find the methods and properties list related to MacrosInput class of org.csstudio.opibuilder.util. I could find an example to insert items in the macro list, but could not find a way to read them.
>
> After parentMacros = widget.getPropertyValue("macros") I guessed the method could be parentMacros.get("item"), but an error message told me that get member was not part of the class MacrosInput.
>
> Could someone send me the specification of the class methods, please?
>
> Thank you very much,
>
> Márcio Paduan Donadio
> Computer Engineer - LNLS
- References:
- CS-Studio MacrosInput class documentation Márcio Paduan Donadio
- Navigate by Date:
- Prev:
CS-Studio MacrosInput class documentation Márcio Paduan Donadio
- Next:
Re: Build EPICS for vxWorks 6.9 on windows-XP SP3 Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
CS-Studio MacrosInput class documentation Márcio Paduan Donadio
- Next:
About FMB Oxford APD Detector zhuzwusst
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|