Just to be clear, this is not a bug. This
is just a fact of life since we’re using some sort of indirection of
specifying an icon attribute in the dataProvider and then using an iconField
property to look up that reference. So, in cases like that the embedded asset
needs to not be a static variable. Other cases without this indirection, like a
Button icon, will work correctly. -deepa From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Deepa Subramaniam Yup, you are correct. I just talked to
Roger about this. What is happening is that MenuBar checks
to see if an iconField is set. In your case it is, and the MenuBar looks to see
if a Class, exitOn, exists with that name in the application or a property on
the document with that same name exists. It does, however you cannot access a
static var off an instance, only off the class. So, the lookup in the MenuBar
code fails.
HTH, deepa From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kelly Birr I found my problem. It appears that the menu cannot
bind to static vars for images. I solved the problem by specifying { public const myMenuIcon:Class = GlobalIcons.MyCoolIcon;
} where GlobalIcons.MyCoolIcon is declared exactly as below. Then pout
the local name "myMenuIcon" in the @icon field of the xml. - Kelly From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kelly Birr I've been racking my brain trying to get icons in
the menu bar. I think I'm doing exactly what the docs say but I
cannot get any icon to render. The label and actions work perfectly
but the icon does not show up. The icon is embedding properly as I
can see it in the "icon" property of a button in the same file.
I've also tried putting the path to the icon file in the xml, no joy. My Menu XML Is: <menu> <menuitem label="File"> </menu> My MXML is: <mx:Script> <![CDATA[ ]]> <mx:MenuBar id="menu"
width="100%" x="0" y="0" height="27"
dataProvider="{menuXml}" showRoot="false" - Kelly
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Icons in menu - not working Deepa Subramaniam
- RE: [flexcoders] Icons in menu - not working Deepa Subramaniam