Skip navigation
Currently Being Moderated

MenuBar control

Jun 15, 2012 12:18 PM

 
Replies
  • Currently Being Moderated
    Jun 15, 2012 12:18 PM   in reply to Community Help

    This code does not reder properly. ITem D-3 is rendered in place of item D-2, which is SKIPPED. Is there a fix for this?I'm using SDK 4.6

          ;

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2012 12:20 PM   in reply to Claudius Tiberiu Iacob

    THAT code. This page ate my XML...

     

          <root>

              <menuitem label="MenuItem A" icon="myTopIcon">

                   <menuitem label="SubMenuItem A-1" enabled="False"/>

                   <menuitem label="SubMenuItem A-2"/>

              </menuitem>

              <menuitem label="MenuItem B" type="check" toggled="true"/>

              <menuitem label="MenuItem C" type="check" toggled="false" icon="myTopIcon"/>

              <menuitem type="separator"/>

              <menuitem label="MenuItem D" icon="myTopIcon">

                   <menuitem label="SubMenuItem D-1" type="radio" groupName="one">

                        <menuitem label="SubMenuItem D-2" type="radio" groupName="one">

                             <menuitem label="SubMenuItem D-3" type="radio" groupName="one" />

                        </menuitem>

                   </menuitem>

                   <menuitem label="SubMenuItem D-2" type="radio" groupName="one" toggled="true"/>

                   <menuitem label="SubMenuItem D-3" type="radio" groupName="one"/>

              </menuitem>

         </root>

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2012 11:27 PM   in reply to Claudius Tiberiu Iacob

    @Claudius,

    I'm not exactly sure what you want to render, but I removed the root element, tweaked the first D-1 tag, and got the following to work:

     

    <menuitem label="MenuItem A" icon="myTopIcon">                                

    <menuitem label="SubMenuItem A-1" enabled="False"/>                                 

    <menuitem label="SubMenuItem A-2"/>

    </menuitem>

    <menuitem label="MenuItem B" type="check" toggled="true"/>

    <menuitem label="MenuItem C" type="check" toggled="false" icon="myTopIcon"/>

    <menuitem type="separator"/>

    <menuitem label="MenuItem D" icon="myTopIcon">                                 

    <menuitem label="SubMenuItem D-1" type="radio" groupName="one">                                   

    <menuitem label="SubMenuItem D-2" type="radio" groupName="one"/>                                   

    <menuitem label="SubMenuItem D-3" type="radio" groupName="one" />                 

    </menuitem>                                <menuitem label="SubMenuItem D-2" type="radio" groupName="one" toggled="true"/>

    <menuitem label="SubMenuItem D-3" type="radio" groupName="one"/>

    </menuitem>

     

    Regards,

    Randy Nielsen

    Senior Content and Community Manager

    Adobe Systems Incorporated

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 2:01 AM   in reply to jrunrandy

    Dear jrunrandy

    Thank you for your interest in this matter.

    I isolated the issue by trimming away all unnecessary code. Have a look at the following MXML Application:

     

    <?xml version="1.0" encoding="utf-8"?>

     

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                     xmlns:s="library://ns.adobe.com/flex/spark"

                                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

     

        <fx:Declarations>

     

            <fx:XML id="myData" xmlns="">

                <menu>

                    <menuitem label="Level 0" icon="myTopIcon">                                

                        <menuitem label="Level 1" type="radio" groupName="one">                                  

                            <menuitem label="Level 2" type="radio" groupName="one">

                                <menuitem label="Level 3" type="radio" groupName="one" />                

                            </menuitem>

                        </menuitem>                               

                    </menuitem>

                </menu>

             </fx:XML>

     

        </fx:Declarations>

     

         <mx:MenuBar

             dataProvider="{myData}"

             width="100%"

             labelField="@label"

             showRoot="false"/>

     

    </s:Application>

     

    IMHO, this code should render a menu resembling to this hierarchical structure:

     

    Level 0

        -> Level 1

                -> Level 2

                         -> Level 3

     

    However, the menu that is rendered resembles to this structure (also check the attached screen shot):

    Level 0

       -> Level 1

               -> Level 3

     

    MenuBar_Issue.png

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2012 2:05 AM   in reply to Claudius Tiberiu Iacob

    P.S.: Removing the type="radio" attribute does not resolve the issue.

     

    Thank you

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2012 1:02 AM   in reply to Claudius Tiberiu Iacob

    Hi Claudius,

    OK. I see. I'm able to reproduce this. I'm not sure where to report Flex bugs these days. I suggest trying either bugs.adobe.com or the Apache Flex site.

     

    -Randy

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points