Important Notice to all App Developers regarding Cytoscape 3.4

26 views
Skip to first unread message

Christian Lopes

unread,
May 2, 2016, 6:45:28 PM5/2/16
to cytoscape-discuss
To all Cytoscape app developers:

I'd like to let you know of an important change in the next version of Cytoscape, to be released soon, which may affect several apps.

From Cytoscape 3.4 on, when an app creates and then registers a CyNetworkView with its manager, it's no longer automatically set as current like in versions 3.3 and below. This means that, if your app creates views, they may not be displayed to the user as before, and the user will have to select them manually from the network or view list.

This will probably happen if the app only does this after creating a view:

cyNetworkViewManager.addNetworkView(view);

Fixing it is very easy! Usually, all you have to do is add this line after the one above:

cyApplicationManager.setCurrentNetworkView(view);

We are sorry for the inconvenience, but we had to change the behavior of addNetworkView() in order to improve the performance when programatically creating (and registering) many network views at once.

This change does not affect the API and should not crash the affected apps.
But be careful about NullPointerExceptions that can occur if the app does not check for null values returned by these methods (this could also happen before but will be more common in v3.4):

CyApplicationManager.getCurrentNetwork();
CyApplicationManager.getCurrentNetworkView();

You can download the latest build of Cytoscape here to check if your app will have any issues.

Please let me know if your apps are affected by this change, and we can help you fix them for 3.4, specially if your source code is on GitHub.

Thanks,
Christian
Reply all
Reply to author
Forward
0 new messages