drey
1
Hi, I’m trying to refresh the vCortex Flow Diagram component from a button click.
I clear the nodes/edges and then call my loadFlow() function:
flow.props.nodes = []
flow.props.edges = []
flow.props.layouting.autoLayout = False
self.view.custom.flowNodes = []
time.sleep(0.1) # temporary delay
self.loadFlow()
Because Perspective property writes are async, the load runs before the clear finishes, causing inconsistent results.
invokeLater does not work in Perspective from this scope, and I know using sleep() is not ideal.
Question:
What is the correct or recommended way in Perspective to add a small delay or queue the load so it runs after the clear is applied?
Thanks!
Searching for the word “delay” in the forum brings up a lot of suggestions….some are better than others.
My favorite method when needing a timer on a Perspective view is to use a custom prop like this: