The List Objects: 4.1 GenDynamicListClass: DynamicList Instance Data

Up: GEOS SDK TechDocs | Up | Prev: 4 GenDynamicListClass | Next: 4.2 DynamicList Basics

GenDynamicListClass inherits all of the instance fields of GenItemGroupClass . The GenDynamicList object provides two additional instance fields:

@instance word GDLI_numItems = 0;
@instance word GDLI_queryMsg = 0;

GDLI_ numItems stores the number of items in the dynamic list. This field should be set to the initial number of monikers needed within your GenDynamicList. If this value is initially unknown (i.e. is retrieved dynamically) then you should set this value after the number of items becomes known (using MSG_GEN_DYNAMIC_LIST_INITIALIZE ). If this instance field is zero, no items will be drawn.

GDLI_ queryMsg stores the querying message that the dynamic list sends each time it needs to display an entry's moniker. (For example, when initially realized, a scrolling dynamic list may display only four out of 16 entries; this message will be sent out four times to retrieve the monikers for the items initially displayable.)

The query message will be handled by whatever object you set in GIGI_destination . The handler should search a list of data for the visual monikers to display within the list. You will want to set up a custom handler for this message and the list of data to search through. Note that this list of data will serve as the GenDynamicList's "children"; there are no GenItems allowed as children of a GenDynamicList. The query message is based on the prototype GEN_DYNAMIC_LIST_QUERY_MSG .

GEN_DYNAMIC_LIST_QUERY_MSG

void	GEN_DYNAMIC_LIST_QUERY_MSG(
        optr	list,
        word	item);

Use this prototype to define the query message for your GenDynamicList (stored in GDLI _queryMsg ). This prototype ensures that the message passes the correct parameters to your message handler.

Source: Your GenDynamicList object.

Destination: The destination of your GenDynamicList object ( GIGI_destination ).

Parameters: list The optr of the list.

item
The item (position number) needing a moniker.

Return: Nothing.


Up: GEOS SDK TechDocs | Up | Prev: 4 GenDynamicListClass | Next: 4.2 DynamicList Basics