I have a static method in a class that adds a group with a label when called to a parent passed in as parameter.
How can I check if the parent has that element?
Calling MyClass.showLabel("Hello",groupContent) will add a label with the text "Hello" in the MXML component with the id of groupContent.
How can I later on check in the same MXML file where groupContent exists if it contains that label?
I tried giving the label an id and referencing it by groupContent["givenID"] but that throws an error.
Keep a cache of who already has been passed in?
I could have a static public var that holds all created elements and another method that removes it I guess.