Browse Prior Art Database

Ensuring Unique IDs for Application-Added Dynamic Menu Items

IP.com Disclosure Number: IPCOM000113059D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 75K

Publishing Venue

IBM

Related People

Malcolm, JW: AUTHOR [+2]

Abstract

LAN NetView* View allows applications to register and add application-specific menu items to the View graphical user interface. As with all menu items in an OS/2* Presentation Manager* (PM) environment, the application-added menu items must have IDs that are unique within the menu to which they are added.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Ensuring Unique IDs for Application-Added Dynamic Menu Items

      LAN NetView* View allows applications to register and add
application-specific menu items to the View graphical user interface.
As with all menu items in an OS/2* Presentation Manager* (PM)
environment, the application-added menu items must have IDs that are
unique within the menu to which they are added.

      Since View has no way of knowing what application will be
registered with it and will need to add menu items, it is infeasible
to assign each application a unique range of IDs that only that
application would use.  There thus needs to be a way of ensuring that
no added menu items will have the same ID as a View menu item or as a
menu item added by a different application to the same menu, while
still allowing the registering application to be able to reference
the added menu item by a known ID.

      This disclosure describes a technique used by View that allows
any application to add menu items to the View interface such that the
uniqueness of the menu items within a given View menu is guaranteed
and referable by the application.

      The solution to this problem is found in the fact that every
application will be a unique class in the object-oriented View
product.  When the application is registered with View, it registers
its class name.  View keeps an internal array consisting of all class
names, and assigns to each class a unique base ID value.  The base

IDs are assigned in ascending order, starting at a value above the
highest ID of a View menu item, and with a set range between each
base ID.

      When an application registers a menu item, it can assign to it
any ID from 1 up to the constant range between different classes in
the View array.  This is the ID that the application will recognize
as belonging to that menu item.

      When View adds the menu item to the menu, however, View will
adjust the ID passed in by the application by adding to it the base
ID value that corresponds to the class of the application.  This i...