getAppleListItem

Syntax getAppleListItem (list, position, itemAddr)

Params list is a binary value containing an Apple event descriptor list

position is a numeric index or a string4 key indicating which list item is desired

itemAddr is the address where the indicated value is to be stored

Action Extracts from list the value indicated by position, and puts it in the database location at itemAddr.

Returns True if the indicated item was found and copied into itemAddr, false if no such item was found

Examples getAppleListItem (sample.keyList, 'word', @x); x
» hello«this string value with the key 'word' was in the list

getAppleListItem (sample.descList, 2, @x); x
» world«the second item in the list was this string value

Errors If list is not a binary value containing a valid descriptor list, an error occurs.

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes Frontier 3.0 and above supports direct list and record manipulation using square bracket syntax.

Items in keyed list (AERecords) can be extracted by key or index; items in indexed lists can only be extracted by index.

Requesting an item that isn't found (because the key doesn't exist, or the index is out of range) causes the verb to return false, but is not an error.

Valid list values can be created with putAppleListItem, or can be received from another application using complexEvent.

See Also complexEvent

tableEvent

countAppleListItems

putAppleListItem

[ ]

Discuss