Popup info for unfinished program node configuration

Hi there,

What
I am currently trying to find a way to inform the user about the unfinished program node information when leaving the program node wizard early (e.g. by clicking on another program node or switching to the installation tab). The popup shall ask whether the user wants to actually leave the program node wizard (-> go to desired location) or wants to stay and finish the setup.

Why
The process behind our intended program node requires the wizard/setup to be completed in one go, otherwise the incomplete changes/settings will/must be discarded. Therefore I want to notify the user and give him the chance to stay in order to improve user experience.

Current status
I managed to inform the user about the loss of information/settings by triggering a popup in the closeView() method, however I m unable to prevent Polyscope from switching to the selected location if the user wants to finish the wizard.

Is there an option to realize the above mentioned popup/prevent Polyscope from actually closing the view?

Probably not. You don’t get a lot of tools for accessing stuff outside your own nodes. There’s no great ways for accessing the program tree, or the top ribbon, etc so you can’t really intercept mouse clicks. I would try to restructure your CAP to tolerate switching screens. I’m not sure what all you’ve got going on, but I would think you’d be able to save everything to the datamodel and recall it on openView() like most anything else.

Thank you for your quick reply! This kind of confirms my current understanding, how openView() and closeView() are intended to be used.

Why(extended)
Without going into too much detail: My UR Cap requires a sequence of robot positions to be moved to during the program node setup. These must be performed one after another. When the user interrupts this process at some point one has to start from the begining. When using openView() to restore the state I would have to “fast-forward” this sequence up to the point where it was interupted (User would have to wait till robot has performed the whole movement). This seemed kind of user unfriendly and requires a lot of data to be stored, which is why I was trying to avoid it.

When considering your assessment, there might be some design options to reduce the amount of “non-persistent” states and therefore make better use of the openView() procedure.

What exactly is the reason for needing to move to points in a sequence? I ask because maybe you can just store each pose that has been taught to an array in Java, and iterate through this array on openView() if you’re just using the robot movements to, say, preform some math or something.

I guess without being able to see exactly what you’re doing, in my mind the only reason the robot would actually have to move through a specific sequence of positions is to get around obstacles, or position itself correctly at the end. But if the user has simply cycled pages, the robot is still in the same position it was in when the user tapped away. You can even store this position in closeView() and check the actual TCP value in openView(), and if they don’t match (or aren’t close enough) THEN you force the user to sequence through your moves.

If you’re just doing some forms of calculations on the pose data, this could be done by iterating through the stored positions, which should be retained whether you swap pages or not.