You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mihai Chira (JIRA)" <ji...@apache.org> on 2014/06/05 11:52:01 UTC
[jira] [Commented] (FLEX-13036) NestLevel never gets set for a
control added to a container whilst the container is not parented if the
scrollbars are on
[ https://issues.apache.org/jira/browse/FLEX-13036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14018636#comment-14018636 ]
Mihai Chira commented on FLEX-13036:
------------------------------------
This is still reproducible in SDK 4.12.1.
Another consequence of this bug is that commitProperties(), measure() or updateDisplayList() are still called for any invalidated child of a Container even after the container is removed from stage. This is causing us problems because we're using a closed-source library which we now discovered throws a fatal due to an expectation that these functions are not be called when components are off-stage.
Steps to reproduce:
# Import and run _ContainerNestLevel.fxp
# Click on button1.
# Click on button2.
*Current behaviour*: commitProperties() is still called for button2 even after its parent has been removed from stage. That's because its nestLevel is still 7 instead of the expected 0, like button1.
*Desired behaviour*: the nestLevel is set to 0 for button2.
> NestLevel never gets set for a control added to a container whilst the container is not parented if the scrollbars are on
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: FLEX-13036
> URL: https://issues.apache.org/jira/browse/FLEX-13036
> Project: Apache Flex
> Issue Type: Bug
> Components: Layout - General
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Internet Explorer 7.x
> Language Found: English
> Reporter: Adobe JIRA
> Attachments: _ContainerNestLevel.fxp
>
>
> Steps to reproduce:
> 1.You have a container(outer) that contains another container
> (inner) which itself contains a control that is large enough to force
> the scrollbars on in container inner i.e.
> <mx:VBox id="outer">
> <mx:VBox height="300" id="inner">
> <mx:DataGrid height="400" width="200"/>
> </mx:VBox>
> </mx:VBox>
> 2.Then you run the following code (you can run it from applicationComplete)
> inner.parent.removeChild(inner);
> var lbl:Label = new Label();
> lbl.text="HELLO WORLD"
> inner.addChild(lbl);
> outer.addChild(inner);
> 3.
>
> Actual Results:The Label never appears, however change the height of inner (say just
> remove the height attribute) so the scrollbars dont come on, run
> again and Label appears.
> It appears to me the problem is connected with setting the nestLevel
> on child controls.
> When you add the inner container back in it will try to set the
> nestLevel on all its children which is what we want for the Label
> becuase as it is newly created its nestLevel is 0 and it wont appear.
> However it uses "rawChildren" to iterate over the child objects and
> if the scrollbars are on the Label is not a raw child of the
> container, the contentPane is but it is a sprite so it is ignored by
> the container so Label never gets its nestLevel set.
> The reason why the grid stays visible is because its nestLevel never
> got set to 0 when the container was removed because again the
> container ignored it.
> Seems a prb in both FB2 and FB3.
>
> Expected Results:nestLevel should be set and child controls should be visible
>
>
> Workaround (if any):Manually set the nestLevel of all controls after the container becomes parented
--
This message was sent by Atlassian JIRA
(v6.2#6252)