I’m refactoring an old project from 2016, and I encountered an issue. Back then, Python storage wasn’t available (as far as I remember), so I used a localCOMP containing a variablesDAT and a modulesCOMP to store variables.
Now, I’m trying to upgrade the workflow by storing all variables in the parent component’s storage. While the variables do appear in the parent storage (visible via the Examine DAT or the Customize Component dialog), I can’t fetch them using fetch(). I keep getting an error stating that the fetched items can’t be found.
Interestingly, if I manually store a dummy variable (one that isn’t part of local/variables or modules), I can fetch it successfully.
Could this issue be related to how variables imported via the mod class interact with Python storage?
What do you mean by this behaviour?
For data storage?
I don’t see how extension could help, but truly interested to know how I could use extension for this purpose.
My concern is that I never store any data inside the main .toe file or external .tox, if possible.
By data I mean configuration parameters, which could be float, int, str …
Maybe it is a weird workflow, but all data is stored in .dat on disk.
I use tableDAT to sync to the file and a script to store and update the data in the root component python storage.
The reason I process like this is I would rather not have to save the whole toe file or external component if any data is changed.
A bit like how you could also externalize python script for versioning.
For more complex python object, I may use a base component to store the data .