Saturday, April 21, 2007

FAQ.Errors.TypeError: Error #1034

If you are attempting to add a child to a mx.core.Container, the child must implement the interface mx.core.IUIComponent. Exactly 2 classes directly implement this interface. These are mx.core.UIComponent and mx.core.UITextField. Additionally, IAxisRenderer, IDeferredInstantiationUIComponent, IListItemRenderer, IMenuBarItemRenderer, IToolTip subclass IUIComponent so classes implementing these interfaces can be added to Containers as well. There are two ways to fix this problem:

1. Add the child component that you are trying to add to a UIComponent (or other component that implements IUIComponent) and then add the UIComponent to the Container.

2. Use a different child component. i.e. If the child was a Loader, use SWFLoader instead.

1 comment:

Omar Mendoza said...

I resolved deleted a line:
< mx:SetProperty name="horizontalScrollBar" value="false"/ >

Flex Error 1034

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.