Call Us: (877) 228-0901 M-F 9am-5pm US EST Bookmark and Share
Flex 3 - Error #1009 - control not initializing PDF  | Print |  E-mail

If your application is is throwing Error # 1009 and your controls do not initialize or are null when you are debugging your application, Try this

Set you Application creationPolicy="all"

Here is why...

Creation policy (click here to view Adobe's documentation)

Containers have a creationPolicy property that specifies when its children are created. By default, containers have a creation policy of ContainerCreationPolicy.AUTO, which means that the container delays creating descendants until they are needed, a process which is known as deferred instantiation. (A container's default creation policy is derived from its parent's instantiation policy, and the Application container has a default policy of ContainerCreationPolicy.AUTO.)

An auto creation policy produces the best startup time because fewer components are created initially. For navigator containers such as the ViewStack, TabNavigator, and Accordion, an ContainerCreationPolicy.AUTO creation policy means that the container creates its direct children immediately, but waits to create the descendants of each child until the child needs to be displayed. As a result, only the initially required child or children of a container get processed past the preinitialization stage.

A creation policy of ContainerCreationPolicy.ALL requires all of a container's children to be fully created and initialized before the container is initialized. For detailed information on creation policies, see Improving Startup Performance.

 
© 2006-2009 Code A Site, LLC