//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetObjects //
// Access: Public//
// Arguments:
// as_objlist[]: A string array to hold objects (passed by reference)
// as_objtype: The type of objects to get (* for all, others defined
// by the object .TYPE attribute)
// as_band: The dw band to get objects from (* for all)
// Valid bands: header, detail, footer, summary
// header.#, trailer.#
// ab_visibleonly: TRUE - get only the visible objects,
// FALSE - get visible and non-visible objects
//
// Returns: Integer
// The number of objects in the array
//
// Description: The following function will parse the list of objects
// contained in the datastore control associated with this service,
// returning their names into a string array passed by reference,
// and returning the number of names in the array as the return value
// of the function.
/* Get the Object String */
ls_ObjString = ids_requestor.Describe("Datawindow.Objects")
/* Get the first tab position. */
li_Tab = Pos(ls_ObjString, "~t", li_Start)
Do While li_Tab > 0
ls_ObjHolder = Mid(ls_ObjString, li_Start, (li_Tab - li_Start))
// Determine if object is the right type and in the right band
If (ids_requestor.Describe(ls_ObjHolder + ".type") = as_ObjType Or as_ObjType = "*") And &
(ids_requestor.Describe(ls_ObjHolder + ".band") = as_Band Or as_Band = "*") And &
(ids_requestor.Describe(ls_ObjHolder + ".visible") = "1" Or Not ab_VisibleOnly) Then
li_Count ++
as_ObjList[li_Count] = ls_ObjHolder
End if
/* Get the next tab position. */
li_Start = li_Tab + 1
li_Tab = Pos(ls_ObjString, "~t", li_Start)
Loop
// Check the last object
ls_ObjHolder = Mid(ls_ObjString, li_Start, Len(ls_ObjString))
// Determine if object is the right type and in the right band
If (ids_requestor.Describe(ls_ObjHolder + ".type") = as_ObjType or as_ObjType = "*") And &
(ids_requestor.Describe(ls_ObjHolder + ".band") = as_Band or as_Band = "*") And &
(ids_requestor.Describe(ls_ObjHolder + ".visible") = "1" Or Not ab_VisibleOnly) Then
li_Count ++
as_ObjList[li_Count] = ls_ObjHolder
End if