Hello,
I have noticed an interesting “situation” that results in lister not being properly refreshed. I feel like this isn’t really a bug, but since it was causing me some trouble I figured I might post it here so you can take a look and know it could be happening. Please feel free to take a look at following scene.
lister_not_refreshing.13.toe (12.1 KB)
container1.tox (40.6 KB)
container1
is being loaded by Execute DAT and right after it is loaded, its Maincomp parameter is configured. Based on this Maincomp parameter is DAT selected inside of container1
, which is then provided as input to lister. Quite simple - one would expect this to result in lister correctly displaying content of selected DAT. However lister never displays these.
This is what (I think) is happening here. Lister’s extension is being initialized when loading container1
from external tox. At this time, is Maincomp parameter pointing to wrong location (this makes sense as container1
is just some UI which is displaying state of some “main component” - which could be placed at different place as when it was saved). Lister hits Refresh from its __init__
, but there are no data at this point so it doesn’t display anything - makes sense.
In the next step is Maincomp parameter changed to proper location, changing DAT which is going to lister. However, DAT Execute doesn’t trigger tableChange at this point, as I guess it only becomes active at some later point in time.
This results in lister not displaying proper table, which is kinda confusing, but it makes sense based on events that happened. @Ivan please what do you think might be a correct way to solve such situation (given that Maincomp parameter can’t be changed later asynchronously)? I have been thinking about this and most of the solutions doesn’t seem particularly clean, so I am not sure how to go about this.
In this simple example I had to disable cloning of lister to trigger this behavior, however in more complex scenes it is happening even when cloning is enabled. Lister itself is unmodified when compared to original component that comes with TD.