Have no idea if it useful for anyone, will try to post.
In one project have the requirement to make shutdown popup windows by time if it does not use, and of course, extend timer if this window still in use.
Will start from a simple way, make some object flashing on a page.
Choice object what you want to flash. On right windows in META properties, you will see VISIBLE
Click on binding this property.
In binding window choice EXPRESSION
in first binding add
now(1000)
change 1000ms to interval what you want.
Click Add transformation button and choice EXPRESSION again
here is add
if({this.meta.visible},False, True)
Click OK. And see how your object flashing.
Let’s make a little bit harder trick. Self-close popup window, by a timer with extending timer if you use the window.
Make a new window or open window that you use as a popup.
add to a custom property new property with name timer
do binding for this property.
In binding window choice EXPRESSION
in first binding add
now(1000)
Click Add transformation button and choice SCRIPT again
here is add this code
value=self.custom.timer-1
if value<=0:
system.perspective.closePopup(self.page.props.pageId)
return value
Now we will configure events for this window.
in onStartup event add a script with this line (10 you can change to whenever second you need)
self.custom.timer=10
in Mouse events onClick add a script with this line (add this script to keyboard events, you if have text entry or so)
self.custom.timer=10
now you can add any elements to your popup.
enjoy your automatic close window.
Let me know if anybody wants publications like this one.