BBjObjectTable::getKeys

Description

In BBj 5.0 and higher, this method retrieves all of the keys from the table.

Syntax

Return Value

Method

BBjVector

getKeys()

Parameters

None.

Return Value

Returns a BBjVector containing all of the keys in the table.

Remarks

The keys are not returned in any particular order.

Example

rem 'Get all the keys from the BBjObjectTable

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Obtain the instance of the BBjObjectTable object
let StateObjectTable! = myAPI!.getObjectTable()

rem 'Load the BBjObjectTable
while 1
    DREAD STATE_KEY$,STATE_NAME$,ERR=*BREAK

    rem 'Add the key/value pair into the BBjObjectTable
    StateObjectTable!.put(STATE_KEY$, STATE_NAME$)
wend

rem 'Get the keys the BBjObjectTable
STATE_KEY! = StateObjectTable!.getKeys()
for i = 0 to STATE_KEY!.size()-1
    STATE_KEY$ = STATE_KEY!.get(i)
    STATE_NAME$ = StateObjectTable!.get(STATE_KEY$)
    PRINT STATE_KEY$," = ",STATE_NAME$
next i
DATA "AK","Alaska"
DATA "AL","Alabama"
DATA "AR","Arkansas"
DATA "AZ","Arizona"
DATA "CA","California"
DATA "CO","Colorado"
DATA "CT","Connecticut"
DATA "DC","District of Columbia"
DATA "DE","Delaware"
DATA "FL","Florida"
DATA "GA","Georgia"
DATA "GU","Guam"
DATA "HI","Hawaii"
DATA "IA","Iowa"
DATA "ID","Idaho"
DATA "IL","Illinois"
DATA "IN","Indiana"
DATA "KS","Kansas"
DATA "KY","Kentucky"
DATA "LA","Louisiana"
DATA "MA","Massachusetts"
DATA "MD","Maryland"
DATA "ME","Maine"
DATA "MI","Michigan"
DATA "MN","Minnesota"
DATA "MO","Missouri"
DATA "MS","Mississippi"
DATA "MT","Montana"
DATA "NC","North Carolina"
DATA "ND","North Dakota"
DATA "NE","Nebraska"
DATA "NH","New Hampshire"
DATA "NJ","New Jersey"
DATA "NM","New Mexico"
DATA "NV","Nevada"
DATA "NY","New York"
DATA "OH","Ohio"
DATA "OK","Oklahoma"
DATA "OR","Oregon"
DATA "PA","Pennsylvania"
DATA "PR","Puerto Rico"
DATA "RI","Rhode Island"
DATA "SC","South Carolina"
DATA "SD","South Dakota"
DATA "TN","Tennessee"
DATA "TX","Texas"
DATA "UT","Utah"
DATA "VA","Virginia"
DATA "VI","Virgin Islands"
DATA "VT","Vermont"
DATA "WA","Washington"
DATA "WI","Wisconsin"
DATA "WV","West Virginia"
DATA "WY","Wyoming"

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.