Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-24177

.owner is set to null for elements added do SkinnableContainer created at runtime.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 4.0 (Release)
    • Adobe Flex SDK Previous
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Create instance of SkinnableContainer or any of its subclasses (BorderContainer, spark:Panel) at runtime.
      2. Add child to this newly created container before adding it to stage
      3. Add instance of SkinnableContainer to display list
      4. trace(child.owner)

      Actual Results:
      contentGroup in a skin

      Expected Results:
      SkinnableContainer

      Workaround (if any):
      Add child only after container complete creation. Or use mx: alternative of a component.

      Still reproducable in SDK 4.1

      Code to reproduce the issue:

      var p:BorderContainer = new BorderContainer();
      var b:Button = new Button();
      b.label = "Test";
      b.addEventListener(MouseEvent.CLICK, function (e:Event):void
      {
      trace(b.owner); // traces Test0.ApplicationSkin2._ApplicationSkin_Group1.contentGroup.BorderContainer107.BorderContainerSkin110.Group111
      });
      p.addElement(b);
      addElement(p);
      trace(b.owner); // traces Test0.ApplicationSkin2._ApplicationSkin_Group1.contentGroup.BorderContainer107.BorderContainerSkin110.Group111

      The problem is in SkinnableContainer.partAdded method. It should unsubscribe from _placeHolderGroup ELEMENT_REMOVE event before removing the elements from it.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: