In my code, I have a listener on mouse released, and in there, I have a snippet like this:
for (Node n : gs){
Object o = n.getAttribute("ui.selected");
if (o != null && (Boolean)(o)){
nodes[num++] = n;
}
}
The problem is that the event manager hasn't updated all of the selected nodes to set the ui.selected attribute. This is a race condition.
I seem to be missing how to add an event listener to a node, or to the view for when nodes are modified.
I am trying to calculate metrics on a set of selected nodes.