Closed jevarlec closed 4 years ago
Install the examples, then check for instance https://github.com/ControlSystemStudio/phoebus/tree/master/app/display/model/src/main/resources/examples/template_and_script where create_instances.py
shows how to create widgets and add them.
Thanks, using widget.runtimeChildren().addChild(wgt)
has indeed solved the exception issue.
But the other issue (the funny part) remains. Shall I open a new issue on github, or can we use this one?
Can you package this as an example, for example one 'main.bob' with the script, one 'digital_display.bob' with the content of the embedded widget, all using loc:...
or sim:...
PVs for standalone testing/debugging?
Thanks for the example. Seems to work fine. What's the problem? I see nothing vanish when I move the mouse or scroll.
I managed to reproduce it on a different machine. If you put your mouse over the embedded display widget and scroll down, it does not disappear? That's interesting. I will try to provide video.
Yes. The up/down scrollbar works, you can also use the mouse wheel to scroll up/down when the mouse is in most of the display, but the mouse wheel cannot scroll up/down when your mouse pointer is on top of the embedded display because of https://github.com/ControlSystemStudio/phoebus/pull/1363 and https://github.com/ControlSystemStudio/phoebus/issues/1355. When the embedded content is larger so that the embedded display itself has a scroll bar, then the mouse wheel will scroll within that embedded display.
When you run this display with an older version of the display builder, like the one for the Eclipse-based CS-Studio instead of the one for phoebus, then you can accidentally 'scroll' the content of the embedded display out of view, which is what has been fixed in the updates mentioned below, but only for the Phoebus-based sources.
That's it, thanks for all the help.
I wish to use a script to generate a large amount of widgets. To test this, I made the following test script:
This script is then attached to a Group widget. When the display with the Group widget with the script is executed, Phoebus returns the following output:
It seems to me that
widget.setPropertyValue('children', children)
is the culprit. It also says in the ChildrenProperty.java:But where is
ContainerWidget
? How do I add children to the Group widget or Display, since those do not have addChild/removeChild methods? Using BOY, one could callwidget.getChildren
,widget.addChild
orwidget.removeChild
, so it was relatively simple. What is the standard way to do it with Display Builder?And now the funny part: The widgets still get generated, even though there is an exception. But if you scroll down with the mouse cursor over the widget, it disappears. It reappears if you scroll up with cursor over the space where widget was located. But I am unsure if this is connected to the issue above.
Thank you for your help.