0 Replies Latest reply on Nov 3, 2009 6:21 PM by salfhhhhhg

    MenuBar and nested icon

    salfhhhhhg

      Hi all,

       

           I'm trying to set icons in menu bar from nested property. Let me know please if it is possible without overriding MenuBar's itemToIcon.. I tried sth like that:

       

      <mccune:VerticalMenuBar id="vmb" direction="right" labelField="name" creationComplete="cc()"
              dataDescriptor="{new SampleTreeDataDescriptor()}" itemClick="pvs.products=event.item.products"
              menuShow="onShow(event)" iconField="{flash.utils.getQualifiedClassName(((vmb.menuBarItemRenderer as MenuBarItem).data as CategoryDTO).image.image)}"  />

       

      but it gives unknown compiler error;

       

      sth like this:

       

           private function returnIconField():String{
                      var s:String = flash.utils.getQualifiedClassName(((vmb.menuBarItemRenderer as MenuBarItem).data as CategoryDTO).image.image);
                      return s;
                  }

       

              ]]>
          </mx:Script>
         
          <mccune:VerticalMenuBar id="vmb" direction="right" labelField="name" creationComplete="cc()"
              dataDescriptor="{new SampleTreeDataDescriptor()}" itemClick="pvs.products=event.item.products"
              menuShow="onShow(event)" iconField="{returnIconField()}"  />

       

      but the function is never called, why?

       

      Greetings