Hello,
I'm trying to recreate a custom XML-based FlexNativeMenu (an Adobe.com example) by using the latest air sdk 3.9 (flex sdk 4.6.0 + air sdk 3.9)... The mxml code I'm trying to run is:
<?xml version="1.0" encoding="utf-8"?><!-- aircomponents/src/NativeMList.mxml --><s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" menu="{testMenu}"> <fx:Declarations> <!-- The XML data provider --> <fx:XML format="e4x" id="menuData"> <root> <menuitem label="MenuItem A"> <menuitem label="SubMenuItem A-1" type="check" toggled="true"/> <menuitem type="separator"/> <menuitem label="SubMenuItem A-2"/> <menuitem label="SubMenuItem A-3"> <menuitem label="Sub-SubMenuItem A-3-1"/> <menuitem label="Sub-SubMenuItem A-3-2" enabled="false"/> <menuitem label="Sub-SubMenuItem A-3-3"/> </menuitem> </menuitem> <menuitem label="MenuItemB"> <menuitem label="SubMenuItem B-1"/> <menuitem label="SubMenuItem B-2"/> </menuitem> </root> </fx:XML> <mx:FlexNativeMenu id="testMenu" dataProvider="{menuData}" labelField="@label" showRoot="false"/> </fx:Declarations></s:WindowedApplication>
However, every time I'm running the debugger, the same issue appears (something related to dataDescriptor):
[SWF] testmenu.swf - 1,700,179 bytes after decompression
ReferenceError: Error #1065: Variable mx.controls.treeClasses::DefaultDataDescriptor is not defined. at mx.controls::FlexNativeMenu()[E:\dev\4.y\frameworks\projects\airframework\src\mx\controls\FlexNativeMenu.as:733] at testmenu/_testmenu_FlexNativeMenu1_i() at testmenu()[/Users/Minopharma/Documents/Adobe Flash Builder 4.6/testmenu/src/testmenu.mxml:5] at _testmenu_mx_managers_SystemManager/create()[_testmenu_mx_managers_SystemManager.as:51] at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\systemClasses\ChildManager.as:311] at mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:3057] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2843] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2723] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.preloaders::Preloader/timerHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:542] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick()
Interestingly, when tried to debug the same mxml code above by using air sdk 3.1 (flex 4.6.0 +air sdk 3.1), everything is displaying normal...
I really don't understand where is the problem? Is it something new/changed in air sdk 3.9 comparing to 3.1 (regarding the same menu component) or is it a bug?
I would really appreciate any help in solving this issue...
Regards,
Nikola