Loading ...
Sorry, an error occurred while loading the content.

ControlBar not visible in Flex 4.6

Expand Messages
  • Dave Glasser
    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
    Message 1 of 5 , Mar 12, 2012
    View Source
    • 0 Attachment
      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
      Post a small test case. On 3/12/12 9:28 AM, Dave Glasser wrote: I have an app originally developed in Flex 3.3, which I m in the process
      Message 2 of 5 , Mar 12, 2012
      View Source
      • 0 Attachment
        Re: [flexcoders] ControlBar not visible in Flex 4.6 Post a small test case.


        On 3/12/12 9:28 AM, "Dave Glasser" <dglasser@...> 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
      • Dave Glasser
        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
        Message 3 of 5 , Mar 12, 2012
        View Source
        • 0 Attachment
          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 <aharui@...>
          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" <dglasser@...> 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




        • Dave Glasser
          I m using a subclass of mx.containers.Panel. There is no controlBarContent array. ________________________________ From: claudiu ursica
          Message 4 of 5 , Mar 12, 2012
          View Source
          • 0 Attachment
            I'm using a subclass of mx.containers.Panel. There is no controlBarContent array.


            From: claudiu ursica <the_braniak@...>
            To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
            Sent: Monday, March 12, 2012 3:23 PM
            Subject: Re: [flexcoders] ControlBar not visible in Flex 4.6



            You need to put your stuff inside controlBarContent array.

            C


            From: Dave Glasser <dglasser@...>
            To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
            Sent: Monday, March 12, 2012 5:28 PM
            Subject: [flexcoders] ControlBar not visible in Flex 4.6

             
            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.






          • claudiu
            Sorry for the reply I hit the send to early in my email before actually reading the whole content. C
            Message 5 of 5 , Mar 12, 2012
            View Source
            • 0 Attachment
              Sorry for the reply I hit the send to early in my email before actually reading the whole content.
              C

              --- In flexcoders@yahoogroups.com, Dave Glasser <dglasser@...> wrote:
              >
              > I'm using a subclass of mx.containers.Panel. There is no controlBarContent array.
              >
              >
              >
              > ________________________________
              > From: claudiu ursica <the_braniak@...>
              > To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
              > Sent: Monday, March 12, 2012 3:23 PM
              > Subject: Re: [flexcoders] ControlBar not visible in Flex 4.6
              >
              >
              >
              >
              >
              >
              > You need to put your stuff inside controlBarContent array.
              >
              > C
              >
              >
              >
              > ________________________________
              > From: Dave Glasser <dglasser@...>
              > To: "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
              > Sent: Monday, March 12, 2012 5:28 PM
              > Subject: [flexcoders] ControlBar not visible in Flex 4.6
              >
              >
              >  
              > 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.
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.