Lister not catching refresh

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.

This is on my list to check out but it might be a minute. Thanks for continuing reports :slight_smile:

1 Like

Didn’t go super deep on this but I do have a couple tips to decipher it. It does seem to be a timing problem more than a lister problem.

  1. Turn on “Show Startup Errors” in preferences. There is one appearing that will give you a clue.
  2. A parexec watching that Maincomp parameter for changes and hitting Refresh will fix the issue. Shown in example:
    container1.tox (40.8 KB)

@Ivan thank you very much for looking into this.
I didn’t know about “Show Startup Errors” - that is a great place to see problems. (Is there some way to open this window manually after start, or the only way to see it is to enable it in preferences for every start?)

Ah yes, you are right, that was purely a timing problem. Anyway the parexec watching for change worked great in my scene from which this example originated. Thank you very much, this helped me a lot! :slight_smile:

Glad that helped :slight_smile:

Once you set the preference it will open every time if the condition level you set is met.

1 Like