Panel State Change/Loaded Bug in RP9

I’m trying to make a custom progress indicator. I’ve created a dynamic panel with two states: “Default” and “Uploading.” In each state I have a 10x10 square with rounded edges to represent the Progress Bar and a 242x12 rounded edge rectangle to represent the container. On load, I set the panel to state: “Uploading.” On panel state changed, if state of This equals “Uploading,” set [Uploading] Progress Bar to 240w x 10h, anchored left, swing 2500ms. Then wait 2750ms and do something.

All this works great. However, I’m making a UX design system and I want to show several of these progress bars on one page. I also want them to cycle endlessly. To achieve this, after the 2750ms wait, I reset the panel back to Default. Then I have an “else if true” condition to reset [Uploading] Progress Bar back to 10x10 and change the panel state to “Uploading” (which then triggers the set size Action, repeating the progression).

Again, all this works great. The problem is when I copy this dynamic panel multiple times. The only one that performs this infinite loop is the first one on the page. The others run once, then stop. I’ve spent the last 2 hours trying to debug this or come up with a workaround to no avail. I can’t figure out why they all don’t function exactly the same.

This appears to be a bug with either dynamic panels or the panel state change/loaded interaction.

ProgressIndicator.rp (63.1 KB)

I recommend you upload your .rp file as there could be many reasons for this. Also much easier for folks to understand just what you’ve set up versus trying to interpret a brief description, much easier to suggest solutions, as well as apply them.

In the meantime, look at the details of your case conditions and ensure the correct dynamic panel is being tested in each, the correct widgets are being resized, etc. It will greatly help if each widget has a unique name. If you’ve copied a working dynamic panel it could be the copy is testing the state of the original, and if both have the same name, or no name, it will be nearly impossible to debug.

Another suggestion is to use ”relative references” instead of absolute widget names. In other words, a conditional case of “IF State of This is Uploading” is more extensible than “IF State of MyPanel1 is Uploading”. Also, when copy-pasting widgets, events or actions, some details can get lost or ”blanked out” and can be hard to detect without double-checking all the interaction code.

Thanks for the reply. I uploaded a copy of my .rp file.

I tried all of your suggestions, including absolute references. It’s not present in the uploaded version because it made no difference, but I did try that.

Take a look and let me know what you think.

Thanks!

So you fixed it, though. Looks like it works well–the two progress bars loop infinitely and in synchronization. I Ctrl-copied one of your progress bars and it also loops forever. Not sure why you wait 2750 and change it to Default, but then change it immediately back to Uploading in Case 2–was that just to test the infinite looping?

It’s working for you? For me, only the first one loops infinitely. The second progress bar fills once then stops and never starts again. That’s the issue I’m having. I’ve tried it in Edge and Firefox.

I’ve attached a screenshot showing how they get out of sync after the first fill.

Also, without waiting longer than the duration of the Set Size action, you never see the animation. Setting the panel then to Default, which resets the progress bar back to it’s original position and then back to Uploading is what restarts the fill.

Yes, works fine for me. Win10 and latest Google Chrome browser. in your file, I copied one of the progress bar dynamic panels, then I copied that copy and removed the Change State action in Case 2 (change to Default state) to test if it would run once and stop without looping, which it did.
Here is a screen capture:

2020-03-18_ProgressIndicator

Hmm… So it must have something to do with my browser versions. Thanks for looking into it for me!