Recently I have developed a few components that derived the base class of UIComponent instead of Container.  In most cases, things went hunky dory.  However, I start to realize that some components fail miserably.  For example, if my component uses ButtonBar (such as ToggleButtonBar), any interaction with the ButtonBar inside that component would throw a Type #1003 error.  Upon close inspection, it has to do with a null focusManager property assignment to ButtonBar.

After hours of tearing hair, I have decided to try my luck by reading the UIComponent implementation.  I have found that if the a UIComponent does not contain an interface of IFocusManagerContainer, its parent container would not pass in the focus manager.
Advertisements