Hi
After seeing the latest 'Builder' CSS and Kay's emails to me, I
decided to go this route.
So far everything is working except the following scenario:
I have a normal main.bob file that contains my 'navigation tabs'
as show above .
Then I have an 'embedded' bob file named 'my_embedded'..
I have a python script :
1 from
org.csstudio.display.builder.runtime.script import PVUtil,
ScriptUtil
2 from org.csstudio.display.builder.model.properties import
WidgetColor
3 OUT = 48
4 IN = 22
####################################
5 ActVal = PVUtil.getLong(pvs[0]) # pv actuator $(pvname)
6 StatVal = PVUtil.getLong(pvs[1]) # pv status
## just building my Label_<pv_name> as pvlabel
7 prePV = str(pvs[0])
8 newPre = prePV.split(":")
9 prex = "Label_" + newPre[0]
########################################################
10 st = ScriptUtil.findWidgetByName(widget, "ss") ##
this widget is in my harpsgroup.bob
11 pvlabel = ScriptUtil.findWidgetByName(widget, prex) ##
this widget is in my harpsgroup.bob
12 e = ScriptUtil.findWidgetByName(widget, "my_embedded") ##
this widget is in my harpsmain.bob
if StatVal==64:
pvlabel.setPropertyValue("background_color", WidgetColor(26, 0,
104)) #
pvlabel.setPropertyValue("foreground_color", WidgetColor(255,
255, 255)) #
#e.setPropertyValue("visible", True)
st.setPropertyValue("text", str(StatVal))
widget.setPropertyValue("y",IN)
#
if StatVal>64 and
StatVal<128:
pvlabel.setPropertyValue("background_color", WidgetColor(255, 0,
0)) # Red
pvlabel.setPropertyValue("foreground_color", WidgetColor(0, 0,
0)) # Black
widget.setPropertyValue("y",IN) ## OUT
#e.setPropertyValue("visible", False)
elif StatVal==128:
widget.setPropertyValue("y",OUT) ## IN
pvlabel.setPropertyValue("background_color", WidgetColor(26, 0,
104)) #
pvlabel.setPropertyValue("foreground_color", WidgetColor(255,
255, 255)) # White
#embed.setPropertyValue("visible", False)
elif StatVal>128:
widget.setPropertyValue("y",OUT) ## IN
pvlabel.setPropertyValue("background_color", WidgetColor(255, 0,
0)) #
#e.setPropertyValue("visible", True)
pvlabel.setPropertyValue("foreground_color", WidgetColor(0, 0,
0)) # Black
#########################################################
My problem comes at line 12 where it somehow cannot get to "my_embedded"
widget.
In fact only widgets in 'harpsgroup.bob' is accessible .....
Amien
Cape Town