I ran into a problem with nested widgets, and I tried these two approaches:
- I have a parent widget, so I created a inversify container for it by using
container.createChild(), and I binded the parent widget and the child treeWidget into this container. Then I create a new child container for the child treeWidget by using
createTreeContainer(). Finally, I binded the dependencies of the treeWidget and the treeWidget itselt(
toSelf()) into this child container, but the treeWidget render nothing.
- I put all dependencies of both parent widget and child treeWidget into the parent container. Then the treeWidget’s rendering works.
I’m wondering why the treeWidget in the first approach didn’t render anything. Does the nesting of inversify containers affect data transfer between nested widget ?