Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  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  <20182019  2020 
<== Date ==> <== Thread ==>

Subject: Re: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script.
From: "Kasemir, Kay" <kasemirk@ornl.gov>
To: "Gregory, Ray" <gregoryrd@ornl.gov>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 23 May 2018 11:40:03 +0000

Hi:


The TextUpdate widget's purpose is to have a pv_name.

At runtime, it connects to that PV and displays its value, formatted as text, on the screen.

The Label widget's purpose is to have a text.

At runtime, it displays that text on the screen.



In BOY, it was possible to have a TextUpdate with a pv_name plus a script or rule that updates the text.

What you'd see on the screen depends on the phase of the moon. Might be the value of the PV, or the text set by the rule/script.

In BOY is was also possible to have a TextUpdate with the pv_name left empty, and then use a rule/script to set the text.


In the display builder, the TextUpdate can only display the value of a PV.

The 'text' property is no longer accessible from rules/scripts to avoid the uncertainly of what you'd see on the screen.

In the display builder, you'd have to use a Label if you want to set a 'text' property from a rule/script.

In most cases, however, it's likely best to avoid such Labels-with-rule-or-script and just create a PV with the desired value, then show that in a plain Text Update as one would have done with edd/dm/medm/dm2k/edm/.. or any of the other EPICS display tools.


Thanks,

Kay




From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Gregory, Ray <gregoryrd@ornl.gov>
Sent: Tuesday, May 22, 2018 5:19 PM
To: tech-talk@aps.anl.gov
Subject: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script.
 

I am converting a BOY OPI to a Display Builder .bob file. One of the scripts attached to the OPI retrieves the text of another (Text Update) widget as follows:

 

raw_curve_file_list_widget = display.getWidget("PredefinedCurveListOutput")      

raw_string = raw_curve_file_list_widget.getPropertyValue("text")

 

 

When I convert to using Display builder I have:

 

raw_curve_file_list_widget = ScriptUtil.findWidgetByName(widget, "PredefinedCurveListOutput")      

raw_string = raw_curve_file_list_widget.getPropertyValue("text")

 

 

However, when I try to run this in Display Builder, I get the error:

 

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Widget 'SelectedPredefinedCurveFileInput' (textentry) has no 'text' property

 

How can I access the text property of this widget in Display Builder?

 

--Ray


Replies:
RE: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script. Gregory, Ray
References:
Problem accessing TextUpdate text property in Display Builder script. Gregory, Ray

Navigate by Date:
Prev: Re: xxxRecord.c warning about epicsFloat64 to float conversion Ralph Lange
Next: RE: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script. Gregory, Ray
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  <20182019  2020 
Navigate by Thread:
Prev: RE: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script. Gregory, Ray
Next: RE: [UNTRUSTED] Problem accessing TextUpdate text property in Display Builder script. Gregory, Ray
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  <20182019  2020 
ANJ, 23 May 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·