I ran into a problem today trying to create a “modal” bead. Every time a component is added or moved from one parent to another, addedToParent() is called which adds all the declared beads as well as looks up beads from the ValuesManager. Besides having extra overhead, this results in duplicate beads if declared via MXML.
The simplest way to fix this would be to have a private flag which is set the first time a component is added to a parent and if the flag is set, the bead-setup code would not be run. This is a bit of “just in case” code, but I’ not sure how else to resolve this. Thoughts? Harbs
