I’m fairly new to Perspective and still learning best practices. To dip into it first, I’m redeveloping a Vision project to perspective. This project is a PDF/dashboard signage system. TVs around our plant can cycle through PDFs or other vision windows. The files and paths are all stored on a database that contains the TV the data is assigned to, the amount of seconds the data will be displayed before changing to the next row, and other various things.
My current planned design of this system on perspective is to, on the page being loaded, generate a dataset of files or views the TV has to display. In Vision, I used a timer component to control when the window would switch to the next row of data. The duration of the timer would be dynamically set on each new row of data within the ActionPerformed
event. This can’t be replicated as there is no timer on Perspective.
To accomplish this on perspective, I’ve tried creating a custom property that is using a now() expression bound to another custom property. It is then is attached to a script transform which calls a python endpoint to get a link for an I-frame to display. I got this architecture up and running but ran into one major issue. In the script transform, I want write the {parent.custom.rotationRate}
to the milliseconds of the display time of the new row of data, but this then immediately causes the script to refire continuously as the expression binding is being updated.
Would anyone have any suggestions on making the timing of the transform script dynamic? Do I have to use a busy wait to put the script in a holding pattern? Is there a more efficient way of creating a system like this? Thanks for any help with this.