Universal Robots Forum

openView callback called twice in the InstallationNodeContribution

When I click on the installation tab and that my installation node was already selected, the callback openView() is called twice. To reproduce it:

  1. Add some console trace in the openView method
  2. Select the installation node
  3. Press on the tab Program
  4. Press on the tab Installation
  5. You should se the trace printed twice.
1 Like

You are correct, that openView() is called twice when toggling from Program to an open Installation node.
However closeView() is called twice as well, so the math should add up, and you will end up with the openView().

Normally, toggling between two different installation- or program nodes will only yield 1 closeView()and openView()

For the ProgramNode the behaviour is:

Generally, the @Override methods, such as openView(), closeView(), isDefined() etc. should be designed in a way, so they are lean and not very resource consuming, as this might affect the responsiveness of the GUI.

E.g. the isDefined()method is called every time a change is made in the program.
Hence, you should not have any remote calls or methods with slow response time in isDefined()

(Valid for SDK

The problem we have with the openView/closeView called twice is that we set
the visibility of a widget from those callbacks so it flickers on the
screen. That is not a major issue but it looks strange.

2016-08-19 5:42 GMT-04:00 Jacob Bom Madsen <