Application domain-load a flex sub-Application

Source: Internet
Author: User

An application domain is the container to which a class definition belongs. The main application has a separate, top-level application domain called the system domain. A specific application is defined as a node in the system domain. When a flex sub-application is loaded into another main application, you can load this sub-application to one of the three application domain types, same-level domain (sibling domain), subdomain, and current domain. When you load a flex sub-application to a same-level application domain, the application domain of this Sub-application has the same parent application domain as its primary application domain, further, this sub-application is equivalent to other applications at the same level; when you load the sub-application to a sub-application domain, the application domain of this Sub-application is a sub-node of the main application domain. When you load a sub-application to the current domain, then the sub-application is loaded into the same application as the primary application domain. Each sub-application domain determines where the class is loaded.

By default, the swfloader and loader controls load a sub-application to a sub-application domain. If this sub-application and the main application are compiled by different versions of the Flex framework, a runtime error will occur. The cause of these errors is that the application sometimes translates different definitions for the same category.

You can set the loadforcompatibility attribute on swfloader to indicate the application domain to which the child application is loaded. If you set this attribute to true, the Child application is loaded with the same level application domain. If you set this attribute to false, the sub-application is loaded into the sub-application domain. The default value of this attribute is false. Therefore, sub-applications cannot be versionized by default.

You can specify the application domain on the loadercontext object. This is because you have specified the loadercontext attribute value when using the swfloader control. For details, see "specify loadercontext" on page 21 ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.