PDA

View Full Version : resourceManager Problem


gghazaryan
05-01-2008, 11:55 AM
Hi everyone.

Here is my problem:

<mx:MenuBar id="menuBar" labelField="@label" width="100%">
<mx:XMLList>
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_MyAccount')}">
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_Login')}" />
</menuitem>

<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_GameRules')}">
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_GeneralRules')}" />
</menuitem>

</mx:XMLList>
</mx:MenuBar>


Problem is that Flex doesnt show texts for all menu items ...
But if you change names of nodes in XMLList (menuitem1, menuitem2,...)
than it will work !
Why?
Is this reported bug ?
Thanks.

mackm
05-17-2008, 02:16 PM
All I can do is confirm this issue. At least you found a work-around, thank you for that. I tried many different alternatives but never succeeded in displaying all menu items. Generally I found the first two items in a group would not display unless the group included subitems - quite erratic.

zen0n
05-04-2011, 07:37 AM
I also ran into this problem and found the obvious solution:

<fx:Metadata>
[ResourceBundle("SR")]
</fx:Metadata>

<fx:Declarations>
<fx:XMLList id="mainMenuXMLList">
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_MyAccount')}">
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_Login')}" />
</menuitem>

<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_GameRules')}">
<menuitem label="{resourceManager.getString('SR', 'Lobby_MenuBar_GeneralRules')}" />
</menuitem>
</fx:XMLList>
</fx:Declarations>

<mx:MenuBar id="menuBar" labelField="@label" width="100%" dataProvider="{mainMenuXMLList}"/>