I am hoping someone will be able to elucidate the deeper workings of closeView and openView so that I could attempt to make sense of some seemingly bizarre behavior I am observing in my URCap. I am running into an issue where my closeView appears to be called before my openView. It is an odd case, but some residuals of our view remained when switching from the program tab to the move tab. From the debugging we have done so far, it appears that the closeView was actually getting called before the openView. Any and all thoughts are appreciated. Thank you!
I’ve noticed that certain actions don’t trigger closeView. Making a call to the robotMovementCallback for position saving for example doesn’t actually trigger the closeView method. Otherwise the closeView is called when the node leaves the active screen, and openView is called when it enters the screen. Are you creating some custom JFrames or something? Generally nothing should even be displayed from the URCAP on the Move screen.
Yes, I’ve noticed that as well about the robotMovementCallback. I agree nothing should be able to be displayed from the URCap on the Move screen, that is why I am perplexed. I would have expected the openView and closeView calls to be done via the Swing Event Dispatch Thread, and therefore never executed out of order, but our logs appear to be indicative of the contrary.
Are you in Polyscope 5 or Polyscope X development?
This is for Polyscope 5
Might help if you post some code. Honestly I rarely use the closeView() method. And I’ve never had UI elements carry over between screens like you’re describing.