« Taking a Flex app to the desktop | Main | Web Pro Judge »
AIR NativeMenus? Your Thoughts Please
| By Rich Tretola | October 15, 2007 | Print This Post
|
| 48 views |
So, here is the current situation with AIR and the concept or NativeMenus. First, if you are not yet familiar with AIR and NativeMenus, please see the images below.
AIR NativeMenu on Mac OS X

Two AIR NativeMenus on a multi window application on Windows XP

OK, so here is the dilemma. On Mac OS X, NativeMenus are only able to be set on the Shell of the application and there may be only one NativeMenu per application. On Windows, NativeMenus can only be set on either a NativeWindow or Window component and may not be set on the Shell of the application.
So, I would like to get the opinions of my fellow AIR developers as to what you plan to do to build applications that can deploy on both Mac and PC and still have a consistent navigation. Will you even use NativeMenus as all?
P.S. - I have no idea what will happen on Linux. If you have any info on this please post comments on this as well.
Topics: Adobe AIR |








October 15th, 2007 at 8:11 am
My plan would be to use the OS detection to choose how the NativeMenu is implemented. The same way you detect and change the layout of the titlebar if it’s a mac, you have the same global flag change the NativeMenu that’s implemented, and architect your application accordingly, so it doesn’t inherently depend on one or the other.
October 15th, 2007 at 8:17 am
So, you would have a single master menu on Mac, but on Windows you may split your menus so that they only show on the appropriate window? If you do this, you may have menus in the master menu on the Mac that are not appropriate to the windows that are currently open.
October 15th, 2007 at 10:04 am
Maybe creating a menu manager class that handles all that would make sense.
October 15th, 2007 at 10:09 am
you have the opton of either..
on focus of a particular window telling the shell to change its abailable options.. like sometimes on the shell menu of a mac youll see some items dull grey as they are not available..
you could also always create your own window menu.. and place it in if on a mac… just a hbox with a few menu items.. extend NativeWindow.. and call it mac window or something. the as nick says do detection for OS the apply relevent windowing.
October 15th, 2007 at 10:34 am
I suppose changing the menu on Mac would be the best option and I would definitely have a manager handling this. It just seems like these are things that should be handled by the runtime rather than having conditional logic.
I also wonder why the runtime reports that on the PC, you can not have a NativeMenu on the Shell. It seems like most of the applications open on the PC (Notepad, Wordpad, ect. ) have menus on the main window.
October 15th, 2007 at 10:40 pm
One of the greatest advantages that I see in the flash/flex platform is that ability to create a (substantially) consistent UIs across multiple operating systems.
I for one will steer clear of any features that add inconsistency to my applications (including NativeMenu which is IMHO a step in the wrong direction as far as platform inconsistencies go).
What AIR really requires is a desktop/window manager that can accommodate (even multiple) AIR applications (working together if necessary) in creating a unified desktop experience. NativeMenu could perhaps be something this top level desktop manager could make use of, but AIR applications themselves should have the ability to use the services of this powerful desktop/window manager to unlock the true power of the AIR paradigm without having to suffer the same cross platform native software development headaches.
Of course, all this depends largely on the ultimate vision for AIR I suppose. Is AIR just a nice enough of an enabler for RIAs or a is it to be a true connectivity oriented platform which provides seamless access to both local and remote resources in a completely operating system agnostic fashion? I’ll take the latter thanks