Flex: Accessing MXML from class -
I have a class that I institute when the creation is complete:
Public Priority List: AppCollection = New App Collection (Catalog Bar); The catalog bar is a hebox.
In this class, I am creating a VBox and adding it as a catalog strip. Here's the producer for the said category:
Public function app collection (_ container: HBbox) {this.container = _container; } And here's the code in which I'm having trouble:
Public Function Populate (e: ResultEvent): Zero {var appImage: Image = New picture (); Var app text: text = new text (); Var Episodes: VBox = New VBox (); AppImage.source = "./res/Halo.png"; AppImage.width = 70; Appimage.height = 70; AppText.text = "Halo 4"; AppContainer.width = 110; AppContainer.height = 125; AppContainer.addChild (appImage); AppContainer.addChild; Tbox = appContainer; This.container.addChild (App Container); } On the last line, it says that this content is empty. Impossible! I added it to the constructor! Apart from this, I tried to accelerate MXML and reach the container from the main. When I try the same code from a script tag in main.mxml, it works, but it kills the entire point of the class in the first place. How can I get an MXML tag from an external class? All my imports and everything ...
public var list: AppCollection = new AppCollection (CatalogStrip); What main. Is the script portion of Mxml? If so, the reason for this is that you are getting empty things. You need a method:
Public Preferences list: App Clock; Private function handling complete (): zero {this.catalog = new app collection (catalog bar); }
Comments
Post a Comment