1, Parentapplication
The Parentapplication property of the component contains the Application object of this component, and the parentapplication of the Application object itself is null. When a flex program generates a SWF file that is loaded by another flex program, the Parentapplication property of the component in the loaded Flex program remains the same, in which case the Parentapplication property may represent the main program
The build also has two related properties: the Parent property, which refers to an object containing the component's parents, and the Parentdocument property, which is the object at the top of the hierarchy in the application program or user group where the component resides. The Parentdocument and parent properties are easily confused and sometimes point to the same object. For example, in customizing a component that inherits the canvas, called Cartcell, which puts a checkbox with an ID of Cart_check, then this Cart_ The Parent property and the Parentdocument property of a check always represent the Cartcall component itself. If you create a canvas named Check_holder in Cartcell, place the cart_check inside Check_holder so that the two-level container is formed in Cartcell. At this point, the parent of Cart_check points to Check_holder, and Parentdocument still points to the Cartcell component unchanged.
2. About Dispatchevent He is a core method of the Flex event mechanism for distributing events: This.parentApplication.dispatchevent (New Cartevent (Data,cart_ check.selected)); The purpose of this code is to this.parentapplication objects (that is, application itself) and distribute the newly created Cartevent objects. The new Cartevent object also contains two properties that hold the necessary information. This information is available when an object listens to this event
3, Skilled super () of the use of the environment