Browse Prior Art Database

Utilizing List-Box Hidden Storage for Static Data

IP.com Disclosure Number: IPCOM000122151D
Original Publication Date: 1991-Nov-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 127K

Publishing Venue

IBM

Related People

Evans, MB: AUTHOR [+2]

Abstract

This article proposes a solution that frees an OS/2* Presentation Manager* (PM) application from doing any storage management for storing dynamically changing information associated with entries in a list box. The mechanism is related to the IBM Application Connection Services (AConnS) product. It is quite general in nature and can be used to solve similar problems in other OS/2 PM applications.

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

Utilizing List-Box Hidden Storage for Static Data

      This article proposes a solution that frees an OS/2*
Presentation Manager* (PM) application from doing any storage
management for storing dynamically changing information associated
with entries in a list box.  The mechanism is related to the IBM
Application Connection Services (AConnS) product.  It is quite
general in nature and can be used to solve similar problems in other
OS/2 PM applications.

      A list box, defined as a control window by OS/2 PM, may have
one or more entries.  If a list box permits the selection of only one
entry at a time, it is called a single selection list box, and if it
permits the selection of multiple entries at one time, it is called a
multiple selection list box.  This description assumes a single
selection list box.  A user selects an entry in a single selection
list box and then enters or changes the associated information for
that entry.  The associated information is shown to the user only
when the user selects that entry in the list box.  The user should be
shown the associated information in the same form as it was
originally entered. The associated information for list box entries
needs to be stored in some static storage so that the information for
one entry is not lost when the user selects another entry.
Traditionally, this problem has been solved by dynamically allocating
and freeing static storage by the application itself.  If the
information for the list box entries is added, deleted or changed
frequently, it might be quite cumbersome for the application to
manage allocation, deallocation, and association of all the static
storage. The solution is to utilize the storage management of the
list box itself for storing information for the entries in the list
box and, thus, freeing the application from doing any such memory
management.  A list box in OS/2 PM can be up to a maximum of 64K
bytes of storage contingent upon the availability of the heap space.
The following assumptions apply:
i)   The total storage required to store the number of possible
entries in a list box and their associated information is less than
the storage allocated for the list box.
ii)  Each entry in the list box is always visible horizontally, and
thus the list box does not require a horizontal scroll bar.

      A user selects an entry in a list box and supplies the
information for that entry.  The application converts the
user-supplied information into a single string.  If the information
consists of more than one field value, then a separator may be used
between each field value in the string.  Now, th...