Arguments: menu menu-item-or-item-number stream
Called to process a menu-item that was chosen by the end user (either by clicking on it or first selecting it and then pressing the main Enter key).
The default method first checks to see if the value of the chosen menu-item is another menu. If so, it calls pop-up-menu on that menu. Otherwise it funcall's the value of the on-click property of the menu, passing three arguments:
1. the menu that was passed to this function,
2. the chosen menu-item,
3. the stream that was passed to this function.
menu is the menu that contains the chosen menu-item.
menu-item-or-item-number is the either the menu-item that was chosen, or the index of the item within the menu-items of the menu, where zero indicates the topmost menu-item.
stream is either the window on which the menu was invoked with pop-up-menu, or else the window on which the menu was defined.
The default handle-menu-selection method should suffice for most applications, since menus are typically customized by a combination of menu-item values and (when needed) custom on-click event handlers.
But an application could replace the default handle-menu-selection method with one that bypasses the on-click functionality entirely. Or an application could add handle-menu-selection wrapper methods that catch every menu choice for some class of menu.
See About events in the IDE in cgide.htm.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.