Alex,

Thanks very much for responding, however, I've figured it out. 


I was adding my control bar as the last child in the constructor of my class, 
which subclasses TitleWindow. That triggered a call to 
Panel.createComponentsFromDescriptors(). That called 
Panel.setControlBar(myControlBar) as it should, and removed the controlBar from 
the container's regular child list and added it to the rawChildren. Since this 
happens in the constructor, my class is not yet added to the display list. 


After my class instance is added to the display list, the 
Panel.createChildren() method gets called, which again calls 
createComponentsFromDescriptors(). This time, since the last container child 
was not a ControlBar, it calls setControlBar(null).

The fix was to add the control bar as a child in my class's createChildren() 
method, after super.createChildren() has been called.

This is a Flex bug, IMHO.



________________________________
 From: Alex Harui <aha...@adobe.com>
To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com> 
Sent: Monday, March 12, 2012 1:34 PM
Subject: Re: [flexcoders] ControlBar not visible in Flex 4.6
 

 Re: [flexcoders] ControlBar not visible in Flex 4.6 


Post a small test case.


On 3/12/12 9:28 AM, "Dave Glasser" <dglas...@pobox.com> wrote:



> 
> 
>   
>
>I have an app originally developed in Flex 3.3, which I'm in the process of 
>migrating to Flex 4.6. I don't want to have to rewrite everything using Spark 
>components and containers.
>
>I have a mx.containers.TitleWindow with a mx.containers.ControlBar added as 
>the last child. It shows up as expected in Flex 3.3, but it's not there in 
>Flex 4.6. Does anyone know what I need to do to get it to show up in Flex 4.6, 
>without rewriting everything using Spark components?
>
>I tried compiling with the halo theme, but that didn't work.
>
>   
>
>
>
-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
 


Reply via email to