Hi!
I was wondering if its possible to connect the lister component straight to a storage dictonary, instead of letting it read from a Dat table as input.
The use case is that we have a stored dictonary containing all the info needed. I’m using the lister to give the user to be able to alter this stored info. But using several different lookups to present the list in a nice and readable way (for instance, we store a rotation matrix, but the user should be able to edit rx,ry,rz instead of matrix values) The way im doing that now, is generating a table from the storage and feeding that into the lister comp. I was wondering if it is possible to skip this step and let the lister directly listen to a stored dictonary.
Cheers, Roy
I think listening might ba possible by hacking the storage manager module (I build some hack where you could inject a callback into dependable attributes, so that should also be possible for the storage manager).
What you def. can do is set the Data attribute of the Lister directly and call the DataChanged() method afterwards.
Thanks! Wanted to stay away from hacking into python classes like the storagemanager / lister extention class to keep things compatible with future updates.
For anyone having a similar thing. I found an easy work-around by feeding a scriptDAT into the lister comp, and grabbing the desired values from storage in there. I then update the values in storage by using the call back dat of the lister comp.
@yfxlab Your solution makes sense. You could also format your data in the onGetRawData callback of the lister. Just return a list of objects, lists, or dictionaries from that callback. The trick with that method is you need to refresh the lister manually if the data changes.