Has anyone encountered a problem with FlexNativeMenu on OSX? My app is otherwise sandbox-ready and has been approved by the Mac App Store. I’m using Flash Builder 4.6 and AIR 3.4 SDK. The crash does not occur on all computers but the Console WARNING does.
I’ve tried using both xml/e4x, and an array of objects, as the data provider. I’ve tried with and without keyEquivalents. Even the simplest menu causes the error. The complete error message reported in the Mac Console is:
“* WARNING: Method setMnemonicLocation: in class AIR_PlayerContentMenuItem is obsolete and will be removed in release GM *“
If the FlexNativeMenu is removed from the source, the app runs in the sandbox without error.
///
I did find the following in the Mac Developer Library that appears to be related: This makes me think that the AIR 3.4 SDK is calling a deprecated method.
setMnemonicLocation:
Deprecated. Sets the character of the menu item title at location that is to be underlined. (Deprecated in OS X v10.6.)
- (void)setMnemonicLocation:(NSUInteger)location
Parameters
location
An integer index into the character array of the title. location must be from 0 to 254.
Discussion
This character identifies the access key by which users can access the menu item.
Availability
Available in OS X v10.0 and later.
Deprecated in OS X v10.6.
See Also
– mnemonicLocation
Declared In
NSMenuItem.h
The only workaround I have found is to implement the menus using NativeMenu rather than FlexNativeMenu. This completely eliminates the setMmemonicLocation WARNING in the OS X Console.