Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy initialization of container model breaks metadata context #83

Open
justin-hackin opened this issue May 19, 2023 · 0 comments
Open

Comments

@justin-hackin
Copy link
Owner

you can't nest tweakable properties inside a container model if you don't create a defaultFn that instantiates it on the property where it is stored. Even though the applySnapshot on open widget preserves the instances' context, it can be useful to have models with indeterminate existence like the stroke dash path properties on the Pyramid Net model.

Potential solution, somewhat inelegant: store metadata into a model registry and use the model name and valuePath as a key for the metadata value. We can only get the valuePath after attachment to root store so the context is still useful but the registry would take precedence for metadata getter with context as fallback. Not sure...

@justin-hackin justin-hackin changed the title metadata registry based on valuePath lazy initialization of container model breaks metadata context May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant